我正在尝试广播具有以下操作的事务:
actions: [
transactions.createAccount(),
transactions.transfer(new BN(swapParams.value.toFixed())),
transactions.deployContract(new Uint8Array(bytecode)),
transactions.functionCall(
ABI.init.method,
{
secretHash: Buffer.from(swapParams.secretHash, 'hex').toString('base64'),
expiration: `${toNearTimestampFormat(swapParams.expiration)}`,
buyer: swapParams.recipientAddress
},
new BN(ABI.init.gas),
new BN(0)
)
]但是当我调用
const tx = await from.signAndSendTransaction(addressToString(options.to), options.actions)我收到下面的callstack:

你知道原因是什么吗?
我正在使用:
near-js-api: 0.39.0
发布于 2021-08-16 09:23:13
根据documentation,source code, and defined types signAndSendTransaction应该只有一个参数(具有receiverId和actions字段的对象):
const tx = await from.signAndSendTransaction({
receiverId: addressToString(options.to),
actions: options.actions
})有没有一个例子/文档误导了你,所以你带着这个函数调用接口来到这里?我们应该解决这个问题。
https://stackoverflow.com/questions/68799878
复制相似问题