BNB 链上的相同合约失败,但在 ETH 上运行

发布于 2025-01-14 00:37:40 字数 675 浏览 4 评论 0原文

我有两个相同 ERC20 代码的合约,但在 BNB 链上功能失败,例如津贴,而在以太坊上则没有问题。

我似乎无法理解为什么,我以前从未见过这种情况发生。我也在 Fantom 测试网上进行了测试,也失败了。

https://ropsten.etherscan.io/address/0xe95fc92e1ae8b46e83fc970f9a5f28c9439839ff#readContract

https://testnet.bscscan.com/address/0x6f74C965Fe9A27d3A84c88c83F4700351b0c2e8d#readContract

津贴返回uint256:错误:{“jsonrpc”中的错误响应 ID“0”(预期:“8”): BNB链上的“2.0”

并传递ETH

I have two contracts of identical ERC20 code, but on BNB chain the functions fail, such as allowance, and on Ethereum they are fine.

I can't seem to understand why, I've never seen this happen before. I tested on Fantom testnet as well, and it also fails.

https://ropsten.etherscan.io/address/0xe95fc92e1ae8b46e83fc970f9a5f28c9439839ff#readContract

https://testnet.bscscan.com/address/0x6f74C965Fe9A27d3A84c88c83F4700351b0c2e8d#readContract

Allowance returns uint256 : Error: Wrong response id "0" (expected: "8") in {"jsonrpc":"2.0" on BNB chain

And passes on ETH

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

浮光之海 2025-01-21 00:37:40

每个连锁店的津贴都不同。

您需要在您想要给予津贴的每个链上调用 approve 函数。

The allowance is different for every chain.

You need to call the approve function on each chain where you want to give allowance.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文