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

Type Arguments Error #4123

Closed
bitweedx86 opened this issue Aug 18, 2022 · 4 comments · Fixed by #4544
Closed

Type Arguments Error #4123

bitweedx86 opened this issue Aug 18, 2022 · 4 comments · Fixed by #4544
Assignees

Comments

@bitweedx86
Copy link

bitweedx86 commented Aug 18, 2022

Steps to Reproduce Issue

Publish the sui_programmatically example of defi/pool And in the CLI, trying to call the create_pool_ method.

The following command is my command; the object might disappear after the next devnet upgrade. Better to replace with your own objects.

sui client call --package 0xe1f9565ef0d24e8194908d8f60acd56a754794e3 --module pool --function create_pool_ --gas-budget 10000 --args 0xba4706ac29a46be29dd4692569fa4aaf1c013e4a 0xc7e9cf1186a2fa3a4c648a3c471f646a1743d78a 0x90708284b86931979d41630462f7851a6b0a874e 1 --type-args 0x2::sui::SUI 0xb98017deb22d367d4de66418fa2a4c16cb8259ba::erc20::ERC20

Expected Result

The pool is successfully created.

Actual Result

RPC call failed: ErrorObject { code: ServerError(-32000), message: "ExecutionError: ExecutionError { inner: ExecutionErrorInner { kind: EntryArgumentError(EntryArgumentError { argument_idx: 0, kind: TypeMismatch }), source: Some(\"Expected argument of type T0, but found type 0x2::coin::Coin<0x2::sui::SUI>\") } }", data: None }

System Information

  • OS: macOS 12.5
  • Compiler: rustc 1.62.1 (e092d0b6b 2022-07-16)
@bitweedx86
Copy link
Author

The ERC20 is a minimal implementation of the custom token, a variation from the official examples.

@damirka
Copy link
Contributor

damirka commented Sep 9, 2022

Hey @bitweed, do you mind sharing the code for the ERC20 coin? Is it a Coin still?

@damirka damirka self-assigned this Sep 9, 2022
@awelc
Copy link
Contributor

awelc commented Sep 9, 2022

It looks like the list of arguments passed to the entry function does not include the witness argument. I am not sure if it's even possible to pass a witness from CLI at this point (@damirka, @patrickkuo)?

@damirka
Copy link
Contributor

damirka commented Sep 9, 2022

Ah! Now I see what's the problem! We can't pass a witness in an entry point. Sorry for that. I should redesign pool to either create a custom LP coin which will target a pool or keep as is just remove entry.

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 a pull request may close this issue.

3 participants