-
Notifications
You must be signed in to change notification settings - Fork 79
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
chore(mcopy): add contract with test #1583
Conversation
actors/evm/tests/basic.rs
Outdated
|
||
let mut solidity_params = vec![]; | ||
|
||
solidity_params.append(&mut hex::decode("73358055").unwrap()); // function selector, "optimizedCopy(bytes)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this is a number you got from solidity? Are you sure this is hex?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh. I guess it is.
actors/evm/tests/basic.rs
Outdated
let mut solidity_params = vec![]; | ||
|
||
solidity_params.append(&mut hex::decode("73358055").unwrap()); // function selector, "optimizedCopy(bytes)" | ||
solidity_params.append(&mut "testdata".as_bytes().to_vec()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs to be encoded as valid solidity ABI. You can use ethers if you want the "easy" way to call things, or you can manually encode it.
I've pushed a fix. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll approve since @Stebalien has effectively reviewed/approved and @rvagg won't be able to approve his own PR.
No description provided.