-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #265 from fei-protocol/feat/rollback
Add Roll changes to FIP-34
- Loading branch information
Showing
14 changed files
with
284 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,47 @@ | ||
{ | ||
"proposal_title": "FIP-35: Optimistic Minter", | ||
"proposal_title": "FIP-34: Optimistic Minter", | ||
"proposal_commands": [ | ||
{ | ||
"target": "core", | ||
"values": "0", | ||
"method": "grantMinter(address)", | ||
"arguments": ["{optimisticMinter}"], | ||
"description": "Grant Minter optimistic Minter" | ||
"description": "Grant FEI Minter role to optimistic Minter" | ||
}, | ||
{ | ||
"target": "core", | ||
"values": "0", | ||
"method": "grantMinter(address)", | ||
"arguments": ["{timelock}"], | ||
"description": "Grant FEI Minter to timelock" | ||
}, | ||
{ | ||
"target": "fei", | ||
"values": "0", | ||
"method": "mint(address,uint256)", | ||
"arguments": ["{optimisticTimelock}", "100000000000000000000000000"], | ||
"description": "Mint 100M FEI to OA timelock" | ||
} | ||
}, | ||
{ | ||
"target": "core", | ||
"values": "0", | ||
"method": "revokeMinter(address)", | ||
"arguments": ["{timelock}"], | ||
"description": "Revoke FEI Minter from timelock" | ||
}, | ||
{ | ||
"target": "tribe", | ||
"values": "0", | ||
"method": "setMinter(address)", | ||
"arguments": ["{feiDAOTimelock}"], | ||
"description": "Set TRIBE minter to FEI DAO timelock" | ||
}, | ||
{ | ||
"target": "feiDAO", | ||
"values": "0", | ||
"method": "updateTimelock(address)", | ||
"arguments": ["{feiDAOTimelock}"], | ||
"description": "Restore FEI DAO timelock" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import constructProposal from './constructProposal'; | ||
import { BigNumber } from 'ethers'; | ||
import { Interface } from '@ethersproject/abi'; | ||
import { utils } from 'ethers'; | ||
|
||
type ExtendedAlphaProposal = { | ||
targets: string[]; | ||
values: BigNumber[]; | ||
signatures: string[]; | ||
calldatas: string[]; | ||
description: string; | ||
}; | ||
|
||
/** | ||
* Take in a hardhat proposal object and output the proposal calldatas | ||
* See `proposals/utils/getProposalCalldata.js` on how to construct the proposal calldata | ||
*/ | ||
export async function constructProposalCalldata(proposalName: string): Promise<string> { | ||
const proposal = (await constructProposal(proposalName)) as ExtendedAlphaProposal; | ||
|
||
const proposeFuncFrag = new Interface([ | ||
'function propose(address[] memory targets,uint256[] memory values,bytes[] memory calldatas,string memory description) public returns (uint256)' | ||
]); | ||
|
||
const combinedCalldatas = []; | ||
for (let i = 0; i < proposal.targets.length; i++) { | ||
const sighash = utils.id(proposal.signatures[i]).slice(0, 10); | ||
combinedCalldatas.push(`${sighash}${proposal.calldatas[i].slice(2)}`); | ||
} | ||
|
||
const calldata = proposeFuncFrag.encodeFunctionData('propose', [ | ||
proposal.targets, | ||
proposal.values, | ||
combinedCalldatas, | ||
proposal.description | ||
]); | ||
|
||
return calldata; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
{ | ||
"fip_33" : { | ||
"fip_34" : { | ||
"deploy" : false | ||
}, | ||
"fip_35" : { | ||
"fip_37" : { | ||
"deploy" : false | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.