Skip to content

Fix ABI handling for dynamic cross-contract calls#36

Open
shawntabrizi wants to merge 2 commits intocharles/cdm-integrationfrom
codex/fix-cdm-integration-audit
Open

Fix ABI handling for dynamic cross-contract calls#36
shawntabrizi wants to merge 2 commits intocharles/cdm-integrationfrom
codex/fix-cdm-integration-audit

Conversation

@shawntabrizi
Copy link
Copy Markdown
Member

Summary

  • fix the generated ABI encoders and decoders so mixed returns, dynamic tuples, arrays, and named tuple outputs follow Solidity head/tail rules
  • fetch cross-contract return data by runtime size, add tuple slot-size handling for custom SolAbi types, and fix dynamic SolAbi decode paths for derived structs and Option values
  • add regression coverage for nested dynamic abi_import inputs, unnamed ABI args, dynamic array and tuple decoding, and dynamic top-level return decoding

Testing

  • cargo test -p pvm-contract-macros
  • cargo test -p pvm_contract
  • cargo test (still fails in the existing cargo-pvm-contract scaffold CLI tests because they expect the removed --init-type flag)

@smiasojed
Copy link
Copy Markdown
Contributor

The ABI handling has changed on the main branch, so I’m not sure it makes sense to keep fixing this branch, as it will probably never be merged into main.

What I think is that we should move the functionality from this branch to main and start using it as soon as possible, so we don’t double the work.
@charlesHetterich WDYT?

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