gpt4 book ai didi

nearprotocol - 智能合约 panic : Sender and receiver should be different

转载 作者:行者123 更新时间:2023-12-05 03:16:47 24 4
gpt4 key购买 nike

我有一个 stake_token 函数,它使用 ft_transfer_call 将 token 从签名者地址转移到当前合约地址 Here is the code and the error

在 cmd 中,我有一个调用 stake_token 函数的脚本。签名者是 tungleanh.testnet,接收者是当前账户 ID,即 77037 账户。为什么返回 Sender and receiver should be different 错误?

最佳答案

在第 92 行,合约尝试将 FT 代币转移到 env::current_account_id()。这将评估为契约(Contract)名称,因此开发帐户以 77037 结尾。您正在调用该帐户函数,从而尝试向其自身发送资金。

关于nearprotocol - 智能合约 panic : Sender and receiver should be different,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74469823/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com