[英]Call function of a already deployed smart contract from within my smart contract
i want to call the openTrade() function of this smart contract https://polygonscan.com/address/0xd8D177EFc926A18EE455da6F5f6A6CfCeE5F8f58#code (starts at line 371) from within my smart contract.我想从我的智能合约中调用此智能合约的 openTrade() 函数https://polygonscan.com/address/0xd8D177EFc926A18EE455da6F5f6A6CfCeE5F8f58#code (从第 371 行开始)。
I have read about the ABI but this does not seem to work.我已阅读有关 ABI 的信息,但这似乎不起作用。 What steps do i need to take ?
我需要采取哪些步骤? Copy paste the whole smart contract into my visual studio code and import it into my contract?
将整个智能合约复制粘贴到我的 Visual Studio 代码中并将其导入我的合约中?
How can i just call this specific function ?我怎样才能调用这个特定的函数?
Thank you so much guys !十分感谢大家 !
This is the decription of the function you want to call:这是您要调用的函数的说明:
function openTrade(...) external notContract notDone { ... }
As you can see there is notContract
modifier applied to this function.如您所见,此函数应用了
notContract
修饰符。 An this is implementation of the modifier:这是修饰符的实现:
modifier notContract(){ require(tx.origin == msg.sender); _; }
It means that openTrade
function can not be called from the other contracts.这意味着不能从其他合约调用
openTrade
函数。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.