Created
August 21, 2021 12:24
-
-
Save tech-engine/b750d039198fee826aa1af56731f3310 to your computer and use it in GitHub Desktop.
Document Porting An Existing Ethereum DApp To Polyjuice - loadWeb3
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
loadWeb3: async () => { | |
const providerConfig = { | |
rollupTypeHash: process.env.ROLLUP_TYPE_HASH, | |
ethAccountLockCodeHash: process.env.ETH_ACCOUNT_LOCK_CODE_HASH, | |
web3Url: process.env.WEB3_PROVIDER_URL | |
} | |
const provider = new PolyjuiceHttpProvider(process.env.WEB3_PROVIDER_URL, providerConfig) | |
App.web3Provider = provider | |
web3 = new Web3(provider) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment