Skip to content
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

Address ERC2 wrapper improvements #727

Closed
wants to merge 6 commits into from

Conversation

rrw-zilliqa
Copy link
Contributor

Draft PR for ERC2 wrapper improvements.

* @param tran_name The name of the function to call
* @param arg1 The first argument to the function
*/
function callu128(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW Solidity allows function overloading based on parameter types, so we could still name this call?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could, but when I try it, it fails to resolve .. I'll try again, but :-(

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmph. It works now - sorry & thanks for the spot! Will update - confusingly, the other PR .. sorry!

// ZRC2 addresses frequently have bad checksums, hence toLowerCase().
const contract = await ethers.deployContract("ZRC2ERC20Proxy",
[zrc2Address.toLowerCase()],
{ gasLimit: 1_000_000 });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is setting the gasLimit necessary? (i.e. does estimate gas fail/lie for these transactions?)

Setting a fixed limit means this can break if gas charges change in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well caught - sorry again - inherited from previous script for no reason I could see. Will fix in other PR ..

@rrw-zilliqa
Copy link
Contributor Author

Closing this PR in favour of #729 . which no longer has the abortive attempt to switch to foundry.

@rrw-zilliqa rrw-zilliqa deleted the users/richard/721-erc2-wrapper branch October 3, 2024 07:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants