Skip to content

Instantly share code, notes, and snippets.

@ItasMattWebb
Last active November 19, 2022 03:24
Show Gist options
  • Save ItasMattWebb/ba0feaa95508b8fa9909de3f6f7ac58e to your computer and use it in GitHub Desktop.
Save ItasMattWebb/ba0feaa95508b8fa9909de3f6f7ac58e to your computer and use it in GitHub Desktop.
TypeParameter wallet bug
Error: Transaction failed with the following error. Error constructing a move call: Error: Unknown call arg type {
"TypeParameter": 0
} for value "0x3224fea700ff7302e661824c068c59ad00612498" args
{
"arguments":["0xf2bf6b41cff97381a0fcd6b310ee9123fdaef8ba","0x3224fea700ff7302e661824c068c59ad00612498",1000000000],
"function":"list",
"gasBudget":2000,
"module":"marketplace_nofee",
"packageObjectId":"0xbe158a23884733e5c43112a0e1720a808e8e34da",
"typeArguments":["0x2::devnet_nft::DevNetNFT","0x2::sui::SUI"]
}
// This one doesn't work
public entry fun list<T: key + store, C>(
_marketplace: &mut Marketplace,
item: T,
ask: u64,
ctx: &mut TxContext
)
// in contrast, this one does.
public entry fun buy_and_take<T: key + store, C>(
_marketplace: &mut Marketplace,
listing_id: ID,
paid: Coin<C>,
ctx: &mut TxContext
)
-Possibly a problem with using the "T" type as an argument?
-Seems to work fine with the RawSigner from @mysten/sui.js, but fails with the browser extensions (Sui/Ethos Wallets) I've tested with.
-The type can be anything, it'll throw the same error for anything I've tried to throw at it.
-Not sure when it started happening, but probably around the time of version 13?
-"I suspect this may have to do with the LocalTxnDataSerializer, I think both the sui wallet and ethos wallet are currently using it but the email wallet may not be yet" says Jared
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment