关于编写合约铸造NFT同时转账的问题

修仙哥 修仙哥 提出于 2023-04-25 16:37 4536 浏览

代码如下:

function callClaim(uint128 nonce, bytes calldata signature, address referrer) public {
        itemContractAddress.delegatecall(
            abi.encodeWithSignature("mint(bytes)",  signature)
        );
 }

我想通过合约去目标合约铸造NFT,然后进行转账。简单讲就是想通过合约把两笔交易合在一起进行。

但是我看NFT铸造合约,有进行一个msg.sender的校验,导致合约是没资格领取的,有mint资格的是钱包地址。

image.png

所以我想是否能通过delegatecall去实现,测试发现还是一直校验不过。所以我想问问是否有什么写合约的方法能实现这个需求?还是说合约是没办法这么做的,目前只能使用flashbot来实现。

2 个回答

zen 2023-04-25 23:29
0xEthan 2023-04-26 09:57

写回答

你需要登录后才可以回答问题,登录