Skip to content

Commit f31e902

Browse files
committed
test: update addresses and deployment script
1 parent 048f940 commit f31e902

File tree

2 files changed

+38
-5
lines changed

2 files changed

+38
-5
lines changed

README.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,27 @@ MetaMask setup for Sokol:
1010
- Symbol: SPOA
1111
- Block Explorer URL: https://blockscout.com/poa/sokol
1212

13+
## Deployed Addresses
14+
15+
Sokol:
16+
- Wrapped PNK: `0x03FCABBE7680ff0513349E643b11CE83A7434fD7`
17+
- xKlerosLiquid: `0xec8726b782D77fC9Fdf64d12D895CA15956b9e0e`
18+
- xKlerosLiquidExtraViews: `0x850753F8785471893d552e7Bdadcc2ccD8eB182F`
19+
- PolicyRegistry: `0x0Bee63bC7220d0Bacd8A3c9d6B6511126CDfe58f`
20+
21+
xDai:
22+
- Wrapped PNK: `<none>`
23+
- xKlerosLiquid: `<none>`
24+
- xKlerosLiquidExtraViews: `<none>`
25+
- PolicyRegistry: `<none>`
26+
1327
## Stake
1428
1. Get Kovan PNK from [faucet](https://kovan.etherscan.io/address/0x4e95b2e0ecb3bd394e1dddd775504820a746d3bd#writeContract). The Kovan PNK contract address is `0x1ee318dbc19267dbce08f54a66ab198f73ede356`.
1529
1. Go to the [token bridge](https://sokol-omnibridge.web.app/bridge) and convert Kovan PNK into Sokol PNK. The Sokol PNK contract address is `0x184A7Fc4fa965D18Af84C6d97dfed8C4561ff8c2`.
16-
1. Sokol PNK are not directly used for staking. Instead, the token is wrapped in order to let xKlerosLiquid (the courts) be the controller of the PNK contract. To convert Sokol PNK into Sokol Wrapped PNK, first [approve](https://blockscout.com/poa/sokol/address/0x184A7Fc4fa965D18Af84C6d97dfed8C4561ff8c2/write-proxy) the address `0xe64818D4e179926299596745BA7C20A3E4a87164` the amount you want to convert and then call [deposit](https://blockscout.com/poa/sokol/address/0xe64818D4e179926299596745BA7C20A3E4a87164/write-proxy).
17-
1. Now, you are ready to [stake](https://blockscout.com/poa/sokol/address/0x12fCC3635DbbD7d5637acF94422e3536Bf6d2676/write-proxy) in the Sokol general court by calling `setStake`.
30+
1. Sokol PNK are not directly used for staking. Instead, the token is wrapped in order to let xKlerosLiquid (the courts) be the controller of the PNK contract. To convert Sokol PNK into Sokol Wrapped PNK, first [approve](https://blockscout.com/poa/sokol/address/0x184A7Fc4fa965D18Af84C6d97dfed8C4561ff8c2/write-proxy) the address `0x03FCABBE7680ff0513349E643b11CE83A7434fD7` the amount you want to convert and then call [deposit](https://blockscout.com/poa/sokol/address/0x03FCABBE7680ff0513349E643b11CE83A7434fD7/write-proxy).
31+
1. Now, you are ready to [stake](https://blockscout.com/poa/sokol/address/0xec8726b782D77fC9Fdf64d12D895CA15956b9e0e/write-proxy) in the Sokol general court by calling `setStake`.
1832

1933
## Unstake
2034
1. Unstake from the Sokol general court.
21-
1. You can use `withdrawAndConvertToPNK()` [method](https://blockscout.com/poa/sokol/address/0xe64818D4e179926299596745BA7C20A3E4a87164/write-contract) to directly convert the Sokol Wrapped PNK into Kovan PNK. If you use this method, it is possible to set the receiver. On the Kovan chain, the tokens have to be claimed though. Go to the [token bridge](https://sokol-omnibridge.web.app/bridge), connect MetaMask with your Kovan account and claim your tokens.
22-
1. If you rather use the token bridge, call `withdraw()` [method](https://blockscout.com/poa/sokol/address/0xe64818D4e179926299596745BA7C20A3E4a87164/write-contract) instead. Then go to the [token bridge](https://sokol-omnibridge.web.app/bridge) convert your tokens.
35+
1. You can use `withdrawAndConvertToPNK()` [method](https://blockscout.com/poa/sokol/address/0x03FCABBE7680ff0513349E643b11CE83A7434fD7/write-contract) to directly convert the Sokol Wrapped PNK into Kovan PNK. If you use this method, it is possible to set the receiver. On the Kovan chain, the tokens have to be claimed though. Go to the [token bridge](https://sokol-omnibridge.web.app/bridge), connect MetaMask with your Kovan account and claim your tokens.
36+
1. If you rather use the token bridge, call `withdraw()` [method](https://blockscout.com/poa/sokol/address/0x03FCABBE7680ff0513349E643b11CE83A7434fD7/write-contract) instead. Then go to the [token bridge](https://sokol-omnibridge.web.app/bridge) convert your tokens.

migrations/2_deploy_contracts.js

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ const { deployProxy } = require('@openzeppelin/truffle-upgrades');
22

33
var WrappedPinakion = artifacts.require("./WrappedPinakion.sol");
44
var xKlerosLiquid = artifacts.require("./xKlerosLiquid.sol");
5+
var PolicyRegistry = artifacts.require("./PolicyRegistry.sol");
6+
var xKlerosLiquidExtraViews = artifacts.require("./xKlerosLiquidExtraViews.sol");
57
var SortitionSumTreeFactory = artifacts.require("./SortitionSumTreeFactory.sol");
68

79
const pinakionParams = {
@@ -109,8 +111,25 @@ module.exports = async function(deployer, network) {
109111
],
110112
{ deployer, unsafeAllowLinkedLibraries: true }
111113
);
112-
console.log('Deployed xKlerosLiquid: ', xKlerosLiquidInstance.address);
113114

114115
await PNKInstance.changeController(xKlerosLiquidInstance.address)
116+
117+
const ExtraViewsInstance = await deployer.deploy(
118+
xKlerosLiquidExtraViews,
119+
xKlerosLiquidInstance.address
120+
);
121+
122+
const PolicyRegistryInstance = await deployer.deploy(
123+
PolicyRegistry,
124+
deployer.networks[network].from // deployer address
125+
);
126+
await PolicyRegistryInstance.setPolicy(
127+
0,
128+
"/ipfs/Qmd1TMEbtic3TSonu5dfqa5k3aSrjxRGY8oJH3ruGgazRB"
129+
)
115130

131+
console.log('Deployed Wrapped PNK: ', PNKInstance.address);
132+
console.log('Deployed xKlerosLiquid: ', xKlerosLiquidInstance.address);
133+
console.log('Deployed Extra Views: ', ExtraViewsInstance.address);
134+
console.log('Deployed Policy Registry: ', PolicyRegistryInstance.address);
116135
};

0 commit comments

Comments
 (0)