invokeMultiple
最后更新于
neolineN3.invokeMultiple({
invokeArgs: [
{
scriptHash: "ef4073a0f2b305a38ec4050e4d3d28bc40ea63f5",
operation: "transfer",
args: [
{
type: "Address",
value: "NaUjKgf5vMuFt7Ffgfffcpc41uH3adx1jq",
},
{
type: "Address",
value: "NaUjKgf5vMuFt7Ffgfffcpc41uH3adx1jq",
},
{
type: "Integer",
value: "1",
},
{
type: "Any",
value: null
}
]
},
{
scriptHash: "ef4073a0f2b305a38ec4050e4d3d28bc40ea63f5",
operation: "transfer",
args: [
{
type: "Address",
value: "NaUjKgf5vMuFt7Ffgfffcpc41uH3adx1jq",
},
{
type: "Address",
value: "NPsCvedTnzGcwSYuoxjh7Sec5Zem2vgVmX",
},
{
type: "Integer",
value: "1",
},
{
type: "Any",
value: null
}
]
}
],
fee: '0.001',
broadcastOverride: true,
signers: [
{
account: "2cab903ff032ac693f8514581665be534beac39f",
scopes: 1
}
]
})
.then(({txid, nodeURL}: InvokeOutput) => {
console.log('Invoke transaction success!');
console.log('Transaction ID: ' + txid);
console.log('RPC node URL: ' + nodeURL);
})
.catch((error) => {
const {type, description, data} = error;
switch(type) {
case 'NO_PROVIDER':
console.log('No provider available.');
break;
case 'RPC_ERROR':
console.log('There was an error when broadcasting this transaction to the network.');
break;
case 'CANCELED':
console.log('The user has canceled this transaction.');
break;
default:
// Not an expected error object. Just write the error to the console.
console.error(error);
break;
}
});{
txid: '0xd6e4edeb66a75b79bec526d14664017eef9ccee5650c32facb1a4d4fe3640808',
nodeURL: 'https://neo3-testnet.neoline.vip'
};