Skip to content

Conversation

@aalavandhan
Copy link
Member

@aalavandhan aalavandhan commented Apr 2, 2021

Fixes issues listed in #192

  • The orchestrator imports the entire UFragmentsPolicy.sol. The typical way to address this is to just import the relevant interface, instead of importing the full contract. This helps reduce the deployed contract size.
  • Use the revert message to indicate the index of the external call transaction which failed
  • Use non upgradable version of Ownable in The Orchestrator contract.

@aalavandhan aalavandhan requested review from ahnaguib, brandoniles and thegostep and removed request for brandoniles and thegostep April 2, 2021 17:13
@aalavandhan
Copy link
Member Author

@tedwu13 you can review this too

@@ -1,53 +1,72 @@
pragma solidity 0.7.6;
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity 0.8.2;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0.8 is really tempting but... the latest version that slither recommends is 0.7.6:
https://github.com/crytic/slither/wiki/Detector-Documentation#incorrect-versions-of-solidity
(changed just a few days ago from 0.6.11)

Are there any features from 0.8 that you need?

Copy link
Member Author

@aalavandhan aalavandhan Apr 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like keeping up with the latest version that openzeppelin contracts use is a good practice. They are up to 0.8x now

@thegostep thoughts?

constructor(address policy_) public {
Ownable.initialize(msg.sender);
policy = UFragmentsPolicy(policy_);
constructor(address policy_) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to call the base constructor too?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not really required with newer versions.
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol#L26

But will add it for the sake of being explicit

aalavandhan and others added 6 commits April 2, 2021 15:34
@aalavandhan aalavandhan changed the title Orchestrator V2 Orchestrator Updates Apr 5, 2021
@aalavandhan aalavandhan force-pushed the orch-v2 branch 2 times, most recently from 10ebf06 to 542d176 Compare April 5, 2021 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants