30 tronweb多重签名的问题

我现在代码是直接从官网接口抄过来的 https://cn.developers.tron.network/docs/multi-signature-example-process-flow

    let pk0 = "7e32ad0cb614b39146c4d5e58a6fc96eaa7569ae10d5ca36fe2dc626b32feb98";
    let pk1 = "afa1b3926faa2761033094bb700681c4efa58be81f85e8e07ddd3b42f345cf2f";
    let pk2 = "95a2383edfa4c2f8de80b62d8cab146575998922d4887f6f52ac5512c8efbf0d";
    const ermissionId = 2;
    if (window.tronWeb && window.tronWeb.defaultAddress.base58) {
        try {
            var fromAddress = “416473f996f4a14eac6770aee5bc2f03954f0770ed”;
            var toAddress =“41210bb2c96888020449a4f9018d6288daf4003237”;
            var amount = 100000000; 
            // 目前代码执行不到此行
            let originalTransaction = await tronWeb.transactionBuilder.sendTrx(toAddress, amount, fromAddress);
            let signedTransaction = await tronWeb.trx.multiSign(originalTransaction, pk0, ermissionId);
            signedTransaction = await tronWeb.trx.multiSign(signedTransaction, pk1, ermissionId);
            signedTransaction = await tronWeb.trx.multiSign(signedTransaction, pk2, ermissionId);

        } catch (e) {
            console.log(e);
        }
    }

代码提示错误如下

image.png 上面的pk0,pk1,pk2,这里是另外3个地址的密钥,请问这里是有什么问题吗

请先 登录 后评论

2 个回答

Tiny熊
  擅长:智能合约,以太坊
请先 登录 后评论
捡起芝麻掉了瓜
请先 登录 后评论
  • 2 关注
  • 0 收藏,2254 浏览
  • hjl8419 提出于 2023-01-18 15:38