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

代码如下:

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
请先 登录 后评论
Meta - 风是自由的,你也是
请先 登录 后评论