DistributedCollective / DistributedCollective/Sovryn-smart-contracts
Refactor protocol pauser
@smbsp is already working on this.
Since Jul 14, 2021.
- Dominant language
- JavaScript
- Stars
- 132
- Forks
- 57
- PR merge metrics
- No merged PRs in 30d
Description
https://github.com/DistributedCollective/Sovryn-smart-contracts/pull/311
as discussed primarily with @smbsp
e.g. in _setTarget(this.swapExternal.selector, target);
this.swapExternal.selector
is replaced for
this.swapExternal.selector^this.xor.selector (which should be a constant - )
in all modules
that will lead to calling non-existing functions from the protocol meaning that all the calls will be transferred to the fallback function
so, add fallback functions to all modules which will serve as a hook prior to calling any module function
in the fallback function:
- check that the protocol is not on pause and virtually any preliminary processing
- xor func sig again to restore true func sig
- check that the true sig exists
- call the function with the tru func sig
verify
- possible gas limit with the fallback function
- check each function call gas overhead
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.