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

Cast seems to be missing support for legacy transactions on BSC #579

Closed
0xca11 opened this issue Jan 25, 2022 · 1 comment · Fixed by #626
Closed

Cast seems to be missing support for legacy transactions on BSC #579

0xca11 opened this issue Jan 25, 2022 · 1 comment · Fixed by #626
Labels
C-cast Command: cast D-easy Difficulty: easy first issue A good way to start contributing T-bug Type: bug

Comments

@0xca11
Copy link

0xca11 commented Jan 25, 2022

When trying to make a function call to a contract on BSC using cast send, it fails with custom error: EIP-1559 not activated.

I've been able to deploy contracts to BSC using forge create --legacy, but that legacy parameter seems to be missing from cast.

Is there another way to send legacy, non-EIP-1559 transactions when using cast?

If not, I think it's a feature worth adding, as right now, cast doesn't automatically detect that BSC is being used and that it doesn't support EIP-1559.

@mattsse
Copy link
Member

mattsse commented Jan 25, 2022

we already have

https://github.com/gakonst/foundry/blob/ff46022b58f6653ef4fc77536b0f8f6a3bb71f7e/cli/src/cmd/create.rs#L121-L132

but this is only in use for create rn

In send we're currently limited to Eip1559

https://github.com/gakonst/foundry/blob/9de25d1928da362cd3b185ebaccc0e3d00aee2c8/cast/src/lib.rs#L234

adding a similar is_legacy check should do the trick here as well

this leaves us with two tasks

  • add BSC id to is_legacy
  • check is_legacy is in build_tx (should perhaps return TypedTransaction?)

@onbjerg onbjerg added C-cast Command: cast T-bug Type: bug D-easy Difficulty: easy first issue A good way to start contributing labels Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-cast Command: cast D-easy Difficulty: easy first issue A good way to start contributing T-bug Type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants