Skip to content

Commit a0d20c5

Browse files
committed
test: update test and deployment script
1 parent 746264c commit a0d20c5

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

migrations/2_deploy_contracts.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ let xKlerosLiquidParams = {
3838
feeForJuror: web3.utils.toWei('40000000000000000','wei'),
3939
jurorsForCourtJump: 511,
4040
timesPerPeriod: [280800, 583200, 583200, 388800],
41-
sortitionSumTreeK: 2
41+
sortitionSumTreeK: 2,
42+
maxTotalStakeAllowed: web3.utils.toWei('30000000','ether')
4243
},
4344
"sokol-fork": {
4445
governor: null,
@@ -52,7 +53,8 @@ let xKlerosLiquidParams = {
5253
feeForJuror: web3.utils.toWei('40000000000000000','wei'),
5354
jurorsForCourtJump: 511,
5455
timesPerPeriod: [280800, 583200, 583200, 388800],
55-
sortitionSumTreeK: 2
56+
sortitionSumTreeK: 2,
57+
maxTotalStakeAllowed: web3.utils.toWei('30000000','ether')
5658
},
5759
"sokol": {
5860
governor: null,
@@ -66,7 +68,8 @@ let xKlerosLiquidParams = {
6668
feeForJuror: web3.utils.toWei('40000000000000000','wei'),
6769
jurorsForCourtJump: 511,
6870
timesPerPeriod: [280800, 583200, 583200, 388800],
69-
sortitionSumTreeK: 2
71+
sortitionSumTreeK: 2,
72+
maxTotalStakeAllowed: web3.utils.toWei('30000000','ether')
7073
}
7174
}
7275

@@ -106,6 +109,7 @@ module.exports = async function(deployer, network) {
106109
xKlerosLiquidParams[network].jurorsForCourtJump,
107110
xKlerosLiquidParams[network].timesPerPeriod,
108111
xKlerosLiquidParams[network].sortitionSumTreeK,
112+
xKlerosLiquidParams[network].maxTotalStakeAllowed,
109113
],
110114
{ deployer, unsafeAllowLinkedLibraries: true }
111115
);

test/kleros/kleros-liquid.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ contract('xKlerosLiquid', (accounts) => {
101101
let maxDrawingTime
102102
let subcourtTree
103103
let subcourtMap
104+
let maxTotalStakeAllowed
104105
let klerosLiquid
105106
beforeEach(async () => {
106107
governor = accounts[0]
@@ -126,6 +127,7 @@ contract('xKlerosLiquid', (accounts) => {
126127
} = generateSubcourts(randomInt(4, 2), 3)
127128
subcourtTree = _subcourtTree
128129
subcourtMap = _subcourtMap
130+
maxTotalStakeAllowed = web3.utils.toWei('30000000', 'ether') // 30M PNK
129131

130132
const sortitionSumTreeFactoryLib = await SortitionSumTreeFactory.new()
131133
await xKlerosLiquid.link(
@@ -147,6 +149,7 @@ contract('xKlerosLiquid', (accounts) => {
147149
subcourtTree.jurorsForJump,
148150
subcourtTree.timesPerPeriod,
149151
subcourtTree.sortitionSumTreeK,
152+
maxTotalStakeAllowed,
150153
],
151154
{ unsafeAllowLinkedLibraries: true }
152155
)
@@ -534,7 +537,7 @@ contract('xKlerosLiquid', (accounts) => {
534537
.mod(coherentVotes)
535538
expect(PNKBefore.eq(PNKAfter.add(burntPNK))).to.equal(true)
536539
const tokensShiftEvents = await klerosLiquid.getPastEvents(
537-
'TokenAndXDaiShift',
540+
'TokenAndETHShift',
538541
{
539542
filter: { _disputeID: dispute.ID },
540543
fromBlock: executeBlockNumber,

0 commit comments

Comments
 (0)