Skip to content

Commit

Permalink
feat(playground-api): set consortium gov attrs in playground (#1925)
Browse files Browse the repository at this point in the history
<!--  Thanks for sending a pull request! -->

#### What this PR does / why we need it:
- Enable consortium in playground

#### Which issue(s) does this PR fixes?:
<!--
(Optional) Automatically closes linked issue when PR is merged.
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
-->
Fixes #

#### Additional comments?:
  • Loading branch information
pierregee authored Dec 13, 2022
1 parent 2579d3f commit 0013508
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 1 deletion.
40 changes: 40 additions & 0 deletions apps/playground-api/__tests__/modules/PlaygroundModule.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,46 @@ it('should have gov set', async () => {
const gov = await testing.container.call('getgov', ['ATTRIBUTES'])
expect(gov).toStrictEqual({
ATTRIBUTES: expect.objectContaining({
'v0/consortium/1/members': {
'01': {
backingId: 'backing_address_btc_1_c',
mintLimit: 50,
mintLimitDaily: 5,
name: 'Waves HQ',
ownerAddress: 'bcrt1qc2g87p4pehe0pnfsmph63m00f38gh76tjpuuf9',
status: 0
},
'02': {
backingId: 'backing_address_btc_1_br, backing_address_btc_2_br',
mintLimit: 50,
mintLimitDaily: 5,
name: 'Alexandria',
ownerAddress: 'bcrt1qwg4n6520y64ajkl9nhul9jc0dpqhhrunwnmt4t',
status: 0
}
},
'v0/consortium/2/members': {
'01': {
backingId: 'backing_address_eth_1_c',
mintLimit: 10,
mintLimitDaily: 5,
name: 'Waves HQ',
ownerAddress: 'bcrt1qc2g87p4pehe0pnfsmph63m00f38gh76tjpuuf9',
status: 0
},
'02': {
backingId: 'backing_address_eth_1_br, backing_address_eth_2_br',
mintLimit: 10,
mintLimitDaily: 5,
name: 'Alexandria',
ownerAddress: 'bcrt1qwg4n6520y64ajkl9nhul9jc0dpqhhrunwnmt4t',
status: 0
}
},
'v0/consortium/1/mint_limit': '50',
'v0/consortium/1/mint_limit_daily': '5',
'v0/consortium/2/mint_limit': '20',
'v0/consortium/2/mint_limit_daily': '10',
'v0/params/dfip2203/active': 'true',
'v0/params/dfip2203/reward_pct': '0.05',
'v0/params/dfip2203/block_period': '20',
Expand Down
49 changes: 48 additions & 1 deletion apps/playground-api/src/setups/setup.gov.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,54 @@ export class SetupGov extends PlaygroundSetup<Record<string, any>> {
'v0/token/12/loan_payback_collateral': 'true',

// On-chain governance
'v0/params/feature/gov': 'true'
'v0/params/feature/gov': 'true',

// Enable consortium
'v0/params/feature/consortium': 'true',

// Set a consortium global limit for dBTC
'v0/consortium/1/mint_limit': '50',
'v0/consortium/1/mint_limit_daily': '5',

// // Set a consortium member for dBTC
'v0/consortium/1/members': {
'01': {
name: 'Waves HQ',
ownerAddress: 'bcrt1qc2g87p4pehe0pnfsmph63m00f38gh76tjpuuf9',
backingId: 'backing_address_btc_1_c',
mintLimitDaily: '5.00000000',
mintLimit: '50.00000000'
},
'02': {
name: 'Alexandria',
ownerAddress: 'bcrt1qwg4n6520y64ajkl9nhul9jc0dpqhhrunwnmt4t',
backingId: 'backing_address_btc_1_br, backing_address_btc_2_br',
mintLimitDaily: '5.00000000',
mintLimit: '50.00000000'
}
},

// Consortium global limit for dETH
'v0/consortium/2/mint_limit': '20',
'v0/consortium/2/mint_limit_daily': '10',

// Set a consortium member for dETH
'v0/consortium/2/members': {
'01': {
name: 'Waves HQ',
ownerAddress: 'bcrt1qc2g87p4pehe0pnfsmph63m00f38gh76tjpuuf9',
backingId: 'backing_address_eth_1_c',
mintLimitDaily: '5.00000000',
mintLimit: '10.00000000'
},
'02': {
name: 'Alexandria',
ownerAddress: 'bcrt1qwg4n6520y64ajkl9nhul9jc0dpqhhrunwnmt4t',
backingId: 'backing_address_eth_1_br, backing_address_eth_2_br',
mintLimitDaily: '5.00000000',
mintLimit: '10.00000000'
}
}
}
}
]
Expand Down

0 comments on commit 0013508

Please sign in to comment.