-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REMIX IDE - web3-lib.ts
and deploy_with_web3.ts
scripts are not working
#24
Comments
I was checking this in December and it was working fine. @pgherveou maybe it is related to gas encoding changes? |
I think this might be related to how web3.js estimates gas when deploying the transaction. I've been able to deploy successfully using ethers.js, and the snippets are very similar. That's the only difference I've found, it's probably worth investigating that point @smiasojed @pgherveou |
Yes, the web.js and ether.js get different gas estimations for the same transaction. The change which has been done is in gas encoding area so this is why I pointed this out. |
@smiasojed Could you please let me know if there is a solution for this issue? I'm trying to run the script locally to document web3js tailored for asset hub smart contracts, and this is a blocker |
It is likely that it will be fixed by this: paritytech/polkadot-sdk#7281 You can try to run latest master if you don't wanna wait until this gets deployed to Westend. |
@athei thanks! Could you please ping me when this is deployed to Westend? |
It was deployed yesterday afternoon already: https://assethub-westend.subscan.io/extrinsic/10597534-0?event=10597534-1 Can you still reproduce? |
Please modify web3-lib.ts to:
@nhussein11 please let me know if it helps |
Thanks, @smiasojed , but I tried it out and still getting: I copied and pasted your snippet in the It seems that it's failing in the following line: const accounts = await web3.eth.getAccounts() Since I can log const metadata = JSON.parse(await remix.call('fileManager', 'getFile', artifactsPath))
console.log("metadata", metadata)
const accounts = await web3.eth.getAccounts()
console.log("accounts", accounts) |
@nhussein11 Please select Westend network in |
That worked! Many thanks @smiasojed!! |
@smiasojed will the REMIX IDE be updated with the script you shared previously? |
yes, I am working on an update. I will do it next week. |
Looked into it, |
Ok this seems to be the main reason defaultMaxPriorityFeePerGasThe The default value of |
@pgherveou I’m trying to run the
web3-lib.ts
anddeploy_with_web3.ts
scripts on the Polkadot Remix IDE to check if the code is accurate because I need to replicate the script locally. However, when I run the script, it doesn’t work; the terminal only logs:web3-lib.ts
code:And
deploy_with_web3.ts
code:In case it helps, this is the smart contract I'm using,
Counter.sol
:The text was updated successfully, but these errors were encountered: