-
Notifications
You must be signed in to change notification settings - Fork 98
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 #900 from fei-protocol/auto-register-metadata
Auto generate metadata for TC proposals
- Loading branch information
Showing
8 changed files
with
120 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
15018600 | ||
15039959 |
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,37 +1,5 @@ | ||
import { ProposalCategory, TemplatedProposalsConfigMap } from '@custom-types/types'; | ||
|
||
import tip_117 from '@proposals/description/tip_117'; | ||
import pod_exec_v2 from '@proposals/description/pod_exec_v2'; | ||
import tip_115 from '@proposals/description/tip_115'; | ||
|
||
const proposals: TemplatedProposalsConfigMap = { | ||
tip_117: { | ||
deploy: false, // deploy flag for whether to run deploy action during e2e tests or use mainnet state | ||
totalValue: 0, // amount of ETH to send to DAO execution | ||
proposal: tip_117, // full proposal file, imported from '@proposals/description/fip_xx.ts' | ||
proposalId: '', | ||
affectedContractSignoff: [], | ||
deprecatedContractSignoff: [], | ||
category: ProposalCategory.DAO | ||
}, | ||
tip_115: { | ||
deploy: false, // deploy flag for whether to run deploy action during e2e tests or use mainnet state | ||
totalValue: 0, // amount of ETH to send to DAO execution | ||
proposal: tip_115, // full proposal file, imported from '@proposals/description/fip_xx.ts' | ||
proposalId: '', | ||
affectedContractSignoff: [], | ||
deprecatedContractSignoff: [], | ||
category: ProposalCategory.TC | ||
}, | ||
pod_exec_v2: { | ||
deploy: false, // deploy flag for whether to run deploy action during e2e tests or use mainnet state | ||
totalValue: 0, // amount of ETH to send to DAO execution | ||
proposal: pod_exec_v2, // full proposal file, imported from '@proposals/description/fip_xx.ts' | ||
proposalId: '', | ||
affectedContractSignoff: [], | ||
deprecatedContractSignoff: [], | ||
category: ProposalCategory.TC | ||
} | ||
}; | ||
const proposals: TemplatedProposalsConfigMap = {}; | ||
|
||
export default proposals; |
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,36 @@ | ||
import { computeBatchProposalId } from '@scripts/utils/constructProposalCalldata'; | ||
import { expect } from 'chai'; | ||
import { BigNumber } from 'ethers'; | ||
|
||
const toBN = BigNumber.from; | ||
|
||
describe('Compute proposal ID off-chain', () => { | ||
it('should compute proposalId for a batched proposal', () => { | ||
// Fixture is a real-transaction submitted on-chain | ||
const expectedProposalId = '0x81c419dbb3c44645493c214eee0ceaf273ba870d1e7e1c48422e2762f60e0db4'; | ||
const targets = [ | ||
'0x02435948F84d7465FB71dE45ABa6098Fc6eC2993', | ||
'0x02435948F84d7465FB71dE45ABa6098Fc6eC2993', | ||
'0x02435948F84d7465FB71dE45ABa6098Fc6eC2993', | ||
'0xF7991f4698ffb6716982aec7F78964Dd731C4A54', | ||
'0xFF6f59333cfD8f4Ebc14aD0a0E181a83e655d257', | ||
'0xFF6f59333cfD8f4Ebc14aD0a0E181a83e655d257', | ||
'0x98E5F5706897074a4664DD3a32eB80242d6E694B' | ||
]; | ||
const values = [toBN(0), toBN(0), toBN(0), toBN(0), toBN(0), toBN(0), toBN(0)]; | ||
const payloads = [ | ||
'0x8320357d00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000f7991f4698ffb6716982aec7f78964dd731c4a54', | ||
'0xfe68d76e0000000000000000000000005b86887e171bae0c2c826e87e34df8d558c079b9000000000000000000000000f7991f4698ffb6716982aec7f78964dd731c4a5400000000000000000000000000000000000000000000043c33c193756480000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', | ||
'0xfe68d76e000000000000000000000000e0f73b8d76d2ad33492f995af218b03564b8ce20000000000000000000000000f7991f4698ffb6716982aec7f78964dd731c4a54000000000000000000000000000000000000000000027b46536c66c8e300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000', | ||
'0x8119c065', | ||
'0xdea02892000000000000000000000000df9ff5c077d9f3427ade67ac2d27a864be6f3187', | ||
'0xdea02892000000000000000000000000f24401f6992faeacbc5d6c6991db15b5f8364a1b', | ||
'0x5d841af5000000000000000000000000000000000000000000000000000000000000003c' | ||
]; | ||
const predecessor = '0x0000000000000000000000000000000000000000000000000000000000000000'; | ||
const salt = '0x0d0c2b4e41c5fdf9375f2b1601caf0af18e81d6257ea3abb3b72a989fc3698da'; | ||
|
||
const proposalId = computeBatchProposalId(targets, values, payloads, predecessor, salt); | ||
expect(proposalId).to.be.equal(expectedProposalId); | ||
}); | ||
}); |
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