Created
December 21, 2020 07:38
-
-
Save snowkidind/b9854202244d13fe48133aceff7ae342 to your computer and use it in GitHub Desktop.
Notes about getting a mainnet-fork version of curve working for non brownie-centrics
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
Working with Curve Source Repo, Including running from Brownie. | |
For starters, there is a pdf manual for brownie that should be found and utilized. | |
The way to configure the infura or whatever provider is via the command line, | |
in there you will want to set your mnemonic as well as your infura key or private RPC | |
$ brownie networks list true | |
$ brownie networks modify mainnet-fork mnemonic="\"your twelve word mnemonic\"" | |
$ brownie networks modify mainnet host=https://rinkeby.infura.io/v3/dklfjh0g8og8ohg845jhsgr98 | |
Then, this is what the deal is: | |
Pull data off of the mainnet and use it in a private fork for testing. | |
When you run: | |
brownie run deploy --network mainnet-fork -I | |
it will pull, using infura(slow) contract and address data fgrom the mainnet. | |
the script will instantiate the contract objects it finds, and give you a console to test. | |
try these commands: | |
>>> dir() | |
try this where contract address is the mainnet address of one of the dir listed contracts: | |
>>> y = StableSwapUSDT.at('0x45F783CCE6B7FF23B2ab2D70e416cdb7D6055f51') | |
(40 seconds) | |
Pulling data from the mainnet fork and interacting with it: | |
>>> y.owner() | |
I didnt go further from this point for the time being. | |
Next steps: | |
Connect to local RPC using JS and try and communicate with the above contract | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment