Skip to content
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
17 changes: 9 additions & 8 deletions contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,21 @@ Refresh the list of deployed contracts by running `./scripts/generateDeployments

#### Arbitrum Sepolia

- [ArbitrableExample](https://sepolia.arbiscan.io/address/0x96a29c421007Ab6d523B1743FA3f177a15063D07)
- [ArbitrableExample](https://sepolia.arbiscan.io/address/0xe48488AE09022a4F32c528d7EbfF92870225AcBf)
- [BlockHashRNG](https://sepolia.arbiscan.io/address/0x56d6d65Fe202232714794B5D5e4ed9894466Ee01)
- [DAI](https://sepolia.arbiscan.io/address/0x593e89704D285B0c3fbF157c7CF2537456CE64b5)
- [DAIFaucet](https://sepolia.arbiscan.io/address/0xB5b39A1bcD2D7097A8824B3cC18Ebd2dFb0D9B5E)
- [DisputeKitClassic: proxy](https://sepolia.arbiscan.io/address/0x86Ac67e5550F837a650B4B0Cd4778D4293a2bDe3), [implementation](https://sepolia.arbiscan.io/address/0xC3dB344755b15c8Edfd834db79af4f8860029FB4)
- [DisputeResolver](https://sepolia.arbiscan.io/address/0x3E22eBE8c86a58b0BfEd5383aa9DEFB87De85034)
- [DisputeTemplateRegistry: proxy](https://sepolia.arbiscan.io/address/0xc60e862273c1eAa1F9afBC69b39cee30270A2419), [implementation](https://sepolia.arbiscan.io/address/0xeA44D4710bc804573E7d8653b88A60CaC51E3738)
- [Escrow](https://sepolia.arbiscan.io/address/0x224E52523354BEdCaFF3e98de463E829f3388f84)
- [EvidenceModule: proxy](https://sepolia.arbiscan.io/address/0x827411b3e98bAe8c441efBf26842A1670f8f378F), [implementation](https://sepolia.arbiscan.io/address/0x26c1980120F1C82cF611D666CE81D2b54d018547)
- [KlerosCore: proxy](https://sepolia.arbiscan.io/address/0x4DD8B69958eF1D7d5dA9347E9d9F57ADFC3dc284), [implementation](https://sepolia.arbiscan.io/address/0x614498118850184c62f82d08261109334bFB050f)
- [DisputeKitClassic: proxy](https://sepolia.arbiscan.io/address/0x9426F127116C3652A262AE1eA48391AC8F44D35b), [implementation](https://sepolia.arbiscan.io/address/0x692CC78F2570181FFB99297965FeAA8352ab12E8)
- [DisputeResolver](https://sepolia.arbiscan.io/address/0xB8B36CC43f852f9F0484f53Eb38CaBBA28a81bF6)
- [DisputeTemplateRegistry: proxy](https://sepolia.arbiscan.io/address/0x596D3B09E684D62217682216e9b7a0De75933391), [implementation](https://sepolia.arbiscan.io/address/0xc53b813ed94AaEb6F5518D60bf6a8109954bE3f6)
- [Escrow](https://sepolia.arbiscan.io/address/0xdaf749DABE7be6C6894950AE69af35c20a00ABd9)
- [EvidenceModule: proxy](https://sepolia.arbiscan.io/address/0x57fd453FB0d16f8ca174E7386102D7170E17Be09), [implementation](https://sepolia.arbiscan.io/address/0x05AD81f245209b7f91885fd96e57c9da90554824)
- [KlerosCore: proxy](https://sepolia.arbiscan.io/address/0xA54e7A16d7460e38a8F324eF46782FB520d58CE8), [implementation](https://sepolia.arbiscan.io/address/0x91a373BBdE0532F86410682F362e2Cf685e95085)
- [PNKFaucet](https://sepolia.arbiscan.io/address/0x7EFE468003Ad6A858b5350CDE0A67bBED58739dD)
- [PinakionV2](https://sepolia.arbiscan.io/address/0x34B944D42cAcfC8266955D07A80181D2054aa225)
- [PolicyRegistry: proxy](https://sepolia.arbiscan.io/address/0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da), [implementation](https://sepolia.arbiscan.io/address/0xAA637C9E2831614158d7eB193D03af4a7223C56E)
- [RandomizerRNG: proxy](https://sepolia.arbiscan.io/address/0xA995C172d286f8F4eE137CC662e2844E59Cf4836), [implementation](https://sepolia.arbiscan.io/address/0xe62B776498F48061ef9425fCEf30F3d1370DB005)
- [SortitionModule: proxy](https://sepolia.arbiscan.io/address/0xf327200420F21BAafce8F1C03B1EEdF926074B95), [implementation](https://sepolia.arbiscan.io/address/0xb7c292cD9Fd3d20De84a71AE1caF054eEB6374A9)
- [SortitionModule: proxy](https://sepolia.arbiscan.io/address/0x19cb28BAB40C3585955798f5EEabd71Eec14471C), [implementation](https://sepolia.arbiscan.io/address/0xBC82B29e5aE8a749D82b7919118Ab7C0D41fA3D3)
- [WETH](https://sepolia.arbiscan.io/address/0x3829A2486d53ee984a0ca2D76552715726b77138)
- [WETHFaucet](https://sepolia.arbiscan.io/address/0x6F8C10E0030aDf5B8030a5E282F026ADdB6525fd)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"address": "0x96a29c421007Ab6d523B1743FA3f177a15063D07",
"address": "0xe48488AE09022a4F32c528d7EbfF92870225AcBf",
"abi": [
{
"inputs": [
Expand Down Expand Up @@ -357,39 +357,39 @@
"type": "function"
}
],
"transactionHash": "0x2884335c81bd0f19fcfce0e88a5ac247e10967ea5b9e3f476321ea18df53efa3",
"transactionHash": "0xb2308a18e0bfd0030cb4889acef1a482410f7a3decac8e4e3240ae4a24981824",
"receipt": {
"to": null,
"from": "0xf1C7c037891525E360C59f708739Ac09A7670c59",
"contractAddress": "0x96a29c421007Ab6d523B1743FA3f177a15063D07",
"contractAddress": "0xe48488AE09022a4F32c528d7EbfF92870225AcBf",
"transactionIndex": 1,
"gasUsed": "1332621",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000800080000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000020000000002020000400000000000100000000000000000000000000000000000000",
"blockHash": "0xc563bdfaa4019bb91fb68e90e5bb3b7b740cf8ec6c1c02c21e128de667af36b3",
"transactionHash": "0x2884335c81bd0f19fcfce0e88a5ac247e10967ea5b9e3f476321ea18df53efa3",
"gasUsed": "19504456",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000008000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000800080000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000020000000002000000400000000000100000000000000000000000000000000000000",
"blockHash": "0x6274b9a4a9be1d49e84450210fd8e92b186af6835a309217ccf400b6ae31eb07",
"transactionHash": "0xb2308a18e0bfd0030cb4889acef1a482410f7a3decac8e4e3240ae4a24981824",
"logs": [
{
"transactionIndex": 1,
"blockNumber": 3087468,
"transactionHash": "0x2884335c81bd0f19fcfce0e88a5ac247e10967ea5b9e3f476321ea18df53efa3",
"address": "0xc60e862273c1eAa1F9afBC69b39cee30270A2419",
"blockNumber": 3639197,
"transactionHash": "0xb2308a18e0bfd0030cb4889acef1a482410f7a3decac8e4e3240ae4a24981824",
"address": "0x596D3B09E684D62217682216e9b7a0De75933391",
"topics": [
"0x00f7cd7255d1073b4e136dd477c38ea0020c051ab17110cc5bfab0c840ff9924",
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470"
],
"data": "0x000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001c6469737075746554656d706c6174654d617070696e673a20544f444f00000000",
"logIndex": 0,
"blockHash": "0xc563bdfaa4019bb91fb68e90e5bb3b7b740cf8ec6c1c02c21e128de667af36b3"
"blockHash": "0x6274b9a4a9be1d49e84450210fd8e92b186af6835a309217ccf400b6ae31eb07"
}
],
"blockNumber": 3087468,
"cumulativeGasUsed": "1332621",
"blockNumber": 3639197,
"cumulativeGasUsed": "19504456",
"status": 1,
"byzantium": true
},
"args": [
"0x4DD8B69958eF1D7d5dA9347E9d9F57ADFC3dc284",
"0xA54e7A16d7460e38a8F324eF46782FB520d58CE8",
{
"$schema": "../NewDisputeTemplate.schema.json",
"title": "Let's do this",
Expand All @@ -415,7 +415,7 @@
},
"disputeTemplateMapping: TODO",
"0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000003",
"0xc60e862273c1eAa1F9afBC69b39cee30270A2419",
"0x596D3B09E684D62217682216e9b7a0De75933391",
"0x3829A2486d53ee984a0ca2D76552715726b77138"
],
"numDeployments": 1,
Expand Down
133 changes: 133 additions & 0 deletions contracts/deployments/arbitrumSepoliaDevnet/BlockHashRNG.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
{
"address": "0x56d6d65Fe202232714794B5D5e4ed9894466Ee01",
"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": "0x32c51b1394c621cbf7c57329ff44c105baa1e9fcad4c83a64aa4555755a73a1b",
"receipt": {
"to": null,
"from": "0xf1C7c037891525E360C59f708739Ac09A7670c59",
"contractAddress": "0x56d6d65Fe202232714794B5D5e4ed9894466Ee01",
"transactionIndex": 1,
"gasUsed": "131155",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0xa93f6b0360c4d5aec6c9375356a101a1dab80c14b1f5bd97d5ff0fc4a949125a",
"transactionHash": "0x32c51b1394c621cbf7c57329ff44c105baa1e9fcad4c83a64aa4555755a73a1b",
"logs": [],
"blockNumber": 3141082,
"cumulativeGasUsed": "131155",
"status": 1,
"byzantium": true
},
"args": [],
"numDeployments": 1,
"solcInputHash": "4ee8a1f2013c130bec1668c5304bc76a",
"metadata": "{\"compiler\":{\"version\":\"0.8.18+commit.87f61d96\"},\"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>\",\"details\":\"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\":\"paris\",\"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.18;\\n\\nimport \\\"./RNG.sol\\\";\\n\\n/// @title Random Number Generator using blockhash with fallback.\\n/// @author Cl\\u00e9ment Lesaege - <clement@lesaege.com>\\n/// @dev\\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.\\ncontract BlockHashRNG is RNG {\\n mapping(uint256 => uint256) public randomNumbers; // randomNumbers[block] is the random number for this block, 0 otherwise.\\n\\n /// @dev Request a random number.\\n /// @param _block Block the random number is linked to.\\n function requestRandomness(uint256 _block) external override {\\n // nop\\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 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\":\"0xbec8950b4a908f498273fb7c678f66ffbe08433009d5161545de9a3369eae1ea\",\"license\":\"MIT\"},\"src/rng/RNG.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.18;\\n\\ninterface RNG {\\n /// @dev Request a random number.\\n /// @param _block Block linked to the request.\\n function requestRandomness(uint256 _block) external;\\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 function receiveRandomness(uint256 _block) external returns (uint256 randomNumber);\\n}\\n\",\"keccak256\":\"0x5afe7121f49aebe72218df356bd91b66c2171b9ad15e7945a15a091784291a43\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561001057600080fd5b50610169806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806313cf9054146100465780635257cd901461006b5780637363ae1f1461008b575b600080fd5b6100596100543660046100f3565b61009e565b60405190815260200160405180910390f35b6100596100793660046100f3565b60006020819052908152604090205481565b61009c6100993660046100f3565b50565b005b60008181526020819052604090205480156100b857919050565b438210156100de578140156100cf575080406100de565b6100da60014361010c565b4090505b60009182526020829052604090912081905590565b60006020828403121561010557600080fd5b5035919050565b8181038181111561012d57634e487b7160e01b600052601160045260246000fd5b9291505056fea2646970667358221220d8343029f3281984aa61880b071de45f3d714f660c2a6c1973b488429c50c84e64736f6c63430008120033",
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c806313cf9054146100465780635257cd901461006b5780637363ae1f1461008b575b600080fd5b6100596100543660046100f3565b61009e565b60405190815260200160405180910390f35b6100596100793660046100f3565b60006020819052908152604090205481565b61009c6100993660046100f3565b50565b005b60008181526020819052604090205480156100b857919050565b438210156100de578140156100cf575080406100de565b6100da60014361010c565b4090505b60009182526020829052604090912081905590565b60006020828403121561010557600080fd5b5035919050565b8181038181111561012d57634e487b7160e01b600052601160045260246000fd5b9291505056fea2646970667358221220d8343029f3281984aa61880b071de45f3d714f660c2a6c1973b488429c50c84e64736f6c63430008120033",
"devdoc": {
"author": "Clément Lesaege - <clement@lesaege.com>",
"details": "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": 24139,
"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"
}
}
}
}
Loading