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

Can't call function with traits on mocknet #279

Closed
friedger opened this issue Oct 7, 2020 · 3 comments
Closed

Can't call function with traits on mocknet #279

friedger opened this issue Oct 7, 2020 · 3 comments

Comments

@friedger
Copy link
Contributor

friedger commented Oct 7, 2020

Describe the bug
Running the latest docker image with mocknet, I am not able to call bid function the market contract. The tx is rejected with

{"error":"transaction rejected","reason":"BadFunctionArgument","reason_data":{"message":"TypeError(TraitReferenceType(TraitIdentifier { name: ClarityName(\"tradables-trait\"), contract_identifier: QualifiedContractIdentifier { issuer: StandardPrincipalData(26, [22, 66, 71, 214, 242, 180, 37, 172, 87, 113, 66, 58, 230, 200, 12, 117, 79, 113, 114, 176]), name: ContractName(\"tradables\") } }), PrincipalType)"},"txid":"5ff5a3b2d461c96940d56d0d4edda504c4886c8e97a470fab412bc3152922a02"}

The krypton testnet accepts the bid transaction...

To Reproduce
Steps to reproduce the behavior:

  1. Launch mocknet docker image
  2. Launch ux/package/app locally on branch fix/network
  3. Launch speed-spend locally with settings for local mockent
  4. Goto localhost:3000/monsters
  5. Create a monster
  6. Bid for a monster with id 1
  7. After Connect opened the authenticator, click confirm
  8. See rejected transaction

Expected behavior
Transaction should be broadcast (like on testnet)

Desktop (please complete the following information):
localhost:3999/v2/info returns:

   
peer_version 385875968
burn_consensus "cb65b409713a273fe9be8d4a6cdb5cf23f14a6ad"
burn_block_height 116
stable_burn_consensus "575634bd51778613e3f731fa3f121eeb4e7362c3"
stable_burn_block_height 115
server_version "blockstack-core 0.0.1 => 23.0.0.0 (master:3ab8039c3, release build, linux [x86_64])"
network_id 2147483648
parent_network_id 3669344250
stacks_tip_height 115
stacks_tip "5455786f6e3bd61c374255d231ba453b7ae7901bbdf7c1d96373e92779f4f2f7"
stacks_tip_burn_block "82da01b03500436694648ed912c855a762b95466453720a67df33cc2b07cad3d"
unanchored_tip "0000000000000000000000000000000000000000000000000000000000000000"
exit_at_block_height null
@friedger
Copy link
Contributor Author

friedger commented Oct 7, 2020

Looks likes the same as stacks-archive/stacks-transactions-js#92

Maybe the mocknet image is not up-to-date with Clarity?

@friedger friedger changed the title Can't call function with traits Can't call function with traits on mocknet Oct 7, 2020
@friedger
Copy link
Contributor Author

friedger commented Oct 7, 2020

fixed by #281

@friedger friedger closed this as completed Oct 7, 2020
@psq
Copy link
Contributor

psq commented Oct 8, 2020

I always build all my mocknet setup from scratch, but that was probably caused by outdated code. There is no reason I can come up with that would result in a different behavior between testnet and mocknet

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

No branches or pull requests

2 participants