explorer icon indicating copy to clipboard operation
explorer copied to clipboard

[sandbox] (optional uint) shown as uint

Open friedger opened this issue 4 years ago • 3 comments

Describe the bug A contract has a parameter of type (optional uint), but the transaction is sent as uint.

To Reproduce

  1. On testnet, use contract ST2PABAF9FTAJYNFZH93XENAJ8FVY99RRM4DF2YCW.boom-pool-nfts-v1 function delegate-stx
  2. enter stacker: ST2PABAF9FTAJYNFZH93XENAJ8FVY99RRM4DF2YCW, amount: 100, until-burn-ht: 10000000
  3. click "call function"
  4. confirm in stacks web wallet
  5. see error BadFunctionArguments

node response:

{"error":"transaction rejected","reason":"BadFunctionArgument","reason_data":{"message":"TypeError(OptionalType(UIntType), UIntType)"},"txid":"4d05aefb7c94f64341e6996b023c46a04150fe516cb16cbe5f873014e82014a2"}

Screenshots

Screenshot from 2021-03-23 08-55-25

until-burn-ht shown as uint Screenshot from 2021-03-23 09-04-43

Additional Context Contract deployment: https://explorer.stacks.co/txid/ST2PABAF9FTAJYNFZH93XENAJ8FVY99RRM4DF2YCW.boom-pool-nfts-v1?chain=testnet

Line 68: Screenshot from 2021-03-23 09-04-17

friedger avatar Mar 23 '21 08:03 friedger

@obycode is this still a thing on the sandbox?

andresgalante avatar Aug 04 '22 19:08 andresgalante

Yes, it looks like it still is an issue.

obycode avatar Aug 05 '22 01:08 obycode

You can use this contract on testnet for a simple reproducer: ST1SJ3DTE5DN7X54YDH5D64R3BCB6A2AG2ZQ8YPD5.nearby-magenta-termite

obycode avatar Aug 05 '22 01:08 obycode