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

chore(mcopy): add contract with test #1583

Merged
merged 2 commits into from
Oct 8, 2024
Merged

chore(mcopy): add contract with test #1583

merged 2 commits into from
Oct 8, 2024

Conversation

rvagg
Copy link
Member

@rvagg rvagg commented Oct 8, 2024

No description provided.


let mut solidity_params = vec![];

solidity_params.append(&mut hex::decode("73358055").unwrap()); // function selector, "optimizedCopy(bytes)"
Copy link
Member

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?

Copy link
Member

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.

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());
Copy link
Member

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.

@BigLep BigLep assigned BigLep and snissn and unassigned BigLep Oct 8, 2024
@Stebalien
Copy link
Member

I've pushed a fix.

@BigLep BigLep marked this pull request as ready for review October 8, 2024 16:39
Copy link
Member

@BigLep BigLep left a 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.

@Stebalien Stebalien added this pull request to the merge queue Oct 8, 2024
Merged via the queue into master with commit 12d9af8 Oct 8, 2024
12 checks passed
@Stebalien Stebalien deleted the rvagg/mcopy-int branch October 8, 2024 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ☑️ Done (Archive)
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

4 participants