I'm trying to interact with this entrypoint using taquito
parameter pair
token_assets list($token_assets_item)
trigger_time timestamp
token_assets_item pair
amount nat
asset_id string
distribution list($distribution_item)
token_details $token_details
uncapped bool
distribution_item pair
beneficiary_address address
percentage nat
token_details pair
address address
decimals nat
is_fungible bool
token_type string
I'm using taquito to call the it like this -
const createUserMethod = contract.methods.createUserParam({
token_assets : [{
asset_id : "1",
amount : 100,
uncapped : false,
token_details : {
address : "KT...",
decimals : 10,
is_fungible : true,
token_type : "FA1.2"
},
distribution : [
{
beneficiary_address : "tz...",
percentage : 100
}
]
}] ,
trigger_time : Date.now()
})
But when I send() this method, I get this error -
ListValidationError {value: {…}, token: ListToken, name: 'ListValidationError', message: '[token_assets] Value must be an array'}
How can I fix this?
-- EDIT 1
Here is the 'value' field in ListValidationError
[
{
"asset_id": "1",
"amount": 100,
"uncapped": false,
"token_details": {
"address": "KT1KuoFrHs4bxRbLRm79qGs69xP93hKVnsD9",
"decimals": 10,
"is_fungible": true,
"token_type": "FA1.2"
},
"distribution": [
{
"beneficiary_address": "tz1VSUr8wwNhLAzempoch5d6hLRiTh8Cjcjb",
"percentage": 100
}
]
}
]
value
inListValidationError
so we can see which value triggered the error?Date.now()
withnew Date(Date.now()).toISOString()
and see what happens?