Skip to content

Arbitrum Goerli redeploy #370

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions contracts/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ ARBISCAN_API_KEY=ABC123ABC123ABC123ABC123ABC123ABC1

# Optionally for debugging
# TENDERLY_USERNAME=your_username
# TENDERLY_PROJECT=your_project
43 changes: 26 additions & 17 deletions contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,39 +11,39 @@ Refresh the list of deployed contracts by running `./scripts/generateDeployments
#### Goerli

- [PNK](https://goerli.etherscan.io/token/0xA3B02bA6E10F55fb177637917B1b472da0110CcC)
- [ArbitrableExample](https://goerli.etherscan.io/address/0x04Fb43F2Ce076867b5ba38750Ecb2cc6BDe78D61)
- [FastBridgeReceiverOnEthereum](https://goerli.etherscan.io/address/0x87142b7E9C7D026776499120D902AF8896C07894)
- [ForeignGatewayOnEthereum](https://goerli.etherscan.io/address/0xf08273e2B35E78509B027f6FAa32485844EA7cCA)
- [ArbitrableExample](https://goerli.etherscan.io/address/0xd78dcdde2c5a2bd4bb246bc7db6994b95f7c442c)
- [FastBridgeReceiverOnEthereum](https://goerli.etherscan.io/address/0x8F53f533531a40BdaA832254e282ed1b21D83F71)
- [ForeignGatewayOnEthereum](https://goerli.etherscan.io/address/0x4401a368dea8d5761aeeffd3c4a674086dea0666)

#### Arbitrum Goerli (Nitro)
#### Arbitrum Goerli

- [PNK](https://goerli-rollup-explorer.arbitrum.io/token/0x4DEeeFD054434bf6721eF39Aa18EfB3fd0D12610/token-transfers)
- [DisputeKitClassic](https://goerli-rollup-explorer.arbitrum.io/address/0x8F1a2B8F9b04320375856580Fc6B1669Cb12a9EE)
- [DisputeResolver](https://goerli-rollup-explorer.arbitrum.io/address/0x04Fb43F2Ce076867b5ba38750Ecb2cc6BDe78D61)
- [FastBridgeSender](https://goerli-rollup-explorer.arbitrum.io/address/0xcFc0b84419583ff7b32fD5139B789cE858517d4C)
- [HomeGatewayToEthereum](https://goerli-rollup-explorer.arbitrum.io/address/0xc7e3BF90299f6BD9FA7c3703837A9CAbB5743636)
- [IncrementalNG](https://goerli-rollup-explorer.arbitrum.io/address/0x99c1f883f0f5de1737099F1BCB268d1f8D450f8b)
- [KlerosCore](https://goerli-rollup-explorer.arbitrum.io/address/0x87142b7E9C7D026776499120D902AF8896C07894)
- [PolicyRegistry](https://goerli-rollup-explorer.arbitrum.io/address/0xf637A0a4415CCFB97407846486b6be663d3C33ef)
- [SortitionSumTreeFactory](https://goerli-rollup-explorer.arbitrum.io/address/0x26858D60FE92b50b34e236B46874e02724344275)
- [BlockHashRNG](https://goerli-rollup-explorer.arbitrum.io/address/0x68eE49dfD9d76f3386257a3D0e0A85c0A5519bBD)
- [DisputeKitClassic](https://goerli-rollup-explorer.arbitrum.io/address/0x34E520dc1d2Db660113b64724e14CEdCD01Ee879)
- [DisputeResolver](https://goerli-rollup-explorer.arbitrum.io/address/0x99392099F988E889Cc9BD55f632C674C3aeEF7F2)
- [FastBridgeSender](https://goerli-rollup-explorer.arbitrum.io/address/0x4d18b9792e0D8F5aF696E71dBEDff8fcBEed6e8C)
- [HomeGatewayToEthereum](https://goerli-rollup-explorer.arbitrum.io/address/0xed12799915180a257985631fbD2ead261eD838cf)
- [KlerosCore](https://goerli-rollup-explorer.arbitrum.io/address/0xdfea19B51cDe76Aa659bB72401AC14FFCFe42Cde)
- [PolicyRegistry](https://goerli-rollup-explorer.arbitrum.io/address/0xd4A4C63bA98c4445E6bb54206d49c8C6c8Bf8871)
- [SortitionSumTreeFactory](https://goerli-rollup-explorer.arbitrum.io/address/0x40a78989317B953e427B3BD87C59eA003fcC2296)

#### Rinkeby
#### Rinkeby - DEPRECATED

- [PNK](https://rinkeby.etherscan.io/token/0x14aba1fa8a31a8649e8098ad067b739cc5708f30)
- [ArbitrableExample](https://rinkeby.etherscan.io/address/0xc0fcc96BFd78e36550FCaB434A9EE1210B57225b)
- [FastBridgeReceiverOnEthereum](https://rinkeby.etherscan.io/address/0x545C731e84c0034d58e57E476A3b7C3929d070CC)
- [ForeignGatewayOnEthereum](https://rinkeby.etherscan.io/address/0x8681CE0CA5706Cf4732d9060e8eC9f865F7d546a)

#### Arbitrum Rinkeby
#### Arbitrum Rinkeby - DEPRECATED

- [PNK](https://testnet.arbiscan.io/token/0x364530164a2338cdba211f72c1438eb811b5c639)
- [Blockhash](https://testnet.arbiscan.io/address/0xe22b595b3e5fF130EcF7056Ef6A4ac351AeA8a58)
- [DisputeKitClassic](https://testnet.arbiscan.io/address/0xA2c538AA05BBCc44c213441f6f3777223D2BF9e5)
- [DisputeResolver](https://testnet.arbiscan.io/address/0x67e8191F61466c57A17542A52F9f39f336A242fD)
- [FastBridgeSender](https://testnet.arbiscan.io/address/0xf8A4a85e7153374A1b9BDA763a84252eC286843b)
- [HomeGatewayToEthereum](https://testnet.arbiscan.io/address/0x4e894c2B60214beC53B60D09F39544518296C07B)
- [IncrementalNG](https://testnet.arbiscan.io/address/0x078dAd05373d19d7fd6829735b765F12242a4300)
- [KlerosCore](https://testnet.arbiscan.io/address/0x815d709EFCF5E69e2e9E2F8d3815d762496a2f0F)
- [PNK](https://testnet.arbiscan.io/address/0x364530164a2338cdba211f72c1438eb811b5c639)
- [PolicyRegistry](https://testnet.arbiscan.io/address/0x76262035D1b280cC0b08024177b837893bcAd3DA)
- [SortitionSumTreeFactory](https://testnet.arbiscan.io/address/0x48ce286978C74c288eA6Bc9a536BcC899DF8D177)

Expand Down Expand Up @@ -190,6 +190,15 @@ yarn hardhat run scripts/populateCourts.ts --network localhost
#### 3/ Import the data to V2 - Public Testnet

```bash
yarn hardhat run scripts/populatePolicyRegistry.ts --network arbitrumRinkeby
yarn hardhat run scripts/populateCourts.ts --network arbitrumRinkeby
yarn hardhat run scripts/populatePolicyRegistry.ts --network arbitrumGoerli
yarn hardhat run scripts/populateCourts.ts --network arbitrumGoerli
```

### Push the contracts to a Tenderly project

Ensure that your `$TENDERLY_PROJECT` and `$TENDERLY_USERNAME` is set correctly in `.env`.

```bash
yarn hardhat --network goerli tenderly:push
yarn hardhat --network arbitrumGoerli tenderly:push
```
132 changes: 132 additions & 0 deletions contracts/deployments/arbitrumGoerli/BlockHashRNG.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
{
"address": "0x68eE49dfD9d76f3386257a3D0e0A85c0A5519bBD",
"abi": [
{
"inputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"name": "randomNumbers",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_block",
"type": "uint256"
}
],
"name": "receiveRandomness",
"outputs": [
{
"internalType": "uint256",
"name": "randomNumber",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "_block",
"type": "uint256"
}
],
"name": "requestRandomness",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"transactionHash": "0x98cac033ed5f5456c83f947cc034be8327d4d01fed3195457a813504de25dac4",
"receipt": {
"to": null,
"from": "0xF50E77f2A2B6138D16c6c7511562E5C33c4B15A3",
"contractAddress": "0x68eE49dfD9d76f3386257a3D0e0A85c0A5519bBD",
"transactionIndex": 1,
"gasUsed": "2675614",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x53208fc5cea34cc2882d7652b5d67174ed098db9785eb7f4cb8c423b901ccc70",
"transactionHash": "0x98cac033ed5f5456c83f947cc034be8327d4d01fed3195457a813504de25dac4",
"logs": [],
"blockNumber": 997971,
"cumulativeGasUsed": "2675614",
"status": 1,
"byzantium": true
},
"args": [],
"numDeployments": 2,
"solcInputHash": "f57208d12ea18de1e79aa93372bf0e19",
"metadata": "{\"compiler\":{\"version\":\"0.8.9+commit.e5eed63a\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"randomNumbers\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_block\",\"type\":\"uint256\"}],\"name\":\"receiveRandomness\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"randomNumber\",\"type\":\"uint256\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_block\",\"type\":\"uint256\"}],\"name\":\"requestRandomness\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}],\"devdoc\":{\"author\":\"Cl\\u00e9ment Lesaege - <clement@lesaege.com> Random Number Generator returning the blockhash with a fallback behaviour. In case no one called it within the 256 blocks, it returns the previous blockhash. This contract must be used when returning 0 is a worse failure mode than returning another blockhash. Allows saving the random number for use in the future. It allows the contract to still access the blockhash even after 256 blocks.\",\"kind\":\"dev\",\"methods\":{\"receiveRandomness(uint256)\":{\"details\":\"Return the random number. If it has not been saved and is still computable compute it.\",\"params\":{\"_block\":\"Block the random number is linked to.\"},\"returns\":{\"randomNumber\":\"The random number or 0 if it is not ready or has not been requested.\"}},\"requestRandomness(uint256)\":{\"details\":\"Request a random number.\",\"params\":{\"_block\":\"Block the random number is linked to.\"}}},\"title\":\"Random Number Generator using blockhash with fallback.\",\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/rng/BlockhashRNG.sol\":\"BlockHashRNG\"},\"evmVersion\":\"london\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/rng/BlockhashRNG.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8;\\n\\nimport \\\"./RNG.sol\\\";\\n\\n/**\\n * @title Random Number Generator using blockhash with fallback.\\n * @author Cl\\u00e9ment Lesaege - <clement@lesaege.com>\\n *\\n * Random Number Generator returning the blockhash with a fallback behaviour.\\n * In case no one called it within the 256 blocks, it returns the previous blockhash.\\n * This contract must be used when returning 0 is a worse failure mode than returning another blockhash.\\n * Allows saving the random number for use in the future. It allows the contract to still access the blockhash even after 256 blocks.\\n */\\ncontract BlockHashRNG is RNG {\\n mapping(uint256 => uint256) public randomNumbers; // randomNumbers[block] is the random number for this block, 0 otherwise.\\n\\n /**\\n * @dev Request a random number.\\n * @param _block Block the random number is linked to.\\n */\\n function requestRandomness(uint256 _block) external override {\\n // nop\\n }\\n\\n /**\\n * @dev Return the random number. If it has not been saved and is still computable compute it.\\n * @param _block Block the random number is linked to.\\n * @return randomNumber The random number or 0 if it is not ready or has not been requested.\\n */\\n function receiveRandomness(uint256 _block) external override returns (uint256 randomNumber) {\\n randomNumber = randomNumbers[_block];\\n if (randomNumber != 0) {\\n return randomNumber;\\n }\\n\\n if (_block < block.number) {\\n // The random number is not already set and can be.\\n if (blockhash(_block) != 0x0) {\\n // Normal case.\\n randomNumber = uint256(blockhash(_block));\\n } else {\\n // The contract was not called in time. Fallback to returning previous blockhash.\\n randomNumber = uint256(blockhash(block.number - 1));\\n }\\n }\\n randomNumbers[_block] = randomNumber;\\n }\\n}\\n\",\"keccak256\":\"0xac506e26fb8aa64402c76276ca48de9e96851da84a58ba6b8f371c7fedb9a48e\",\"license\":\"MIT\"},\"src/rng/RNG.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity ^0.8;\\n\\ninterface RNG {\\n /**\\n * @dev Request a random number.\\n * @param _block Block linked to the request.\\n */\\n function requestRandomness(uint256 _block) external;\\n\\n /**\\n * @dev Receive the random number.\\n * @param _block Block the random number is linked to.\\n * @return randomNumber Random Number. If the number is not ready or has not been required 0 instead.\\n */\\n function receiveRandomness(uint256 _block) external returns (uint256 randomNumber);\\n}\\n\",\"keccak256\":\"0x0075973344648673365c5a895e4315101e6ce896208a71eb7767f5a61bbf0fe1\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b50610167806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806313cf9054146100465780635257cd901461006b5780637363ae1f1461008b575b600080fd5b6100596100543660046100f3565b61009e565b60405190815260200160405180910390f35b6100596100793660046100f3565b60006020819052908152604090205481565b61009c6100993660046100f3565b50565b005b60008181526020819052604090205480156100b857919050565b438210156100de578140156100cf575080406100de565b6100da60014361010c565b4090505b60009182526020829052604090912081905590565b60006020828403121561010557600080fd5b5035919050565b60008282101561012c57634e487b7160e01b600052601160045260246000fd5b50039056fea2646970667358221220d043c4611058898c35a75d69b1519f5b71b9e6f289bcb5549c73086d98ebdd0164736f6c63430008090033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c806313cf9054146100465780635257cd901461006b5780637363ae1f1461008b575b600080fd5b6100596100543660046100f3565b61009e565b60405190815260200160405180910390f35b6100596100793660046100f3565b60006020819052908152604090205481565b61009c6100993660046100f3565b50565b005b60008181526020819052604090205480156100b857919050565b438210156100de578140156100cf575080406100de565b6100da60014361010c565b4090505b60009182526020829052604090912081905590565b60006020828403121561010557600080fd5b5035919050565b60008282101561012c57634e487b7160e01b600052601160045260246000fd5b50039056fea2646970667358221220d043c4611058898c35a75d69b1519f5b71b9e6f289bcb5549c73086d98ebdd0164736f6c63430008090033",
"devdoc": {
"author": "Clément Lesaege - <clement@lesaege.com> Random Number Generator returning the blockhash with a fallback behaviour. In case no one called it within the 256 blocks, it returns the previous blockhash. This contract must be used when returning 0 is a worse failure mode than returning another blockhash. Allows saving the random number for use in the future. It allows the contract to still access the blockhash even after 256 blocks.",
"kind": "dev",
"methods": {
"receiveRandomness(uint256)": {
"details": "Return the random number. If it has not been saved and is still computable compute it.",
"params": {
"_block": "Block the random number is linked to."
},
"returns": {
"randomNumber": "The random number or 0 if it is not ready or has not been requested."
}
},
"requestRandomness(uint256)": {
"details": "Request a random number.",
"params": {
"_block": "Block the random number is linked to."
}
}
},
"title": "Random Number Generator using blockhash with fallback.",
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
},
"storageLayout": {
"storage": [
{
"astId": 24734,
"contract": "src/rng/BlockhashRNG.sol:BlockHashRNG",
"label": "randomNumbers",
"offset": 0,
"slot": "0",
"type": "t_mapping(t_uint256,t_uint256)"
}
],
"types": {
"t_mapping(t_uint256,t_uint256)": {
"encoding": "mapping",
"key": "t_uint256",
"label": "mapping(uint256 => uint256)",
"numberOfBytes": "32",
"value": "t_uint256"
},
"t_uint256": {
"encoding": "inplace",
"label": "uint256",
"numberOfBytes": "32"
}
}
}
}
167 changes: 90 additions & 77 deletions contracts/deployments/arbitrumGoerli/DisputeKitClassic.json

Large diffs are not rendered by default.

46 changes: 23 additions & 23 deletions contracts/deployments/arbitrumGoerli/DisputeResolver.json

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions contracts/deployments/arbitrumGoerli/FastBridgeSender.json

Large diffs are not rendered by default.

68 changes: 34 additions & 34 deletions contracts/deployments/arbitrumGoerli/HomeGatewayToEthereum.json

Large diffs are not rendered by default.

Loading