Skip to content
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

feat(web): dispute-maintenance-buttons #1645

Merged
merged 20 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
bd5ecbb
feat(web): dispute-maintenance-buttons
Harman-singh-waraich Jul 4, 2024
7599a23
refactor(web): refactor-logic-statements
Harman-singh-waraich Jul 4, 2024
4a4b27e
fix(web): ensure-chain-and-close-on-icon-click
Harman-singh-waraich Jul 4, 2024
d5cb3f5
refactor(web): initial-ripple-check
Harman-singh-waraich Jul 4, 2024
2d2c605
style(web): update-menu-popup-padding
Harman-singh-waraich Jul 5, 2024
037bc7f
feat(web): transaction-batcher
Harman-singh-waraich Jul 8, 2024
c99ea3a
Merge branch 'dev' into feat/case-dev-buttons
kemuru Jul 15, 2024
a9e3732
chore(web): deploy-transaction-batcher-on-arbitrum-and-gnosis
Harman-singh-waraich Jul 22, 2024
c0f0d29
chore: transaction batcher deployment
jaybuidl Jul 24, 2024
90144c2
Merge branch 'dev' into feat/case-dev-buttons
jaybuidl Jul 24, 2024
1413980
fix: z-index for popupcontainer higher than the overlay
kemuru Jul 24, 2024
fe737d4
fix(web): fix-typo
Harman-singh-waraich Jul 24, 2024
dd0e335
Merge branch 'dev' into feat/case-dev-buttons
kemuru Jul 24, 2024
7cdc962
chore(web): update-transaction-batcher-hook
Harman-singh-waraich Jul 25, 2024
1c02948
refactor(web): better-disabling-conditions-for-buttons
Harman-singh-waraich Jul 25, 2024
3d268a7
feat(subgraph): add-juror-rewards-and-drawn-indicators
Harman-singh-waraich Aug 1, 2024
1149b6f
refactor(web): update-draw-jurors-call-condition
Harman-singh-waraich Aug 1, 2024
32672d2
refactor(web): update-juror-rewards-button-logic
Harman-singh-waraich Aug 1, 2024
24ca0d2
feat(subgraph): add-appeal-fee-dispersed-indicator-and-fix-fee-reward…
Harman-singh-waraich Aug 5, 2024
097bbaa
feat(web): appeal-fee-rewards-button
Harman-singh-waraich Aug 5, 2024
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
2 changes: 2 additions & 0 deletions contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Refresh the list of deployed contracts by running `./scripts/generateDeployments
- [PolicyRegistry: proxy](https://arbiscan.io/address/0x26c1980120F1C82cF611D666CE81D2b54d018547), [implementation](https://arbiscan.io/address/0x2AC2EdFD336732bc6963f1AD03ED98B22dB949da)
- [RandomizerRNG: proxy](https://arbiscan.io/address/0xC3dB344755b15c8Edfd834db79af4f8860029FB4), [implementation](https://arbiscan.io/address/0xA995C172d286f8F4eE137CC662e2844E59Cf4836)
- [SortitionModuleNeo: proxy](https://arbiscan.io/address/0x614498118850184c62f82d08261109334bFB050f), [implementation](https://arbiscan.io/address/0xf327200420F21BAafce8F1C03B1EEdF926074B95)
- [TransactionBatcher](https://arbiscan.io/address/0xBC5ef8d9ad307154447AE148c088f083d2dEa4eF)

### Official Testnet

Expand Down Expand Up @@ -88,6 +89,7 @@ Refresh the list of deployed contracts by running `./scripts/generateDeployments
- [SortitionModule: proxy](https://sepolia.arbiscan.io/address/0x19cb28BAB40C3585955798f5EEabd71Eec14471C), [implementation](https://sepolia.arbiscan.io/address/0xBC82B29e5aE8a749D82b7919118Ab7C0D41fA3D3)
- [SortitionModuleNeo: proxy](https://sepolia.arbiscan.io/address/0x809533c303c10915BB5c0585f2d8D738e2a4fB64), [implementation](https://sepolia.arbiscan.io/address/0xD9ddceb7C399518F23b69D155a67C6AFF13f9fF0)
- [SortitionModuleUniversity: proxy](https://sepolia.arbiscan.io/address/0xBEEb15EF1DEf96c569c97A703E649B0251ceFB04), [implementation](https://sepolia.arbiscan.io/address/0xaA2833b174D4e29ae2aFc0b11dF9160EDB28BF9d)
- [TransactionBatcher](https://sepolia.arbiscan.io/address/0x35f93986950804ac1F93519BF68C2a7Dd776db0E)
- [WETH](https://sepolia.arbiscan.io/address/0x3829A2486d53ee984a0ca2D76552715726b77138)
- [WETHFaucet](https://sepolia.arbiscan.io/address/0x6F8C10E0030aDf5B8030a5E282F026ADdB6525fd)

Expand Down
26 changes: 26 additions & 0 deletions contracts/deploy/00-transaction-batcher.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { HardhatRuntimeEnvironment } from "hardhat/types";
import { DeployFunction } from "hardhat-deploy/types";
import { HomeChains, isSkipped } from "./utils";

const deployArbitration: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
const { deployments, getNamedAccounts, getChainId } = hre;
const { deploy } = deployments;

// fallback to hardhat node signers on local network
const deployer = (await getNamedAccounts()).deployer ?? (await hre.ethers.getSigners())[0].address;
const chainId = Number(await getChainId());
console.log("deploying to %s with deployer %s", HomeChains[chainId], deployer);

await deploy("TransactionBatcher", {
from: deployer,
args: [],
log: true,
});
};

deployArbitration.tags = ["TransactionBatcher"];
deployArbitration.skip = async ({ network }) => {
return isSkipped(network, !HomeChains[network.config.chainId ?? 0]);
};

export default deployArbitration;
87 changes: 87 additions & 0 deletions contracts/deployments/arbitrum/TransactionBatcher.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
{
"address": "0xBC5ef8d9ad307154447AE148c088f083d2dEa4eF",
"abi": [
{
"inputs": [
{
"internalType": "address[]",
"name": "targets",
"type": "address[]"
},
{
"internalType": "uint256[]",
"name": "values",
"type": "uint256[]"
},
{
"internalType": "bytes[]",
"name": "datas",
"type": "bytes[]"
}
],
"name": "batchSend",
"outputs": [],
"stateMutability": "payable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address[]",
"name": "targets",
"type": "address[]"
},
{
"internalType": "uint256[]",
"name": "values",
"type": "uint256[]"
},
{
"internalType": "bytes[]",
"name": "datas",
"type": "bytes[]"
}
],
"name": "batchSendUnchecked",
"outputs": [],
"stateMutability": "payable",
"type": "function"
}
],
"transactionHash": "0x50a763cdca3efd37d6f33e98d7ea345ef4f6ad821949aba64ca8ce2a06c8b06a",
"receipt": {
"to": null,
"from": "0xf1C7c037891525E360C59f708739Ac09A7670c59",
"contractAddress": "0xBC5ef8d9ad307154447AE148c088f083d2dEa4eF",
"transactionIndex": 4,
"gasUsed": "458947",
"logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0x1bfe2ba4e8defa670819e72dbe2fbac4d9b7ea05cfbbdafe0335df02d9410842",
"transactionHash": "0x50a763cdca3efd37d6f33e98d7ea345ef4f6ad821949aba64ca8ce2a06c8b06a",
"logs": [],
"blockNumber": 235536061,
"cumulativeGasUsed": "1233814",
"status": 1,
"byzantium": true
},
"args": [],
"numDeployments": 1,
"solcInputHash": "036e2ca71d8ebdd78fd6317e15ba1f3c",
"metadata": "{\"compiler\":{\"version\":\"0.8.24+commit.e11b9ed9\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"datas\",\"type\":\"bytes[]\"}],\"name\":\"batchSend\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"targets\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes[]\",\"name\":\"datas\",\"type\":\"bytes[]\"}],\"name\":\"batchSendUnchecked\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}],\"devdoc\":{\"kind\":\"dev\",\"methods\":{},\"version\":1},\"userdoc\":{\"kind\":\"user\",\"methods\":{},\"version\":1}},\"settings\":{\"compilationTarget\":{\"src/utils/TransactionBatcher.sol\":\"TransactionBatcher\"},\"evmVersion\":\"shanghai\",\"libraries\":{},\"metadata\":{\"bytecodeHash\":\"ipfs\",\"useLiteralContent\":true},\"optimizer\":{\"enabled\":true,\"runs\":100},\"remappings\":[]},\"sources\":{\"src/utils/TransactionBatcher.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity ^0.8.0;\\n\\n// Adapted from https://github.com/daostack/web3-transaction-batcher/blob/1b88d2ea062f8f2d9fdfdf9bbe85d2bbef780151/contracts/Batcher.sol\\n\\ncontract TransactionBatcher {\\n\\n function batchSend(address[] memory targets, uint256[] memory values, bytes[] memory datas) public payable {\\n for (uint256 i = 0; i < targets.length; i++) {\\n (bool success,) = targets[i].call{value: values[i]}(datas[i]);\\n if (!success) revert('transaction failed'); // All the calls must succeed.\\n }\\n }\\n\\n function batchSendUnchecked(address[] memory targets, uint256[] memory values, bytes[] memory datas) public payable {\\n for (uint256 i = 0; i < targets.length; i++) {\\n targets[i].call{value: values[i]}(datas[i]); // Intentionally ignoring return value.\\n }\\n }\\n}\\n\",\"keccak256\":\"0x1983237012c29ef487ca47d60b197eb30d5b072ffec3078685d43fcc5fcc10a0\",\"license\":\"MIT\"}},\"version\":1}",
"bytecode": "0x608060405234801561000f575f80fd5b506105238061001d5f395ff3fe608060405260043610610028575f3560e01c8063a8f0802e1461002c578063cef591aa14610041575b5f80fd5b61003f61003a3660046103c4565b610054565b005b61003f61004f3660046103c4565b61015c565b5f5b8351811015610156575f848281518110610072576100726104ad565b60200260200101516001600160a01b0316848381518110610095576100956104ad565b60200260200101518484815181106100af576100af6104ad565b60200260200101516040516100c491906104c1565b5f6040518083038185875af1925050503d805f81146100fe576040519150601f19603f3d011682016040523d82523d5f602084013e610103565b606091505b505090508061014d5760405162461bcd60e51b81526020600482015260126024820152711d1c985b9cd858dd1a5bdb8819985a5b195960721b604482015260640160405180910390fd5b50600101610056565b50505050565b5f5b835181101561015657838181518110610179576101796104ad565b60200260200101516001600160a01b031683828151811061019c5761019c6104ad565b60200260200101518383815181106101b6576101b66104ad565b60200260200101516040516101cb91906104c1565b5f6040518083038185875af1925050503d805f8114610205576040519150601f19603f3d011682016040523d82523d5f602084013e61020a565b606091505b50505060010161015e565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561025257610252610215565b604052919050565b5f67ffffffffffffffff82111561027357610273610215565b5060051b60200190565b5f82601f83011261028c575f80fd5b813560206102a161029c8361025a565b610229565b8083825260208201915060208460051b8701019350868411156102c2575f80fd5b602086015b848110156102de57803583529183019183016102c7565b509695505050505050565b5f601f83601f8401126102fa575f80fd5b8235602061030a61029c8361025a565b82815260059290921b85018101918181019087841115610328575f80fd5b8287015b848110156103b857803567ffffffffffffffff8082111561034b575f80fd5b818a0191508a603f83011261035e575f80fd5b8582013560408282111561037457610374610215565b610385828b01601f19168901610229565b92508183528c8183860101111561039a575f80fd5b8181850189850137505f90820187015284525091830191830161032c565b50979650505050505050565b5f805f606084860312156103d6575f80fd5b833567ffffffffffffffff808211156103ed575f80fd5b818601915086601f830112610400575f80fd5b8135602061041061029c8361025a565b82815260059290921b8401810191818101908a84111561042e575f80fd5b948201945b838610156104605785356001600160a01b0381168114610451575f80fd5b82529482019490820190610433565b97505087013592505080821115610475575f80fd5b6104818783880161027d565b93506040860135915080821115610496575f80fd5b506104a3868287016102e9565b9150509250925092565b634e487b7160e01b5f52603260045260245ffd5b5f82515f5b818110156104e057602081860181015185830152016104c6565b505f92019182525091905056fea264697066735822122089797200888ad757484ded7bc0ffbb0769e9e974d73188d61385b7f6675e9f2064736f6c63430008180033",
"deployedBytecode": "0x608060405260043610610028575f3560e01c8063a8f0802e1461002c578063cef591aa14610041575b5f80fd5b61003f61003a3660046103c4565b610054565b005b61003f61004f3660046103c4565b61015c565b5f5b8351811015610156575f848281518110610072576100726104ad565b60200260200101516001600160a01b0316848381518110610095576100956104ad565b60200260200101518484815181106100af576100af6104ad565b60200260200101516040516100c491906104c1565b5f6040518083038185875af1925050503d805f81146100fe576040519150601f19603f3d011682016040523d82523d5f602084013e610103565b606091505b505090508061014d5760405162461bcd60e51b81526020600482015260126024820152711d1c985b9cd858dd1a5bdb8819985a5b195960721b604482015260640160405180910390fd5b50600101610056565b50505050565b5f5b835181101561015657838181518110610179576101796104ad565b60200260200101516001600160a01b031683828151811061019c5761019c6104ad565b60200260200101518383815181106101b6576101b66104ad565b60200260200101516040516101cb91906104c1565b5f6040518083038185875af1925050503d805f8114610205576040519150601f19603f3d011682016040523d82523d5f602084013e61020a565b606091505b50505060010161015e565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561025257610252610215565b604052919050565b5f67ffffffffffffffff82111561027357610273610215565b5060051b60200190565b5f82601f83011261028c575f80fd5b813560206102a161029c8361025a565b610229565b8083825260208201915060208460051b8701019350868411156102c2575f80fd5b602086015b848110156102de57803583529183019183016102c7565b509695505050505050565b5f601f83601f8401126102fa575f80fd5b8235602061030a61029c8361025a565b82815260059290921b85018101918181019087841115610328575f80fd5b8287015b848110156103b857803567ffffffffffffffff8082111561034b575f80fd5b818a0191508a603f83011261035e575f80fd5b8582013560408282111561037457610374610215565b610385828b01601f19168901610229565b92508183528c8183860101111561039a575f80fd5b8181850189850137505f90820187015284525091830191830161032c565b50979650505050505050565b5f805f606084860312156103d6575f80fd5b833567ffffffffffffffff808211156103ed575f80fd5b818601915086601f830112610400575f80fd5b8135602061041061029c8361025a565b82815260059290921b8401810191818101908a84111561042e575f80fd5b948201945b838610156104605785356001600160a01b0381168114610451575f80fd5b82529482019490820190610433565b97505087013592505080821115610475575f80fd5b6104818783880161027d565b93506040860135915080821115610496575f80fd5b506104a3868287016102e9565b9150509250925092565b634e487b7160e01b5f52603260045260245ffd5b5f82515f5b818110156104e057602081860181015185830152016104c6565b505f92019182525091905056fea264697066735822122089797200888ad757484ded7bc0ffbb0769e9e974d73188d61385b7f6675e9f2064736f6c63430008180033",
"devdoc": {
"kind": "dev",
"methods": {},
"version": 1
},
"userdoc": {
"kind": "user",
"methods": {},
"version": 1
},
"storageLayout": {
"storage": [],
"types": null
}
}
Loading
Loading