Skip to content

Commit

Permalink
Merge pull request #156 from valory-xyz/addressing_issue_22
Browse files Browse the repository at this point in the history
refactor and test: addressing C4R issue 22
  • Loading branch information
DavidMinarsch authored Jul 12, 2024
2 parents aa49aaf + 660e67c commit 10bdd73
Show file tree
Hide file tree
Showing 63 changed files with 2,228 additions and 998 deletions.
26 changes: 25 additions & 1 deletion .gitleaksignore
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,28 @@ c1ebdf6ee1d58b2a7aa8ece47be8aaf70e4768ec:audits/internal4/analysis/contracts/dif
613f448aa91f0679f82affe37db9d9431f3e6071:scripts/deployment/globals_mainnet.json:generic-api-key:1
613f448aa91f0679f82affe37db9d9431f3e6071:scripts/deployment/globals_mainnet.json:generic-api-key:2
f78d4539c80abb33ea04dce4d561af5302033235:scripts/deployment/staking/globals_sepolia.json:generic-api-key:1
f78d4539c80abb33ea04dce4d561af5302033235:scripts/deployment/staking/globals_sepolia.json:generic-api-key:2
f78d4539c80abb33ea04dce4d561af5302033235:scripts/deployment/staking/globals_sepolia.json:generic-api-key:2
07a847c26178454e2be164f308de5fd55f6dd1f2:scripts/deployment/staking/globals_sepolia.json:generic-api-key:1
07a847c26178454e2be164f308de5fd55f6dd1f2:scripts/deployment/staking/globals_sepolia.json:generic-api-key:2
1c515d38908353c831504dca8cf674f62b904b7f:scripts/deployment/staking/wormhole/globals_celo_mainnet.json:generic-api-key:1
1c515d38908353c831504dca8cf674f62b904b7f:scripts/deployment/staking/wormhole/globals_celo_mainnet.json:generic-api-key:2
1c515d38908353c831504dca8cf674f62b904b7f:scripts/deployment/staking/wormhole/globals_polygon_mainnet.json:generic-api-key:1
1c515d38908353c831504dca8cf674f62b904b7f:scripts/deployment/staking/globals_sepolia.json:generic-api-key:1
09d62b39acd12adee10297a06c3b700e98c7f419:scripts/deployment/staking/globals_sepolia.json:generic-api-key:1
0d19a66b3e2100d57dfac89d1b791a6d8467ba84:scripts/deployment/staking/globals_sepolia.json:generic-api-key:1
1c515d38908353c831504dca8cf674f62b904b7f:scripts/deployment/staking/wormhole/globals_polygon_mainnet.json:generic-api-key:2
1c515d38908353c831504dca8cf674f62b904b7f:scripts/deployment/staking/globals_sepolia.json:generic-api-key:2
09d62b39acd12adee10297a06c3b700e98c7f419:scripts/deployment/staking/globals_sepolia.json:generic-api-key:2
0d19a66b3e2100d57dfac89d1b791a6d8467ba84:scripts/deployment/staking/globals_sepolia.json:generic-api-key:2
7a3e976da8f9d2322911b3008422bd875abaec7f:scripts/deployment/staking/wormhole/globals_polygon_mainnet.json:generic-api-key:2
7a3e976da8f9d2322911b3008422bd875abaec7f:scripts/deployment/staking/wormhole/globals_polygon_mainnet.json:generic-api-key:1
7a3e976da8f9d2322911b3008422bd875abaec7f:scripts/deployment/staking/wormhole/globals_celo_mainnet.json:generic-api-key:2
7a3e976da8f9d2322911b3008422bd875abaec7f:scripts/deployment/staking/wormhole/globals_celo_mainnet.json:generic-api-key:1
602cfa1ef3933707828398ee42b0d923abfe39ff:scripts/deployment/staking/wormhole/globals_celo_mainnet.json:generic-api-key:2
602cfa1ef3933707828398ee42b0d923abfe39ff:scripts/deployment/staking/wormhole/globals_celo_mainnet.json:generic-api-key:1
602cfa1ef3933707828398ee42b0d923abfe39ff:scripts/deployment/staking/wormhole/globals_polygon_mainnet.json:generic-api-key:2
602cfa1ef3933707828398ee42b0d923abfe39ff:scripts/deployment/staking/wormhole/globals_polygon_mainnet.json:generic-api-key:1
9fa4b1fb81ba553ed48ef4a9b22c53ecdf4d2242:scripts/deployment/staking/globals_sepolia.json:generic-api-key:1
9fa4b1fb81ba553ed48ef4a9b22c53ecdf4d2242:scripts/deployment/staking/globals_sepolia.json:generic-api-key:2
001d71fc7c216c593faebdd3d6f353efaf80605f:scripts/deployment/staking/globals_sepolia.json:generic-api-key:1
001d71fc7c216c593faebdd3d6f353efaf80605f:scripts/deployment/staking/globals_sepolia.json:generic-api-key:2
67 changes: 62 additions & 5 deletions abis/0.8.25/ArbitrumDepositProcessorL1.json

Large diffs are not rendered by default.

158 changes: 101 additions & 57 deletions abis/0.8.25/ArbitrumTargetDispenserL2.json

Large diffs are not rendered by default.

63 changes: 60 additions & 3 deletions abis/0.8.25/DefaultDepositProcessorL1.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@
"type": "uint256"
},
{
"internalType": "uint256",
"name": "batchNonce",
"type": "uint256"
"internalType": "bytes32",
"name": "batchHash",
"type": "bytes32"
}
],
"name": "TargetAmountNotQueued",
Expand Down Expand Up @@ -286,6 +286,25 @@
"name": "L2TargetDispenserUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "leftovers",
"type": "uint256"
}
],
"name": "LeftoversRefunded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
Expand All @@ -312,6 +331,12 @@
"internalType": "uint256",
"name": "transferAmount",
"type": "uint256"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "batchHash",
"type": "bytes32"
}
],
"name": "MessagePosted",
Expand Down Expand Up @@ -498,6 +523,25 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"name": "processedHashes",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
Expand Down Expand Up @@ -579,6 +623,19 @@
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "batchHash",
"type": "bytes32"
}
],
"name": "updateHashMaintenance",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x",
Expand Down
154 changes: 99 additions & 55 deletions abis/0.8.25/DefaultTargetDispenserL2.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@
"type": "uint256"
},
{
"internalType": "uint256",
"name": "batchNonce",
"type": "uint256"
"internalType": "bytes32",
"name": "batchHash",
"type": "bytes32"
}
],
"name": "TargetAmountNotQueued",
Expand Down Expand Up @@ -335,27 +335,46 @@
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "sequence",
"name": "leftovers",
"type": "uint256"
},
}
],
"name": "LeftoversRefunded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "messageSender",
"type": "address"
"internalType": "uint256",
"name": "sequence",
"type": "uint256"
},
{
"indexed": true,
"internalType": "address",
"name": "l1Processor",
"name": "messageSender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "batchHash",
"type": "bytes32"
}
],
"name": "MessagePosted",
Expand Down Expand Up @@ -445,10 +464,16 @@
"name": "amount",
"type": "uint256"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "batchHash",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "batchNonce",
"name": "olasBalance",
"type": "uint256"
},
{
Expand All @@ -475,6 +500,12 @@
"internalType": "uint256",
"name": "amount",
"type": "uint256"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "batchHash",
"type": "bytes32"
}
],
"name": "StakingTargetDeposited",
Expand All @@ -492,28 +523,9 @@
"name": "TargetDispenserUnpaused",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "WithheldAmountSynced",
"type": "event"
},
{
"inputs": [],
"name": "GAS_LIMIT",
"name": "MAX_CHAIN_ID",
"outputs": [
{
"internalType": "uint256",
Expand All @@ -526,7 +538,7 @@
},
{
"inputs": [],
"name": "MAX_CHAIN_ID",
"name": "MAX_GAS_LIMIT",
"outputs": [
{
"internalType": "uint256",
Expand All @@ -539,7 +551,7 @@
},
{
"inputs": [],
"name": "MAX_GAS_LIMIT",
"name": "MIN_GAS_LIMIT",
"outputs": [
{
"internalType": "uint256",
Expand Down Expand Up @@ -589,6 +601,19 @@
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "getBridgingDecimals",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [],
"name": "l1DepositProcessor",
Expand Down Expand Up @@ -700,6 +725,44 @@
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"name": "processedHashes",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"name": "queuedHashes",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
Expand All @@ -713,9 +776,9 @@
"type": "uint256"
},
{
"internalType": "uint256",
"name": "batchNonce",
"type": "uint256"
"internalType": "bytes32",
"name": "batchHash",
"type": "bytes32"
}
],
"name": "redeem",
Expand Down Expand Up @@ -749,25 +812,6 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"name": "stakingQueueingNonces",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
Expand All @@ -776,7 +820,7 @@
"type": "bytes"
}
],
"name": "syncWithheldTokens",
"name": "syncWithheldAmount",
"outputs": [],
"stateMutability": "payable",
"type": "function"
Expand Down
Loading

0 comments on commit 10bdd73

Please sign in to comment.