Skip to content

Instantly share code, notes, and snippets.

@tech-engine
Created August 21, 2021 12:24
Show Gist options
  • Save tech-engine/b750d039198fee826aa1af56731f3310 to your computer and use it in GitHub Desktop.
Save tech-engine/b750d039198fee826aa1af56731f3310 to your computer and use it in GitHub Desktop.
Document Porting An Existing Ethereum DApp To Polyjuice - loadWeb3
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