如何在管理员呼叫撤回方法之前启用2/3个Multisigs批准交易?
我的代码中有一个称为提取
的函数。我正在使用openzeppelin访问控件来限制对批准的经理的访问。但是,出于安全原因,我希望两个或多个其他管理员在将以太发送给所有者钱包之前批准该交易。这可能吗?
附加信息:
提取
方法应由经理调用,但必须由所有者Multisig批准- ,当前,附件的代码无法通过Multisig
- 我尝试过有关GNOSIS的合同互动,但是它失败的消息是“此交易将失败”的消息
function withdraw() onlyRole(managerRole) nonReentrant public returns(bool) {
(bool sent, ) = payable(msg.sender).call{value: getBalance()}("");
require(sent, "Ether not sent: transaction failed");
emit balanceWithdrawn(msg.sender, address(this).balance);
return true;
}
I have a function called withdraw
in my code. I am using OpenZeppelin access control to limit access to approved managers. However for security reasons, I want two or more other admins to approve that transaction before the ether is sent to the owner's wallet. Is this possible?
Additional info:
- The
withdraw
method should be called by the manager but must be approved by the owner multisig - Currently, the attached code doesn't go through the multisig
- I have tried contract interaction on gnosis safe, but it fails with a message of "this transaction will fail"
function withdraw() onlyRole(managerRole) nonReentrant public returns(bool) {
(bool sent, ) = payable(msg.sender).call{value: getBalance()}("");
require(sent, "Ether not sent: transaction failed");
emit balanceWithdrawn(msg.sender, address(this).balance);
return true;
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论