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 send failed #4812

Closed
2 tasks done
asamuj opened this issue Apr 24, 2023 · 2 comments
Closed
2 tasks done

cast send failed #4812

asamuj opened this issue Apr 24, 2023 · 2 comments
Labels
T-bug Type: bug

Comments

@asamuj
Copy link

asamuj commented Apr 24, 2023

Component

Cast

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

cast 0.2.0 (dedc31e 2023-04-24T00:12:05.706154000Z)

What command(s) is the bug in?

cast send command

Operating System

macOS (Apple Silicon)

Describe the bug

when i execute the following command

cast send 0x5FbDB2315678afecb367f032d93F642f64180aa3  "setNumber(uint256)" 1  --private-key 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266

The error message is as follows:

Message:  assertion failed: `(left == right)`
  left: `20`,
 right: `32`
Location: /Users/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/generic-array-0.14.7/src/lib.rs:572

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   1: __mh_execute_header<unknown>
      at <unknown source file>:<unknown line>
   2: __mh_execute_header<unknown>
      at <unknown source file>:<unknown line>
   3: __mh_execute_header<unknown>
      at <unknown source file>:<unknown line>
   4: __mh_execute_header<unknown>
      at <unknown source file>:<unknown line>
   5: __mh_execute_header<unknown>
      at <unknown source file>:<unknown line>
   6: __mh_execute_header<unknown>
      at <unknown source file>:<unknown line>
   7: __mh_execute_header<unknown>
      at <unknown source file>:<unknown line>
   8: __mh_execute_header<unknown>
      at <unknown source file>:<unknown line>
   9: __mh_execute_header<unknown>
      at <unknown source file>:<unknown line>
  10: __mh_execute_header<unknown>
      at <unknown source file>:<unknown line>
  11: __mh_execute_header<unknown>
      at <unknown source file>:<unknown line>
  12: __mh_execute_header<unknown>
      at <unknown source file>:<unknown line>
  13: __mh_execute_header<unknown>
      at <unknown source file>:<unknown line>
  14: __mh_execute_header<unknown>
      at <unknown source file>:<unknown line>
  15: __mh_execute_header<unknown>
      at <unknown source file>:<unknown line>
  16: __mh_execute_header<unknown>
      at <unknown source file>:<unknown line>
  17: __mh_execute_header<unknown>
      at <unknown source file>:<unknown line>
  18: __mh_execute_header<unknown>
      at <unknown source file>:<unknown line>
  19: __mh_execute_header<unknown>
      at <unknown source file>:<unknown line>

Contract code:

// SPDX-License-Identifier: UNLICENSED
pragma solidity 0.8.17;

contract Number {
    uint256 private number;

    function setNumber(uint256 newNumber) public {
        number = newNumber;
    }

    function getNumber() public view returns (uint256) {
        return number;
    }
    
}
@asamuj asamuj added the T-bug Type: bug label Apr 24, 2023
@gakonst gakonst added this to Foundry Apr 24, 2023
@github-project-automation github-project-automation bot moved this to Todo in Foundry Apr 24, 2023
@DaniPopes
Copy link
Member

Your private key is not 32 bytes long. This is fixed in gakonst/ethers-rs#2363

@asamuj
Copy link
Author

asamuj commented Apr 24, 2023

thanks

@asamuj asamuj closed this as completed Apr 24, 2023
@github-project-automation github-project-automation bot moved this from Todo to Done in Foundry Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-bug Type: bug
Projects
Archived in project
Development

No branches or pull requests

2 participants