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
// SETUP | |
const { ethers } = require('ethers') | |
const axios = require('axios') | |
require('dotenv').config() | |
const UNISWAP_V3_FACTORY_ADDRESS = '0x1F98431c8aD98523631AE4a59f267346ea31F984' | |
const ROPSTEN_PROVIDER = new ethers.providers.JsonRpcProvider(process.env.INFURA_URL_ROPSTEN) | |
const WALLET_ADDRESS = process.env.WALLET_ADDRESS |
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 { ethers } = require('ethers') | |
// IMPORTS AND SETUP | |
const JSBI = require('jsbi') // [email protected] | |
const { abi: IUniswapV3PoolABI } = require("@uniswap/v3-core/artifacts/contracts/interfaces/IUniswapV3Pool.sol/IUniswapV3Pool.json"); | |
const { TickMath, FullMath } = require('@uniswap/v3-sdk') | |
require('dotenv').config() | |
const POOL_ADDRESS = '0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640' |
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
curl --location --request POST 'localhost:8545/' --header 'Content-Type: application/json' --data-raw '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' |
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
async function main() { | |
[signer1, signer2] = await ethers.getSigners(); | |
const Staking = await ethers.getContractFactory('Staking', signer1); | |
staking = await Staking.deploy({ | |
value: ethers.utils.parseEther('10') | |
}); | |
console.log("Staking contract deployed to:", staking.address, "by", signer1.address) |
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
WALLET_ADDRESS= | |
WALLET_SECRET= | |
INFURA_TEST_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
{ | |
"name": "client", | |
"version": "0.1.0", | |
"private": true, | |
"dependencies": { | |
"@testing-library/jest-dom": "^5.16.4", | |
"@testing-library/react": "^13.2.0", | |
"@testing-library/user-event": "^13.5.0", | |
"bootstrap": "^5.1.3", | |
"ethers": "^5.6.6", |
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_TESTNET= | |
WALLET_ADDRESS= | |
WALLET_SECRET= |
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_TESTNET= | |
WALLET_ADDRESS= | |
WALLET_SECRET= |
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_TESTNET= | |
WALLET_ADDRESS= | |
WALLET_SECRET= |
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_TESTNET=<your_url_and_key> |