BNB 链上的相同合约失败,但在 ETH 上运行
我有两个相同 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
每个连锁店的津贴都不同。
您需要在您想要给予津贴的每个链上调用
approve
函数。The allowance is different for every chain.
You need to call the
approve
function on each chain where you want to give allowance.