Skip to content

Instantly share code, notes, and snippets.

@Jesserc
Jesserc / axios.js
Created October 31, 2022 22:31 — forked from apow2/axios.js
use axios to get data from IPFS
import axios from "axios";
let myContract;
let init = async () => {
await ethStore.setProvider("https://api.avax-test.network/ext/bc/C/rpc");
await ethStore.setBrowserProvider();
let contract = await new $web3.eth.Contract(abi, contractAddress);
if ($chainId != 43113) {
alert("Warning: You are not connected to Avalanche Fuji test-net!");
}
require("@nomiclabs/hardhat-waffle");
require("@nomiclabs/hardhat-ethers");
// This is a sample Hardhat task. To learn how to create your own go to
// https://hardhat.org/guides/create-task.html
task("accounts", "Prints the list of accounts", async () => {
const accounts = await ethers.getSigners();
for (const account of accounts) {
console.log(account.address);
@Jesserc
Jesserc / demo.js
Created September 6, 2022 16:00 — forked from okeken/JS File
let animal = {
name:"cat",
type:"mammal",
color:"black",
class:'carnivorous',
gender:'female',
legs:{
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
import "./multisig.sol";
contract MultiSigFactory {
//a factory contract that create multiple clones of multisig.sol
//a function that create a new multisig
//an array that holds contract addresses created
//a function that calls the approve function in multisig.sol
// SPDX-License-Identifier:MIT;
pragma solidity 0.8.0;
contract DB {
// 0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2 //1
// 0x4B20993Bc481177ec7E8f571ceCaE8A9e22C02db //2
// 0x78731D3Ca6b7E34aC0F824c42a7cC18A495cabaB //3