Skip to content
Merged

Dev #78

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
4 changes: 2 additions & 2 deletions artifacts/contracts/OrionConfig.sol/OrionConfig.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,19 @@
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "asset",
"type": "address"
}
],
"name": "validateExecutionAdapter",
"outputs": [],
"stateMutability": "view",
"type": "function"
}
],
"bytecode": "0x",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,19 @@
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address[]",
"name": "vaultWhitelistedAssets",
"type": "address[]"
}
],
"name": "validateStrategy",
"outputs": [],
"stateMutability": "view",
"type": "function"
}
],
"bytecode": "0x",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,19 @@
"name": "Transfer",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address[]",
"name": "assets",
"type": "address[]"
}
],
"name": "VaultWhitelistUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
Expand Down
13 changes: 13 additions & 0 deletions artifacts/contracts/interfaces/IOrionVault.sol/IOrionVault.json
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,19 @@
"name": "Transfer",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address[]",
"name": "assets",
"type": "address[]"
}
],
"name": "VaultWhitelistUpdated",
"type": "event"
},
Comment on lines +305 to +317

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Remove indexed modifier from array parameter.

The indexed modifier on the assets parameter (type address[]) is ignored by Solidity—arrays cannot be indexed in events. This creates misleading ABI metadata and inconsistency across similar event definitions in the PR.

Remove the indexed modifier:

     {
       "anonymous": false,
       "inputs": [
         {
-          "indexed": true,
+          "indexed": false,
           "internalType": "address[]",
           "name": "assets",
           "type": "address[]"
         }
       ],
       "name": "VaultWhitelistUpdated",
       "type": "event"
     },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address[]",
"name": "assets",
"type": "address[]"
}
],
"name": "VaultWhitelistUpdated",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address[]",
"name": "assets",
"type": "address[]"
}
],
"name": "VaultWhitelistUpdated",
"type": "event"
},
🤖 Prompt for AI Agents
In artifacts/contracts/interfaces/IOrionVault.sol/IOrionVault.json around lines
305 to 317, the event input for "assets" is incorrectly marked with "indexed":
true even though array types cannot be indexed in Solidity; remove the "indexed"
property (or set it to false/remove the key) from that input so the ABI
accurately reflects a non-indexed address[] parameter and matches other event
definitions.

{
"anonymous": false,
"inputs": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,25 @@
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "asset",
"type": "address"
}
],
"name": "validatePriceAdapter",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "view",
"type": "function"
}
],
"bytecode": "0x",
Expand Down
19 changes: 17 additions & 2 deletions artifacts/contracts/libraries/ErrorsLib.sol/ErrorsLib.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
"name": "InsufficientAmount",
"type": "error"
},
{
"inputs": [],
"name": "InvalidAdapter",
"type": "error"
},
{
"inputs": [],
"name": "InvalidAddress",
Expand All @@ -39,11 +44,21 @@
"name": "InvalidArguments",
"type": "error"
},
{
"inputs": [],
"name": "InvalidCuratorContract",
"type": "error"
},
{
"inputs": [],
"name": "InvalidState",
"type": "error"
},
{
"inputs": [],
"name": "InvalidStrategy",
"type": "error"
},
{
"inputs": [],
"name": "InvalidTotalWeight",
Expand Down Expand Up @@ -112,8 +127,8 @@
"type": "error"
}
],
"bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212201147fa50f7bbbde98ecda8acfb57db7beef6af65b145b7ee8f55f1b4b42f3b1564736f6c634300081c0033",
"deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212201147fa50f7bbbde98ecda8acfb57db7beef6af65b145b7ee8f55f1b4b42f3b1564736f6c634300081c0033",
"bytecode": "0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212209f522da08d058515f871960c88121128e93cc3af270df67773313f62ce3b330264736f6c634300081c0033",
"deployedBytecode": "0x730000000000000000000000000000000000000000301460806040525f5ffdfea26469706673582212209f522da08d058515f871960c88121128e93cc3af270df67773313f62ce3b330264736f6c634300081c0033",
"linkReferences": {},
"deployedLinkReferences": {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
"inputs": [
{
"internalType": "address",
"name": "asset",
"name": "",
"type": "address"
},
{
"internalType": "uint256",
"name": "sharesAmount",
"name": "",
"type": "uint256"
}
],
Expand All @@ -29,19 +29,19 @@
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "asset",
"name": "",
"type": "address"
},
{
"internalType": "uint256",
"name": "sharesAmount",
"name": "",
"type": "uint256"
}
],
Expand All @@ -53,12 +53,25 @@
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"stateMutability": "pure",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "validateExecutionAdapter",
"outputs": [],
"stateMutability": "pure",
"type": "function"
}
],
"bytecode": "0x6080604052348015600e575f5ffd5b5060c680601a5f395ff3fe6080604052348015600e575f5ffd5b50600436106030575f3560e01c80636c197ff5146034578063cce7ec13146034575b5f5ffd5b604b603f366004605d565b5064e8d4a51000919050565b60405190815260200160405180910390f35b5f5f60408385031215606d575f5ffd5b82356001600160a01b03811681146082575f5ffd5b94602093909301359350505056fea26469706673582212209a1a0f8b2b358d429bcc2937309050d3ac73a6a6326d7d3e50cc05a5758dfa8d64736f6c634300081c0033",
"deployedBytecode": "0x6080604052348015600e575f5ffd5b50600436106030575f3560e01c80636c197ff5146034578063cce7ec13146034575b5f5ffd5b604b603f366004605d565b5064e8d4a51000919050565b60405190815260200160405180910390f35b5f5f60408385031215606d575f5ffd5b82356001600160a01b03811681146082575f5ffd5b94602093909301359350505056fea26469706673582212209a1a0f8b2b358d429bcc2937309050d3ac73a6a6326d7d3e50cc05a5758dfa8d64736f6c634300081c0033",
"bytecode": "0x6080604052348015600e575f5ffd5b506101098061001c5f395ff3fe6080604052348015600e575f5ffd5b5060043610603a575f3560e01c80633da7c9f614603e5780636c197ff514604e578063cce7ec1314604e575b5f5ffd5b604c60493660046091565b50565b005b6065605936600460ae565b5064e8d4a51000919050565b60405190815260200160405180910390f35b80356001600160a01b0381168114608c575f5ffd5b919050565b5f6020828403121560a0575f5ffd5b60a7826077565b9392505050565b5f5f6040838503121560be575f5ffd5b60c5836077565b94602093909301359350505056fea26469706673582212206cd22a648e0164454f3e647cc243ee46fe078bc8582074cd1ea0b03b1df23ec764736f6c634300081c0033",
"deployedBytecode": "0x6080604052348015600e575f5ffd5b5060043610603a575f3560e01c80633da7c9f614603e5780636c197ff514604e578063cce7ec1314604e575b5f5ffd5b604c60493660046091565b50565b005b6065605936600460ae565b5064e8d4a51000919050565b60405190815260200160405180910390f35b80356001600160a01b0381168114608c575f5ffd5b919050565b5f6020828403121560a0575f5ffd5b60a7826077565b9392505050565b5f5f6040838503121560be575f5ffd5b60c5836077565b94602093909301359350505056fea26469706673582212206cd22a648e0164454f3e647cc243ee46fe078bc8582074cd1ea0b03b1df23ec764736f6c634300081c0033",
"linkReferences": {},
"deployedLinkReferences": {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,29 @@
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "validatePriceAdapter",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "pure",
"type": "function"
}
],
"bytecode": "0x6080604052348015600e575f5ffd5b5061018b8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610029575f3560e01c806372279ba11461002d575b5f5ffd5b61004061003b3660046100c9565b61005b565b6040805192835260ff90911660208301520160405180910390f35b5f8080606461006b60014361010a565b60408051914060208301524290820152606086811b6001600160601b03191690820152607401604051602081830303815290604052805190602001205f1c6100b39190610123565b6100be906001610142565b94600e945092505050565b5f602082840312156100d9575f5ffd5b81356001600160a01b03811681146100ef575f5ffd5b9392505050565b634e487b7160e01b5f52601160045260245ffd5b8181038181111561011d5761011d6100f6565b92915050565b5f8261013d57634e487b7160e01b5f52601260045260245ffd5b500690565b8082018082111561011d5761011d6100f656fea264697066735822122067f48b84030ff85d6303bbbc7a074a546326723a6b709214c224ba3627518f3d64736f6c634300081c0033",
"deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c806372279ba11461002d575b5f5ffd5b61004061003b3660046100c9565b61005b565b6040805192835260ff90911660208301520160405180910390f35b5f8080606461006b60014361010a565b60408051914060208301524290820152606086811b6001600160601b03191690820152607401604051602081830303815290604052805190602001205f1c6100b39190610123565b6100be906001610142565b94600e945092505050565b5f602082840312156100d9575f5ffd5b81356001600160a01b03811681146100ef575f5ffd5b9392505050565b634e487b7160e01b5f52601160045260245ffd5b8181038181111561011d5761011d6100f6565b92915050565b5f8261013d57634e487b7160e01b5f52601260045260245ffd5b500690565b8082018082111561011d5761011d6100f656fea264697066735822122067f48b84030ff85d6303bbbc7a074a546326723a6b709214c224ba3627518f3d64736f6c634300081c0033",
"bytecode": "0x6080604052348015600e575f5ffd5b506101bb8061001c5f395ff3fe608060405234801561000f575f5ffd5b5060043610610034575f3560e01c80636ab8bdef1461003857806372279ba114610061575b5f5ffd5b61004c6100463660046100f9565b50600190565b60405190151581526020015b60405180910390f35b61007461006f3660046100f9565b61008b565b6040805192835260ff909116602083015201610058565b5f8080606461009b60014361013a565b60408051914060208301524290820152606086811b6001600160601b03191690820152607401604051602081830303815290604052805190602001205f1c6100e39190610153565b6100ee906001610172565b94600e945092505050565b5f60208284031215610109575f5ffd5b81356001600160a01b038116811461011f575f5ffd5b9392505050565b634e487b7160e01b5f52601160045260245ffd5b8181038181111561014d5761014d610126565b92915050565b5f8261016d57634e487b7160e01b5f52601260045260245ffd5b500690565b8082018082111561014d5761014d61012656fea264697066735822122074ccd0188617606e63c9abe9c4911cd4c992b35460642ac43f3c2088431f5db864736f6c634300081c0033",
"deployedBytecode": "0x608060405234801561000f575f5ffd5b5060043610610034575f3560e01c80636ab8bdef1461003857806372279ba114610061575b5f5ffd5b61004c6100463660046100f9565b50600190565b60405190151581526020015b60405180910390f35b61007461006f3660046100f9565b61008b565b6040805192835260ff909116602083015201610058565b5f8080606461009b60014361013a565b60408051914060208301524290820152606086811b6001600160601b03191690820152607401604051602081830303815290604052805190602001205f1c6100e39190610153565b6100ee906001610172565b94600e945092505050565b5f60208284031215610109575f5ffd5b81356001600160a01b038116811461011f575f5ffd5b9392505050565b634e487b7160e01b5f52601160045260245ffd5b8181038181111561014d5761014d610126565b92915050565b5f8261016d57634e487b7160e01b5f52601260045260245ffd5b500690565b8082018082111561014d5761014d61012656fea264697066735822122074ccd0188617606e63c9abe9c4911cd4c992b35460642ac43f3c2088431f5db864736f6c634300081c0033",
"linkReferences": {},
"deployedLinkReferences": {}
}

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading