This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INFURA_URL=<your_url> | |
ETHERSCAN_API_KEY=<your_api_key> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const axios = require('axios') | |
const { ethers } = require('ethers') | |
const address = '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599' | |
const apiKey = '' | |
const url = `https://api.etherscan.io/api?module=contract&action=getabi&address=${address}&apikey=${apiKey}` | |
const infuraUrl = '' | |
const getAbi = async () => { | |
const res = await axios.get(url) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { expect } = require("chai"); | |
describe('Staking', function () { | |
beforeEach(async function() { | |
[owner, wallet1, wallet2] = await ethers.getSigners(); | |
Staking = await ethers.getContractFactory('Staking', owner); | |
Wbtc = await ethers.getContractFactory('Wbtc', wallet1); | |
staking = await Staking.deploy(); | |
wbtc = await Wbtc.deploy(); |
NewerOlder