Skip to content

Commit

Permalink
Hats fixes (#69)
Browse files Browse the repository at this point in the history
* Change uint96 to uint128 for queuedShares, unclaimedAssets

* Fix signatures verifaction with 0 min oracles

* Fix EIP-712 type hashes

* Fix flashloan attack

* Add deadline to validators approval

* Fix tests

* Deploy to goerli

* Fix outdated signatures typehash

* Fix tests

* Fix tests, snapshots

* Check collateralized and positive first state update in Genesis vault

* Fix snapshot

* Do not fail harvest with same params

* Apply gas fixes

* Multicall gas improvement

* WIP

* Merge redeem and enter exit queue

* Revert merging redeem and enter exit queue

* Add too early claim check

* Fix linting warning
  • Loading branch information
tsudmi authored Oct 11, 2023
1 parent c82fc57 commit b3cd40a
Show file tree
Hide file tree
Showing 106 changed files with 2,564 additions and 1,311 deletions.
830 changes: 601 additions & 229 deletions .openzeppelin/goerli.json

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions abi/Errors.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@
"name": "CapacityExceeded",
"type": "error"
},
{
"inputs": [],
"name": "ClaimTooEarly",
"type": "error"
},
{
"inputs": [],
"name": "Collateralized",
"type": "error"
},
{
"inputs": [],
"name": "DeadlineExpired",
Expand Down Expand Up @@ -174,6 +184,11 @@
"name": "MaxOraclesExceeded",
"type": "error"
},
{
"inputs": [],
"name": "NegativeAssetsDelta",
"type": "error"
},
{
"inputs": [],
"name": "NotCollateralized",
Expand Down
69 changes: 54 additions & 15 deletions abi/IEthErc20Vault.json
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,11 @@
"name": "positionTicket",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "timestamp",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "exitQueueIndex",
Expand Down Expand Up @@ -599,19 +604,6 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "canUpdateExitQueue",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "capacity",
Expand All @@ -632,6 +624,11 @@
"name": "positionTicket",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "timestamp",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "exitQueueIndex",
Expand Down Expand Up @@ -827,6 +824,25 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "getShares",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "implementation",
Expand Down Expand Up @@ -1105,9 +1121,9 @@
"name": "queuedShares",
"outputs": [
{
"internalType": "uint96",
"internalType": "uint128",
"name": "",
"type": "uint96"
"type": "uint128"
}
],
"stateMutability": "view",
Expand Down Expand Up @@ -1182,6 +1198,11 @@
"name": "validatorsRegistryRoot",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "deadline",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "validators",
Expand Down Expand Up @@ -1222,6 +1243,11 @@
"name": "validatorsRegistryRoot",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "deadline",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "validators",
Expand Down Expand Up @@ -1341,6 +1367,19 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalShares",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalSupply",
Expand Down
77 changes: 42 additions & 35 deletions abi/IEthGenesisVault.json
Original file line number Diff line number Diff line change
Expand Up @@ -474,25 +474,6 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
Expand Down Expand Up @@ -524,6 +505,11 @@
"name": "positionTicket",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "timestamp",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "exitQueueIndex",
Expand Down Expand Up @@ -551,19 +537,6 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "canUpdateExitQueue",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "capacity",
Expand All @@ -584,6 +557,11 @@
"name": "positionTicket",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "timestamp",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "exitQueueIndex",
Expand Down Expand Up @@ -742,6 +720,25 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "getShares",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "implementation",
Expand Down Expand Up @@ -945,9 +942,9 @@
"name": "queuedShares",
"outputs": [
{
"internalType": "uint96",
"internalType": "uint128",
"name": "",
"type": "uint96"
"type": "uint128"
}
],
"stateMutability": "view",
Expand Down Expand Up @@ -1022,6 +1019,11 @@
"name": "validatorsRegistryRoot",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "deadline",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "validators",
Expand Down Expand Up @@ -1062,6 +1064,11 @@
"name": "validatorsRegistryRoot",
"type": "bytes32"
},
{
"internalType": "uint256",
"name": "deadline",
"type": "uint256"
},
{
"internalType": "bytes",
"name": "validators",
Expand Down Expand Up @@ -1170,7 +1177,7 @@
},
{
"inputs": [],
"name": "totalSupply",
"name": "totalShares",
"outputs": [
{
"internalType": "uint256",
Expand Down
Loading

0 comments on commit b3cd40a

Please sign in to comment.