Zondax / filecoin-solidity

Filecoin Solidity API Library
Apache License 2.0
93 stars 43 forks source link

Actor.sol:120: Use of delegatecall is not allowed #368

Open ttsszzyy opened 1 year ago

ttsszzyy commented 1 year ago

Error: Contract contracts/Miner.sol:Miner is not upgrade safe

@zondax/filecoin-solidity/contracts/v0.8/utils/Actor.sol:120: Use of delegatecall is not allowed https://zpl.in/upgrades/error-002

使用hardhat做可升级部署时,出现了这个错误。升级方案用的是uups模式。

:link: zboto Link

rllola commented 1 year ago

FEVM only allow delegatecall to call actor.

raulk commented 1 year ago

This can be solved in Solidity like Alex Wade solved it here: https://github.com/wadealexc/fevmate/blob/main/contracts/utils/CallNative.sol#L53-L63

This basically "hides" the delegatecall from the compiler; it's not the best solution but it works today.

Related discussion: https://filecoinproject.slack.com/archives/C029MT4PQB1/p1682349651342079

ttsszzyy commented 1 year ago

HI,

It is my pleasure to join the discussion, however, I used different email address for slack, could please invite @. @.> to the slack channel instead of this one.

Best Regards Young

2023年4月26日 21:27,raulk @.***> 写道:

This can be solved in Solidity like Alex Wade solved it here: https://github.com/wadealexc/fevmate/blob/main/contracts/utils/CallNative.sol#L53-L63

This basically "hides" the delegatecall from the compiler; it's not the best solution but it works today.

Related discussion: https://filecoinproject.slack.com/archives/C029MT4PQB1/p1682349651342079

— Reply to this email directly, view it on GitHub https://github.com/Zondax/filecoin-solidity/issues/368#issuecomment-1523423620, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACJUMGF4V6LC74M7QMQ7JHLXDEPE5ANCNFSM6AAAAAAXL43WAI. You are receiving this because you authored the thread.