Skip to content

feat: call contract method with mutiple params #170

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

Merged
merged 3 commits into from
Mar 10, 2022
Merged

feat: call contract method with mutiple params #170

merged 3 commits into from
Mar 10, 2022

Conversation

luizstacio
Copy link
Member

@luizstacio luizstacio commented Mar 10, 2022

Summary

  • Fix encode for call a contract with multiple params;
  • Add complementary tests on package provider
  • Remove isStruct from the encoded interface

Contract example;

abi TestContract {
  fn foo(value: u64) -> u64;
  fn boo(value: TestStruct) -> TestStruct;
  fn barfoo(value: u64) -> u64;
  fn foobar(value: ()) -> u64;
  fn foobar_no_params() -> u64;
  fn sum(a: u64, b: u64) -> u64;
  fn sum_test(a: u64, test: SumStruct) -> u64;
  fn sum_single(test: SumStruct) -> u64;
  fn sum_multparams(a: u64, b: u64, c: u64, d: u64, e: u64) -> u64;
  fn echo_b256(a: b256) -> b256;
  fn add_ten(param: SingleParamStruct) -> u64;
}

@luizstacio luizstacio requested review from AlicanC and QuinnLee March 10, 2022 05:27
@luizstacio luizstacio self-assigned this Mar 10, 2022
QuinnLee
QuinnLee previously approved these changes Mar 10, 2022
@adlerjohn adlerjohn marked this pull request as ready for review March 10, 2022 13:38
@luizstacio luizstacio marked this pull request as draft March 10, 2022 13:41
@luizstacio luizstacio marked this pull request as ready for review March 10, 2022 15:18
Copy link
Contributor

@QuinnLee QuinnLee left a comment

Choose a reason for hiding this comment

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

lgtm

Can you add an issue to add more struct tests on the abi coder? I think we may need to update/add more

@luizstacio
Copy link
Member Author

lgtm

Can you add an issue to add more struct tests on the abi coder? I think we may need to update/add more

#171

@AlicanC AlicanC mentioned this pull request Mar 10, 2022
@luizstacio luizstacio merged commit ca7da40 into FuelLabs:master Mar 10, 2022
petertonysmith94 pushed a commit that referenced this pull request Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants