Skip to content

Commit b1d3fa9

Browse files
committed
chore: shutter event tweak, extra dispute kit views
1 parent df98319 commit b1d3fa9

File tree

6 files changed

+415
-95
lines changed

6 files changed

+415
-95
lines changed

contracts/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Refresh the list of deployed contracts by running `./scripts/generateDeployments
7979
- [DAIFaucet](https://sepolia.arbiscan.io/address/0xB5b39A1bcD2D7097A8824B3cC18Ebd2dFb0D9B5E)
8080
- [DisputeKitClassic: proxy](https://sepolia.arbiscan.io/address/0x2246821E1313A93e2F8CdF7a3422d078f560b457), [implementation](https://sepolia.arbiscan.io/address/0x8Db69EE93365190FE9CA4d59Ae4Cdd4f3688f1Af)
8181
- [DisputeKitClassicUniversity: proxy](https://sepolia.arbiscan.io/address/0xd6E96b7c993763B5CDDa1139C7387B82A7c8B8B5), [implementation](https://sepolia.arbiscan.io/address/0x87e863b94d2CB79A8aB53bD87Dc4A10E11C0918B)
82-
- [DisputeKitShutter: proxy](https://sepolia.arbiscan.io/address/0x09F3d00B995186D76Af9AA8627D06351d0d9f950), [implementation](https://sepolia.arbiscan.io/address/0xFbEeF40E23C6B39e5d1190A43d6712B2643fa0dD)
82+
- [DisputeKitShutter: proxy](https://sepolia.arbiscan.io/address/0x09F3d00B995186D76Af9AA8627D06351d0d9f950), [implementation](https://sepolia.arbiscan.io/address/0x6571eE6Ee36d805A8363c09376107844a003073C)
8383
- [DisputeResolver](https://sepolia.arbiscan.io/address/0x524C5541f440204E0B4577334c439277018F971f)
8484
- [DisputeResolverRuler](https://sepolia.arbiscan.io/address/0x199893232ECC74cC7898B24b5Ff58d613029f6B7)
8585
- [DisputeResolverUniversity](https://sepolia.arbiscan.io/address/0x2Aa1a94307E772BeE42E9EfbD137b1053F1fCfd4)

contracts/deployments/arbitrumSepoliaDevnet/DisputeKitShutter.json

Lines changed: 127 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,18 @@
110110
{
111111
"anonymous": false,
112112
"inputs": [
113+
{
114+
"indexed": true,
115+
"internalType": "uint256",
116+
"name": "_coreDisputeID",
117+
"type": "uint256"
118+
},
119+
{
120+
"indexed": true,
121+
"internalType": "address",
122+
"name": "_juror",
123+
"type": "address"
124+
},
113125
{
114126
"indexed": true,
115127
"internalType": "bytes32",
@@ -346,6 +358,35 @@
346358
"stateMutability": "view",
347359
"type": "function"
348360
},
361+
{
362+
"inputs": [
363+
{
364+
"internalType": "uint256",
365+
"name": "localDisputeID",
366+
"type": "uint256"
367+
},
368+
{
369+
"internalType": "uint256",
370+
"name": "localRoundID",
371+
"type": "uint256"
372+
},
373+
{
374+
"internalType": "address",
375+
"name": "drawnAddress",
376+
"type": "address"
377+
}
378+
],
379+
"name": "alreadyDrawn",
380+
"outputs": [
381+
{
382+
"internalType": "bool",
383+
"name": "",
384+
"type": "bool"
385+
}
386+
],
387+
"stateMutability": "view",
388+
"type": "function"
389+
},
349390
{
350391
"inputs": [
351392
{
@@ -473,6 +514,39 @@
473514
"stateMutability": "nonpayable",
474515
"type": "function"
475516
},
517+
{
518+
"inputs": [
519+
{
520+
"internalType": "uint256",
521+
"name": "_coreDisputeID",
522+
"type": "uint256"
523+
},
524+
{
525+
"internalType": "uint256[]",
526+
"name": "_voteIDs",
527+
"type": "uint256[]"
528+
},
529+
{
530+
"internalType": "uint256",
531+
"name": "_choice",
532+
"type": "uint256"
533+
},
534+
{
535+
"internalType": "uint256",
536+
"name": "_salt",
537+
"type": "uint256"
538+
},
539+
{
540+
"internalType": "string",
541+
"name": "_justification",
542+
"type": "string"
543+
}
544+
],
545+
"name": "castVoteShutter",
546+
"outputs": [],
547+
"stateMutability": "nonpayable",
548+
"type": "function"
549+
},
476550
{
477551
"inputs": [
478552
{
@@ -764,6 +838,54 @@
764838
"stateMutability": "view",
765839
"type": "function"
766840
},
841+
{
842+
"inputs": [
843+
{
844+
"internalType": "uint256",
845+
"name": "_coreDisputeID",
846+
"type": "uint256"
847+
},
848+
{
849+
"internalType": "uint256",
850+
"name": "_coreRoundID",
851+
"type": "uint256"
852+
}
853+
],
854+
"name": "getLocalDisputeRoundID",
855+
"outputs": [
856+
{
857+
"internalType": "uint256",
858+
"name": "localDisputeID",
859+
"type": "uint256"
860+
},
861+
{
862+
"internalType": "uint256",
863+
"name": "localRoundID",
864+
"type": "uint256"
865+
}
866+
],
867+
"stateMutability": "view",
868+
"type": "function"
869+
},
870+
{
871+
"inputs": [
872+
{
873+
"internalType": "uint256",
874+
"name": "_localDisputeID",
875+
"type": "uint256"
876+
}
877+
],
878+
"name": "getNumberOfRounds",
879+
"outputs": [
880+
{
881+
"internalType": "uint256",
882+
"name": "",
883+
"type": "uint256"
884+
}
885+
],
886+
"stateMutability": "view",
887+
"type": "function"
888+
},
767889
{
768890
"inputs": [
769891
{
@@ -924,7 +1046,7 @@
9241046
},
9251047
{
9261048
"inputs": [],
927-
"name": "initialize4",
1049+
"name": "initialize8",
9281050
"outputs": [],
9291051
"stateMutability": "nonpayable",
9301052
"type": "function"
@@ -1118,16 +1240,16 @@
11181240
"0x56b95cD6fd660c6E631c65C0d0F62B33A093D9a4",
11191241
"0x485cc955000000000000000000000000f1c7c037891525e360c59f708739ac09a7670c590000000000000000000000004838e31e0ea315232c431598110fe677caf2d6e6"
11201242
],
1121-
"numDeployments": 3,
1122-
"solcInputHash": "96b8e3f55478438b6784f67c1730309e",
1243+
"numDeployments": 4,
1244+
"solcInputHash": "450e0980ffbfcac7e1c189d256d31822",
11231245
"metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_implementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"_data\",\"type\":\"bytes\"}],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"stateMutability\":\"payable\",\"type\":\"fallback\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/proxy/KlerosProxies.sol\":\"DisputeKitShutterProxy\"},\"evmVersion\":\"paris\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/proxy/KlerosProxies.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\nimport \\\"./UUPSProxy.sol\\\";\\n\\n/// Workaround to get meaningful names for the proxy contracts\\n/// Otherwise all the contracts are called `UUPSProxy` on the chain explorers\\n\\ncontract DisputeKitClassicNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitClassicProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitGatedProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitShutterProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeKitSybilResistantProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract DisputeTemplateRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract EvidenceModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract ForeignGatewayOnEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract HomeGatewayToEthereumProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreRulerProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract KlerosCoreProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract PolicyRegistryProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract RandomizerRNGProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleNeoProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleUniversityProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\\ncontract SortitionModuleProxy is UUPSProxy {\\n constructor(address _implementation, bytes memory _data) UUPSProxy(_implementation, _data) {}\\n}\\n\",\"keccak256\":\"0x209228b56d42a8444ca70919e1ded5711fba434a746f26d426e230f57526fc6c\",\"license\":\"MIT\"},\"src/proxy/UUPSProxy.sol\":{\"content\":\"//SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.24;\\n\\n/// @title UUPS Proxy\\n/// @author Simon Malatrait <simon.malatrait@grenoble-inp.org>\\n/// @dev This contract implements a UUPS Proxy compliant with ERC-1967 & ERC-1822.\\n/// @dev This contract delegates all calls to another contract (UUPS Proxiable) through a fallback function and the use of the `delegatecall` EVM instruction.\\n/// @dev We refer to the Proxiable contract (as per ERC-1822) with `implementation`.\\n/// @dev Adapted from <https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.9.0/contracts/proxy/ERC1967/ERC1967Proxy.sol>\\ncontract UUPSProxy {\\n /// @dev Storage slot with the address of the current implementation.\\n /// This is the keccak-256 hash of \\\"eip1967.proxy.implementation\\\" subtracted by 1, and is\\n /// validated in the constructor.\\n /// NOTE: bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)\\n bytes32 private constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;\\n\\n // ************************************* //\\n // * Constructor * //\\n // ************************************* //\\n\\n /// @dev Initializes the upgradeable proxy with an initial implementation specified by `_implementation`.\\n /// If `_data` is nonempty, it's used as data in a delegate call to `_implementation`. This will typically be an encoded\\n /// function call, and allows initializing the storage of the proxy like a Solidity constructor.\\n constructor(address _implementation, bytes memory _data) {\\n assembly {\\n sstore(IMPLEMENTATION_SLOT, _implementation)\\n }\\n\\n if (_data.length != 0) {\\n (bool success, ) = _implementation.delegatecall(_data);\\n require(success, \\\"Proxy Constructor failed\\\");\\n }\\n }\\n\\n // ************************************* //\\n // * State Modifiers * //\\n // ************************************* //\\n\\n /// @dev Delegates the current call to `implementation`.\\n /// NOTE: This function does not return to its internal call site, it will return directly to the external caller.\\n function _delegate(address implementation) internal {\\n assembly {\\n // Copy msg.data. We take full control of memory in this inline assembly\\n // block because it will not return to Solidity code. We overwrite the\\n // Solidity scratch pad at memory position 0.\\n calldatacopy(0, 0, calldatasize())\\n\\n // Call the implementation.\\n // out and outsize are 0 because we don't know the size yet.\\n let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0)\\n\\n // Copy the returned data.\\n returndatacopy(0, 0, returndatasize())\\n\\n switch result\\n // delegatecall returns 0 on error.\\n case 0 {\\n revert(0, returndatasize())\\n }\\n default {\\n return(0, returndatasize())\\n }\\n }\\n }\\n\\n // ************************************* //\\n // * Internal Views * //\\n // ************************************* //\\n\\n function _getImplementation() internal view returns (address implementation) {\\n assembly {\\n implementation := sload(IMPLEMENTATION_SLOT)\\n }\\n }\\n\\n // ************************************* //\\n // * Fallback * //\\n // ************************************* //\\n\\n /// @dev Fallback function that delegates calls to the address returned by `_implementation()`.\\n /// @dev Will run if no other function in the contract matches the call data.\\n fallback() external payable {\\n _delegate(_getImplementation());\\n }\\n\\n receive() external payable {\\n _delegate(_getImplementation());\\n }\\n}\\n\",\"keccak256\":\"0xc3e0b18f846a62cc6c274680fc10014d1267885f8eefc6767292d3e174a081c0\",\"license\":\"MIT\"}},\"version\":1}",
11241246
"bytecode": "0x608060405234801561001057600080fd5b5060405161030238038061030283398101604081905261002f91610151565b8181817f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55805160001461010e576000826001600160a01b031682604051610077919061021f565b600060405180830381855af49150503d80600081146100b2576040519150601f19603f3d011682016040523d82523d6000602084013e6100b7565b606091505b505090508061010c5760405162461bcd60e51b815260206004820152601860248201527f50726f787920436f6e7374727563746f72206661696c65640000000000000000604482015260640160405180910390fd5b505b5050505061023b565b634e487b7160e01b600052604160045260246000fd5b60005b83811015610148578181015183820152602001610130565b50506000910152565b6000806040838503121561016457600080fd5b82516001600160a01b038116811461017b57600080fd5b60208401519092506001600160401b038082111561019857600080fd5b818501915085601f8301126101ac57600080fd5b8151818111156101be576101be610117565b604051601f8201601f19908116603f011681019083821181831017156101e6576101e6610117565b816040528281528860208487010111156101ff57600080fd5b61021083602083016020880161012d565b80955050505050509250929050565b6000825161023181846020870161012d565b9190910192915050565b60b9806102496000396000f3fe608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122027e73125daa8b508f0a75ecdac4efb44a8712d5d43b9293019c738684adf472464736f6c63430008180033",
11251247
"deployedBytecode": "0x608060405236603757603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b6060565b005b603560317f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015607e573d6000f35b3d6000fdfea264697066735822122027e73125daa8b508f0a75ecdac4efb44a8712d5d43b9293019c738684adf472464736f6c63430008180033",
11261248
"execute": {
1127-
"methodName": "initialize4",
1249+
"methodName": "initialize8",
11281250
"args": []
11291251
},
1130-
"implementation": "0xFbEeF40E23C6B39e5d1190A43d6712B2643fa0dD",
1252+
"implementation": "0x6571eE6Ee36d805A8363c09376107844a003073C",
11311253
"devdoc": {
11321254
"kind": "dev",
11331255
"methods": {},

0 commit comments

Comments
 (0)