JS-SDK calls Sophia pass arrays how should be used


As Sophia showed above, how do you pass parameters through JS?

let migration = await migrationContractInstance.methods.migrationList([[["ak_KdJem6iXwEy6UYV9bM7DZrtbVgcBqHt17RiJtp9C7fumoXXqc","218928600000000000"],["ak_WNygcZgmxwxeeqgYEmLRwtmqQwQpBzU4nGDqruXpEoxrMWs5P","57260027700000000000"]],tokenDeploy.address], {
    gas: 133700000,
    ttl: 0
});


This call returns an error

2 Likes

Hey, you wrapped your last address param into the list ! :wink:

This is how it’s done:

[["ak_KdJem6iXwEy6UYV9bM7DZrtbVgcBqHt17RiJtp9C7fumoXXqc", 3], ["ak_KdJem6iXwEy6UYV9bM7DZrtbVgcBqHt17RiJtp9C7fumoXXqc", 3],["ak_KdJem6iXwEy6UYV9bM7DZrtbVgcBqHt17RiJtp9C7fumoXXqc", 3]], test
1 Like