From 0ed99deb67a5bb3fdab939eda159e17ec8fbad91 Mon Sep 17 00:00:00 2001 From: Larry the Cucumber Date: Wed, 4 Dec 2024 11:56:41 -0500 Subject: [PATCH 1/3] remove berps and bend --- bend/ACLManager.json | 596 ------ bend/AToken.json | 912 ---------- bend/BendOracle.json | 229 --- bend/BorrowLogic.json | 213 --- bend/Pool.json | 1721 ------------------ bend/PoolAddressesProvider.json | 644 ------- bend/PoolAddressesProviderRegistry.json | 185 -- bend/PoolConfigurator.json | 1291 ------------- bend/PoolDataProvider.json | 523 ------ bend/PoolLogic.json | 40 - bend/SupplyLogic.json | 151 -- bend/VariableDebtToken.json | 831 --------- berps/Entrypoint.json | 974 ---------- berps/FeesAccrued.json | 1699 ----------------- berps/FeesMarkets.json | 1498 --------------- berps/Markets.json | 1221 ------------- berps/Orders.json | 1305 ------------- berps/Referrals.json | 552 ------ berps/Settlement.json | 1328 -------------- berps/Vault.json | 2217 ----------------------- berps/VaultSafetyModule.json | 364 ---- 21 files changed, 18494 deletions(-) delete mode 100644 bend/ACLManager.json delete mode 100644 bend/AToken.json delete mode 100644 bend/BendOracle.json delete mode 100644 bend/BorrowLogic.json delete mode 100644 bend/Pool.json delete mode 100644 bend/PoolAddressesProvider.json delete mode 100644 bend/PoolAddressesProviderRegistry.json delete mode 100644 bend/PoolConfigurator.json delete mode 100644 bend/PoolDataProvider.json delete mode 100644 bend/PoolLogic.json delete mode 100644 bend/SupplyLogic.json delete mode 100644 bend/VariableDebtToken.json delete mode 100644 berps/Entrypoint.json delete mode 100644 berps/FeesAccrued.json delete mode 100644 berps/FeesMarkets.json delete mode 100644 berps/Markets.json delete mode 100644 berps/Orders.json delete mode 100644 berps/Referrals.json delete mode 100644 berps/Settlement.json delete mode 100644 berps/Vault.json delete mode 100644 berps/VaultSafetyModule.json diff --git a/bend/ACLManager.json b/bend/ACLManager.json deleted file mode 100644 index 51dc854..0000000 --- a/bend/ACLManager.json +++ /dev/null @@ -1,596 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "provider", - "type": "address", - "internalType": "contract IPoolAddressesProvider" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "ADDRESSES_PROVIDER", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IPoolAddressesProvider" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "ASSET_LISTING_ADMIN_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "BRIDGE_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "DEFAULT_ADMIN_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "EMERGENCY_ADMIN_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "FLASH_BORROWER_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "POOL_ADMIN_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "RISK_ADMIN_ROLE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "addAssetListingAdmin", - "inputs": [ - { - "name": "admin", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "addBridge", - "inputs": [ - { - "name": "bridge", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "addEmergencyAdmin", - "inputs": [ - { - "name": "admin", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "addFlashBorrower", - "inputs": [ - { - "name": "borrower", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "addPoolAdmin", - "inputs": [ - { - "name": "admin", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "addRiskAdmin", - "inputs": [ - { - "name": "admin", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "getRoleAdmin", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "grantRole", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "hasRole", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isAssetListingAdmin", - "inputs": [ - { - "name": "admin", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isBridge", - "inputs": [ - { - "name": "bridge", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isEmergencyAdmin", - "inputs": [ - { - "name": "admin", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isFlashBorrower", - "inputs": [ - { - "name": "borrower", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isPoolAdmin", - "inputs": [ - { - "name": "admin", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isRiskAdmin", - "inputs": [ - { - "name": "admin", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "removeAssetListingAdmin", - "inputs": [ - { - "name": "admin", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "removeBridge", - "inputs": [ - { - "name": "bridge", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "removeEmergencyAdmin", - "inputs": [ - { - "name": "admin", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "removeFlashBorrower", - "inputs": [ - { - "name": "borrower", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "removePoolAdmin", - "inputs": [ - { - "name": "admin", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "removeRiskAdmin", - "inputs": [ - { - "name": "admin", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "renounceRole", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "revokeRole", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setRoleAdmin", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "adminRole", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "supportsInterface", - "inputs": [ - { - "name": "interfaceId", - "type": "bytes4", - "internalType": "bytes4" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "event", - "name": "RoleAdminChanged", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "previousAdminRole", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "newAdminRole", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RoleGranted", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "sender", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RoleRevoked", - "inputs": [ - { - "name": "role", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "account", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "sender", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - } -] diff --git a/bend/AToken.json b/bend/AToken.json deleted file mode 100644 index ff728a0..0000000 --- a/bend/AToken.json +++ /dev/null @@ -1,912 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "pool", - "type": "address", - "internalType": "contract IPool" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "ATOKEN_REVISION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "DOMAIN_SEPARATOR", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "EIP712_REVISION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes", - "internalType": "bytes" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "PERMIT_TYPEHASH", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "POOL", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IPool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "RESERVE_POL_FEE_COLLECTOR", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "UNDERLYING_ASSET_ADDRESS", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "allowance", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - }, - { - "name": "spender", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "approve", - "inputs": [ - { - "name": "spender", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "balanceOf", - "inputs": [ - { - "name": "user", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "burn", - "inputs": [ - { - "name": "from", - "type": "address", - "internalType": "address" - }, - { - "name": "receiverOfUnderlying", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "index", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "decimals", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint8", - "internalType": "uint8" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "decreaseAllowance", - "inputs": [ - { - "name": "spender", - "type": "address", - "internalType": "address" - }, - { - "name": "subtractedValue", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "getIncentivesController", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IAaveIncentivesController" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getPreviousIndex", - "inputs": [ - { - "name": "user", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getScaledUserBalanceAndSupply", - "inputs": [ - { - "name": "user", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "handleRepayment", - "inputs": [ - { - "name": "user", - "type": "address", - "internalType": "address" - }, - { - "name": "onBehalfOf", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "increaseAllowance", - "inputs": [ - { - "name": "spender", - "type": "address", - "internalType": "address" - }, - { - "name": "addedValue", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "initializingPool", - "type": "address", - "internalType": "contract IPool" - }, - { - "name": "polFeeCollector", - "type": "address", - "internalType": "address" - }, - { - "name": "underlyingAsset", - "type": "address", - "internalType": "address" - }, - { - "name": "incentivesController", - "type": "address", - "internalType": "contract IAaveIncentivesController" - }, - { - "name": "aTokenDecimals", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "aTokenName", - "type": "string", - "internalType": "string" - }, - { - "name": "aTokenSymbol", - "type": "string", - "internalType": "string" - }, - { - "name": "params", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "mint", - "inputs": [ - { - "name": "caller", - "type": "address", - "internalType": "address" - }, - { - "name": "onBehalfOf", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "index", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "mintToPOLFeeCollector", - "inputs": [ - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "index", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "nonces", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "permit", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - }, - { - "name": "spender", - "type": "address", - "internalType": "address" - }, - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "v", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "r", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "rescueTokens", - "inputs": [ - { - "name": "token", - "type": "address", - "internalType": "address" - }, - { - "name": "to", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "scaledBalanceOf", - "inputs": [ - { - "name": "user", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "scaledTotalSupply", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "setIncentivesController", - "inputs": [ - { - "name": "controller", - "type": "address", - "internalType": "contract IAaveIncentivesController" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "symbol", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "totalSupply", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "transfer", - "inputs": [ - { - "name": "recipient", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "transferFrom", - "inputs": [ - { - "name": "sender", - "type": "address", - "internalType": "address" - }, - { - "name": "recipient", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "transferOnLiquidation", - "inputs": [ - { - "name": "from", - "type": "address", - "internalType": "address" - }, - { - "name": "to", - "type": "address", - "internalType": "address" - }, - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "transferUnderlyingTo", - "inputs": [ - { - "name": "target", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "event", - "name": "Approval", - "inputs": [ - { - "name": "owner", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "spender", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "value", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "BalanceTransfer", - "inputs": [ - { - "name": "from", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "to", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "value", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "index", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Burn", - "inputs": [ - { - "name": "from", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "target", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "value", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "balanceIncrease", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "index", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Initialized", - "inputs": [ - { - "name": "underlyingAsset", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "pool", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "treasury", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "incentivesController", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "aTokenDecimals", - "type": "uint8", - "indexed": false, - "internalType": "uint8" - }, - { - "name": "aTokenName", - "type": "string", - "indexed": false, - "internalType": "string" - }, - { - "name": "aTokenSymbol", - "type": "string", - "indexed": false, - "internalType": "string" - }, - { - "name": "params", - "type": "bytes", - "indexed": false, - "internalType": "bytes" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Mint", - "inputs": [ - { - "name": "caller", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "onBehalfOf", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "value", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "balanceIncrease", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "index", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Transfer", - "inputs": [ - { - "name": "from", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "to", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "value", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - } -] diff --git a/bend/BendOracle.json b/bend/BendOracle.json deleted file mode 100644 index 93e5e82..0000000 --- a/bend/BendOracle.json +++ /dev/null @@ -1,229 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "provider", - "type": "address", - "internalType": "contract IPoolAddressesProvider" - }, - { - "name": "assets", - "type": "address[]", - "internalType": "address[]" - }, - { - "name": "sources", - "type": "address[]", - "internalType": "address[]" - }, - { - "name": "fallbackOracle", - "type": "address", - "internalType": "address" - }, - { - "name": "baseCurrency", - "type": "address", - "internalType": "address" - }, - { - "name": "baseCurrencyUnit", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "ADDRESSES_PROVIDER", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IPoolAddressesProvider" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "BASE_CURRENCY", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "BASE_CURRENCY_UNIT", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getAssetPrice", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getAssetsPrices", - "inputs": [ - { - "name": "assets", - "type": "address[]", - "internalType": "address[]" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getFallbackOracle", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getSourceOfAsset", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "setAssetSources", - "inputs": [ - { - "name": "assets", - "type": "address[]", - "internalType": "address[]" - }, - { - "name": "sources", - "type": "address[]", - "internalType": "address[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setFallbackOracle", - "inputs": [ - { - "name": "fallbackOracle", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "event", - "name": "AssetSourceUpdated", - "inputs": [ - { - "name": "asset", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "source", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "BaseCurrencySet", - "inputs": [ - { - "name": "baseCurrency", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "baseCurrencyUnit", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "FallbackOracleUpdated", - "inputs": [ - { - "name": "fallbackOracle", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - } -] diff --git a/bend/BorrowLogic.json b/bend/BorrowLogic.json deleted file mode 100644 index 6d28e4e..0000000 --- a/bend/BorrowLogic.json +++ /dev/null @@ -1,213 +0,0 @@ -[ - { - "type": "event", - "name": "Borrow", - "inputs": [ - { - "name": "reserve", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "user", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "onBehalfOf", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "interestRateMode", - "type": "uint8", - "indexed": false, - "internalType": "enum DataTypes.InterestRateMode" - }, - { - "name": "borrowRate", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "referralCode", - "type": "uint16", - "indexed": true, - "internalType": "uint16" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "IsolationModeTotalDebtUpdated", - "inputs": [ - { - "name": "asset", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "totalDebt", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "IsolationModeTotalDebtUpdated", - "inputs": [ - { - "name": "asset", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "totalDebt", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RebalanceStableBorrowRate", - "inputs": [ - { - "name": "reserve", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "user", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Repay", - "inputs": [ - { - "name": "reserve", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "user", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "repayer", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "useATokens", - "type": "bool", - "indexed": false, - "internalType": "bool" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ReserveDataUpdated", - "inputs": [ - { - "name": "reserve", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "liquidityRate", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "stableBorrowRate", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "variableBorrowRate", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "liquidityIndex", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "variableBorrowIndex", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "SwapBorrowRateMode", - "inputs": [ - { - "name": "reserve", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "user", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "interestRateMode", - "type": "uint8", - "indexed": false, - "internalType": "enum DataTypes.InterestRateMode" - } - ], - "anonymous": false - } -] diff --git a/bend/Pool.json b/bend/Pool.json deleted file mode 100644 index 4830dbd..0000000 --- a/bend/Pool.json +++ /dev/null @@ -1,1721 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "provider", - "type": "address", - "internalType": "contract IPoolAddressesProvider" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "ADDRESSES_PROVIDER", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IPoolAddressesProvider" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "BRIDGE_PROTOCOL_FEE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "FLASHLOAN_PREMIUM_TOTAL", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint128", - "internalType": "uint128" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "FLASHLOAN_PREMIUM_TO_PROTOCOL", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint128", - "internalType": "uint128" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "MAX_NUMBER_RESERVES", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint16", - "internalType": "uint16" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "MAX_STABLE_RATE_BORROW_SIZE_PERCENT", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "POOL_REVISION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "backUnbacked", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "fee", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "borrow", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "interestRateMode", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "referralCode", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "onBehalfOf", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "configureEModeCategory", - "inputs": [ - { - "name": "id", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "category", - "type": "tuple", - "internalType": "struct DataTypes.EModeCategory", - "components": [ - { - "name": "ltv", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "liquidationThreshold", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "liquidationBonus", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "priceSource", - "type": "address", - "internalType": "address" - }, - { - "name": "label", - "type": "string", - "internalType": "string" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "deposit", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "onBehalfOf", - "type": "address", - "internalType": "address" - }, - { - "name": "referralCode", - "type": "uint16", - "internalType": "uint16" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "dropReserve", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "finalizeTransfer", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "from", - "type": "address", - "internalType": "address" - }, - { - "name": "to", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "balanceFromBefore", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "balanceToBefore", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "flashLoan", - "inputs": [ - { - "name": "receiverAddress", - "type": "address", - "internalType": "address" - }, - { - "name": "assets", - "type": "address[]", - "internalType": "address[]" - }, - { - "name": "amounts", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "interestRateModes", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "onBehalfOf", - "type": "address", - "internalType": "address" - }, - { - "name": "params", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "referralCode", - "type": "uint16", - "internalType": "uint16" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "flashLoanSimple", - "inputs": [ - { - "name": "receiverAddress", - "type": "address", - "internalType": "address" - }, - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "params", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "referralCode", - "type": "uint16", - "internalType": "uint16" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "getConfiguration", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "tuple", - "internalType": "struct DataTypes.ReserveConfigurationMap", - "components": [ - { - "name": "data", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getEModeCategoryData", - "inputs": [ - { - "name": "id", - "type": "uint8", - "internalType": "uint8" - } - ], - "outputs": [ - { - "name": "", - "type": "tuple", - "internalType": "struct DataTypes.EModeCategory", - "components": [ - { - "name": "ltv", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "liquidationThreshold", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "liquidationBonus", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "priceSource", - "type": "address", - "internalType": "address" - }, - { - "name": "label", - "type": "string", - "internalType": "string" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getReserveAddressById", - "inputs": [ - { - "name": "id", - "type": "uint16", - "internalType": "uint16" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getReserveData", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "tuple", - "internalType": "struct DataTypes.ReserveData", - "components": [ - { - "name": "configuration", - "type": "tuple", - "internalType": "struct DataTypes.ReserveConfigurationMap", - "components": [ - { - "name": "data", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "name": "liquidityIndex", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "currentLiquidityRate", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "variableBorrowIndex", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "currentVariableBorrowRate", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "currentStableBorrowRate", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "lastUpdateTimestamp", - "type": "uint40", - "internalType": "uint40" - }, - { - "name": "id", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "aTokenAddress", - "type": "address", - "internalType": "address" - }, - { - "name": "stableDebtTokenAddress", - "type": "address", - "internalType": "address" - }, - { - "name": "variableDebtTokenAddress", - "type": "address", - "internalType": "address" - }, - { - "name": "interestRateStrategyAddress", - "type": "address", - "internalType": "address" - }, - { - "name": "accruedToTreasury", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "unbacked", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "isolationModeTotalDebt", - "type": "uint128", - "internalType": "uint128" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getReserveNormalizedIncome", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getReserveNormalizedVariableDebt", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getReservesList", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address[]", - "internalType": "address[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getUserAccountData", - "inputs": [ - { - "name": "user", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "totalCollateralBase", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "totalDebtBase", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "availableBorrowsBase", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "currentLiquidationThreshold", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "ltv", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "healthFactor", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getUserConfiguration", - "inputs": [ - { - "name": "user", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "tuple", - "internalType": "struct DataTypes.UserConfigurationMap", - "components": [ - { - "name": "data", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getUserEMode", - "inputs": [ - { - "name": "user", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "initReserve", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "aTokenAddress", - "type": "address", - "internalType": "address" - }, - { - "name": "stableDebtAddress", - "type": "address", - "internalType": "address" - }, - { - "name": "variableDebtAddress", - "type": "address", - "internalType": "address" - }, - { - "name": "interestRateStrategyAddress", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "provider", - "type": "address", - "internalType": "contract IPoolAddressesProvider" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "liquidationCall", - "inputs": [ - { - "name": "collateralAsset", - "type": "address", - "internalType": "address" - }, - { - "name": "debtAsset", - "type": "address", - "internalType": "address" - }, - { - "name": "user", - "type": "address", - "internalType": "address" - }, - { - "name": "debtToCover", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "receiveAToken", - "type": "bool", - "internalType": "bool" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "mintToPOLFeeCollector", - "inputs": [ - { - "name": "assets", - "type": "address[]", - "internalType": "address[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "mintUnbacked", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "onBehalfOf", - "type": "address", - "internalType": "address" - }, - { - "name": "referralCode", - "type": "uint16", - "internalType": "uint16" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "rebalanceStableBorrowRate", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "user", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "repay", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "interestRateMode", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "onBehalfOf", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "repayWithATokens", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "interestRateMode", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "repayWithPermit", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "interestRateMode", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "onBehalfOf", - "type": "address", - "internalType": "address" - }, - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "permitV", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "permitR", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "permitS", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "rescueTokens", - "inputs": [ - { - "name": "token", - "type": "address", - "internalType": "address" - }, - { - "name": "to", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "resetIsolationModeTotalDebt", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setConfiguration", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "configuration", - "type": "tuple", - "internalType": "struct DataTypes.ReserveConfigurationMap", - "components": [ - { - "name": "data", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setReserveInterestRateStrategyAddress", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "rateStrategyAddress", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setUserEMode", - "inputs": [ - { - "name": "categoryId", - "type": "uint8", - "internalType": "uint8" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setUserUseReserveAsCollateral", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "useAsCollateral", - "type": "bool", - "internalType": "bool" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "supply", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "onBehalfOf", - "type": "address", - "internalType": "address" - }, - { - "name": "referralCode", - "type": "uint16", - "internalType": "uint16" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "supplyWithPermit", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "onBehalfOf", - "type": "address", - "internalType": "address" - }, - { - "name": "referralCode", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "permitV", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "permitR", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "permitS", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "swapBorrowRateMode", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "interestRateMode", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateBridgeProtocolFee", - "inputs": [ - { - "name": "protocolFee", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateFlashloanPremiums", - "inputs": [ - { - "name": "flashLoanPremiumTotal", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "flashLoanPremiumToProtocol", - "type": "uint128", - "internalType": "uint128" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "withdraw", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "to", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "event", - "name": "BackUnbacked", - "inputs": [ - { - "name": "reserve", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "backer", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "fee", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Borrow", - "inputs": [ - { - "name": "reserve", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "user", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "onBehalfOf", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "interestRateMode", - "type": "uint8", - "indexed": false, - "internalType": "enum DataTypes.InterestRateMode" - }, - { - "name": "borrowRate", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "referralCode", - "type": "uint16", - "indexed": true, - "internalType": "uint16" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "FlashLoan", - "inputs": [ - { - "name": "target", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "initiator", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "asset", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "interestRateMode", - "type": "uint8", - "indexed": false, - "internalType": "enum DataTypes.InterestRateMode" - }, - { - "name": "premium", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "referralCode", - "type": "uint16", - "indexed": true, - "internalType": "uint16" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "IsolationModeTotalDebtUpdated", - "inputs": [ - { - "name": "asset", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "totalDebt", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "LiquidationCall", - "inputs": [ - { - "name": "collateralAsset", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "debtAsset", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "user", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "debtToCover", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "liquidatedCollateralAmount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "liquidator", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "receiveAToken", - "type": "bool", - "indexed": false, - "internalType": "bool" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "MintUnbacked", - "inputs": [ - { - "name": "reserve", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "user", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "onBehalfOf", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "referralCode", - "type": "uint16", - "indexed": true, - "internalType": "uint16" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "MintedToPOLFeeCollector", - "inputs": [ - { - "name": "reserve", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amountMinted", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RebalanceStableBorrowRate", - "inputs": [ - { - "name": "reserve", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "user", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Repay", - "inputs": [ - { - "name": "reserve", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "user", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "repayer", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "useATokens", - "type": "bool", - "indexed": false, - "internalType": "bool" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ReserveDataUpdated", - "inputs": [ - { - "name": "reserve", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "liquidityRate", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "stableBorrowRate", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "variableBorrowRate", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "liquidityIndex", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "variableBorrowIndex", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ReserveUsedAsCollateralDisabled", - "inputs": [ - { - "name": "reserve", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "user", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ReserveUsedAsCollateralEnabled", - "inputs": [ - { - "name": "reserve", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "user", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Supply", - "inputs": [ - { - "name": "reserve", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "user", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "onBehalfOf", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "referralCode", - "type": "uint16", - "indexed": true, - "internalType": "uint16" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "SwapBorrowRateMode", - "inputs": [ - { - "name": "reserve", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "user", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "interestRateMode", - "type": "uint8", - "indexed": false, - "internalType": "enum DataTypes.InterestRateMode" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "UserEModeSet", - "inputs": [ - { - "name": "user", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "categoryId", - "type": "uint8", - "indexed": false, - "internalType": "uint8" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Withdraw", - "inputs": [ - { - "name": "reserve", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "user", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "to", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - } -] diff --git a/bend/PoolAddressesProvider.json b/bend/PoolAddressesProvider.json deleted file mode 100644 index 2b324fd..0000000 --- a/bend/PoolAddressesProvider.json +++ /dev/null @@ -1,644 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "marketId", - "type": "string", - "internalType": "string" - }, - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "getACLAdmin", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getACLManager", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getAddress", - "inputs": [ - { - "name": "id", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getMarketId", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getPool", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getPoolConfigurator", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getPoolDataProvider", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getPriceOracle", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getPriceOracleSentinel", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getVariableDebtPOLRewardsVault", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getVariableDebtPeripheryToken", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "owner", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "renounceOwnership", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setACLAdmin", - "inputs": [ - { - "name": "newAclAdmin", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setACLManager", - "inputs": [ - { - "name": "newAclManager", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setAddress", - "inputs": [ - { - "name": "id", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "newAddress", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setAddressAsProxy", - "inputs": [ - { - "name": "id", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "newImplementationAddress", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setMarketId", - "inputs": [ - { - "name": "newMarketId", - "type": "string", - "internalType": "string" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setPoolConfiguratorImpl", - "inputs": [ - { - "name": "newPoolConfiguratorImpl", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setPoolDataProvider", - "inputs": [ - { - "name": "newDataProvider", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setPoolImpl", - "inputs": [ - { - "name": "newPoolImpl", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setPriceOracle", - "inputs": [ - { - "name": "newPriceOracle", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setPriceOracleSentinel", - "inputs": [ - { - "name": "newPriceOracleSentinel", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setVariableDebtPOLRewardsVault", - "inputs": [ - { - "name": "variableDebtRewardsVault", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setVariableDebtPeripheryToken", - "inputs": [ - { - "name": "variableDebtPeripheryToken", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "transferOwnership", - "inputs": [ - { - "name": "newOwner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "event", - "name": "ACLAdminUpdated", - "inputs": [ - { - "name": "oldAddress", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "newAddress", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ACLManagerUpdated", - "inputs": [ - { - "name": "oldAddress", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "newAddress", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "AddressSet", - "inputs": [ - { - "name": "id", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "oldAddress", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "newAddress", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "AddressSetAsProxy", - "inputs": [ - { - "name": "id", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "proxyAddress", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "oldImplementationAddress", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "newImplementationAddress", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "MarketIdSet", - "inputs": [ - { - "name": "oldMarketId", - "type": "string", - "indexed": true, - "internalType": "string" - }, - { - "name": "newMarketId", - "type": "string", - "indexed": true, - "internalType": "string" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "OwnershipTransferred", - "inputs": [ - { - "name": "previousOwner", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "newOwner", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "PoolConfiguratorUpdated", - "inputs": [ - { - "name": "oldAddress", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "newAddress", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "PoolDataProviderUpdated", - "inputs": [ - { - "name": "oldAddress", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "newAddress", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "PoolUpdated", - "inputs": [ - { - "name": "oldAddress", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "newAddress", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "PriceOracleSentinelUpdated", - "inputs": [ - { - "name": "oldAddress", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "newAddress", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "PriceOracleUpdated", - "inputs": [ - { - "name": "oldAddress", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "newAddress", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ProxyCreated", - "inputs": [ - { - "name": "id", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "proxyAddress", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "implementationAddress", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "VariableDebtPOLRewardsVaultUpdated", - "inputs": [ - { - "name": "newAddress", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "VariableDebtPeripheryTokenUpdated", - "inputs": [ - { - "name": "newAddress", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - } -] diff --git a/bend/PoolAddressesProviderRegistry.json b/bend/PoolAddressesProviderRegistry.json deleted file mode 100644 index 9c3243b..0000000 --- a/bend/PoolAddressesProviderRegistry.json +++ /dev/null @@ -1,185 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "getAddressesProviderAddressById", - "inputs": [ - { - "name": "id", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getAddressesProviderIdByAddress", - "inputs": [ - { - "name": "addressesProvider", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getAddressesProvidersList", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address[]", - "internalType": "address[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "owner", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "registerAddressesProvider", - "inputs": [ - { - "name": "provider", - "type": "address", - "internalType": "address" - }, - { - "name": "id", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "renounceOwnership", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "transferOwnership", - "inputs": [ - { - "name": "newOwner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "unregisterAddressesProvider", - "inputs": [ - { - "name": "provider", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "event", - "name": "AddressesProviderRegistered", - "inputs": [ - { - "name": "addressesProvider", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "id", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "AddressesProviderUnregistered", - "inputs": [ - { - "name": "addressesProvider", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "id", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "OwnershipTransferred", - "inputs": [ - { - "name": "previousOwner", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "newOwner", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - } -] diff --git a/bend/PoolConfigurator.json b/bend/PoolConfigurator.json deleted file mode 100644 index 7956099..0000000 --- a/bend/PoolConfigurator.json +++ /dev/null @@ -1,1291 +0,0 @@ -[ - { - "type": "function", - "name": "CONFIGURATOR_REVISION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "configureReserveAsCollateral", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "ltv", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "liquidationThreshold", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "liquidationBonus", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "dropReserve", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "initReserves", - "inputs": [ - { - "name": "input", - "type": "tuple[]", - "internalType": "struct ConfiguratorInputTypes.InitReserveInput[]", - "components": [ - { - "name": "aTokenImpl", - "type": "address", - "internalType": "address" - }, - { - "name": "stableDebtTokenImpl", - "type": "address", - "internalType": "address" - }, - { - "name": "variableDebtTokenImpl", - "type": "address", - "internalType": "address" - }, - { - "name": "underlyingAssetDecimals", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "interestRateStrategyAddress", - "type": "address", - "internalType": "address" - }, - { - "name": "underlyingAsset", - "type": "address", - "internalType": "address" - }, - { - "name": "treasury", - "type": "address", - "internalType": "address" - }, - { - "name": "incentivesController", - "type": "address", - "internalType": "address" - }, - { - "name": "aTokenName", - "type": "string", - "internalType": "string" - }, - { - "name": "aTokenSymbol", - "type": "string", - "internalType": "string" - }, - { - "name": "variableDebtTokenName", - "type": "string", - "internalType": "string" - }, - { - "name": "variableDebtTokenSymbol", - "type": "string", - "internalType": "string" - }, - { - "name": "stableDebtTokenName", - "type": "string", - "internalType": "string" - }, - { - "name": "stableDebtTokenSymbol", - "type": "string", - "internalType": "string" - }, - { - "name": "params", - "type": "bytes", - "internalType": "bytes" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "provider", - "type": "address", - "internalType": "contract IPoolAddressesProvider" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setAssetEModeCategory", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "newCategoryId", - "type": "uint8", - "internalType": "uint8" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setBorrowCap", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "newBorrowCap", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setBorrowableInIsolation", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "borrowable", - "type": "bool", - "internalType": "bool" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setDebtCeiling", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "newDebtCeiling", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setEModeCategory", - "inputs": [ - { - "name": "categoryId", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "ltv", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "liquidationThreshold", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "liquidationBonus", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "oracle", - "type": "address", - "internalType": "address" - }, - { - "name": "label", - "type": "string", - "internalType": "string" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setLiquidationProtocolFee", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "newFee", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setPoolPause", - "inputs": [ - { - "name": "paused", - "type": "bool", - "internalType": "bool" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setReserveActive", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "active", - "type": "bool", - "internalType": "bool" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setReserveBorrowing", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "enabled", - "type": "bool", - "internalType": "bool" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setReserveFactor", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "newReserveFactor", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setReserveFlashLoaning", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "enabled", - "type": "bool", - "internalType": "bool" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setReserveFreeze", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "freeze", - "type": "bool", - "internalType": "bool" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setReserveInterestRateStrategyAddress", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "newRateStrategyAddress", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setReservePause", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "paused", - "type": "bool", - "internalType": "bool" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setReserveStableRateBorrowing", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "enabled", - "type": "bool", - "internalType": "bool" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setSiloedBorrowing", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "newSiloed", - "type": "bool", - "internalType": "bool" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setSupplyCap", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "newSupplyCap", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setUnbackedMintCap", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "newUnbackedMintCap", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateAToken", - "inputs": [ - { - "name": "input", - "type": "tuple", - "internalType": "struct ConfiguratorInputTypes.UpdateATokenInput", - "components": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "treasury", - "type": "address", - "internalType": "address" - }, - { - "name": "incentivesController", - "type": "address", - "internalType": "address" - }, - { - "name": "name", - "type": "string", - "internalType": "string" - }, - { - "name": "symbol", - "type": "string", - "internalType": "string" - }, - { - "name": "implementation", - "type": "address", - "internalType": "address" - }, - { - "name": "params", - "type": "bytes", - "internalType": "bytes" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateBridgeProtocolFee", - "inputs": [ - { - "name": "newBridgeProtocolFee", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateFlashloanPremiumToProtocol", - "inputs": [ - { - "name": "newFlashloanPremiumToProtocol", - "type": "uint128", - "internalType": "uint128" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateFlashloanPremiumTotal", - "inputs": [ - { - "name": "newFlashloanPremiumTotal", - "type": "uint128", - "internalType": "uint128" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateStableDebtToken", - "inputs": [ - { - "name": "input", - "type": "tuple", - "internalType": "struct ConfiguratorInputTypes.UpdateDebtTokenInput", - "components": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "incentivesController", - "type": "address", - "internalType": "address" - }, - { - "name": "name", - "type": "string", - "internalType": "string" - }, - { - "name": "symbol", - "type": "string", - "internalType": "string" - }, - { - "name": "implementation", - "type": "address", - "internalType": "address" - }, - { - "name": "params", - "type": "bytes", - "internalType": "bytes" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateVariableDebtToken", - "inputs": [ - { - "name": "input", - "type": "tuple", - "internalType": "struct ConfiguratorInputTypes.UpdateDebtTokenInput", - "components": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "incentivesController", - "type": "address", - "internalType": "address" - }, - { - "name": "name", - "type": "string", - "internalType": "string" - }, - { - "name": "symbol", - "type": "string", - "internalType": "string" - }, - { - "name": "implementation", - "type": "address", - "internalType": "address" - }, - { - "name": "params", - "type": "bytes", - "internalType": "bytes" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "event", - "name": "ATokenUpgraded", - "inputs": [ - { - "name": "asset", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "proxy", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "implementation", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "BorrowCapChanged", - "inputs": [ - { - "name": "asset", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "oldBorrowCap", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newBorrowCap", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "BorrowableInIsolationChanged", - "inputs": [ - { - "name": "asset", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "borrowable", - "type": "bool", - "indexed": false, - "internalType": "bool" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "BridgeProtocolFeeUpdated", - "inputs": [ - { - "name": "oldBridgeProtocolFee", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newBridgeProtocolFee", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "CollateralConfigurationChanged", - "inputs": [ - { - "name": "asset", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "ltv", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "liquidationThreshold", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "liquidationBonus", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "DebtCeilingChanged", - "inputs": [ - { - "name": "asset", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "oldDebtCeiling", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newDebtCeiling", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "EModeAssetCategoryChanged", - "inputs": [ - { - "name": "asset", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "oldCategoryId", - "type": "uint8", - "indexed": false, - "internalType": "uint8" - }, - { - "name": "newCategoryId", - "type": "uint8", - "indexed": false, - "internalType": "uint8" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "EModeCategoryAdded", - "inputs": [ - { - "name": "categoryId", - "type": "uint8", - "indexed": true, - "internalType": "uint8" - }, - { - "name": "ltv", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "liquidationThreshold", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "liquidationBonus", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "oracle", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "label", - "type": "string", - "indexed": false, - "internalType": "string" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "FlashloanPremiumToProtocolUpdated", - "inputs": [ - { - "name": "oldFlashloanPremiumToProtocol", - "type": "uint128", - "indexed": false, - "internalType": "uint128" - }, - { - "name": "newFlashloanPremiumToProtocol", - "type": "uint128", - "indexed": false, - "internalType": "uint128" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "FlashloanPremiumTotalUpdated", - "inputs": [ - { - "name": "oldFlashloanPremiumTotal", - "type": "uint128", - "indexed": false, - "internalType": "uint128" - }, - { - "name": "newFlashloanPremiumTotal", - "type": "uint128", - "indexed": false, - "internalType": "uint128" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "LiquidationProtocolFeeChanged", - "inputs": [ - { - "name": "asset", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "oldFee", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newFee", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ReserveActive", - "inputs": [ - { - "name": "asset", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "active", - "type": "bool", - "indexed": false, - "internalType": "bool" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ReserveBorrowing", - "inputs": [ - { - "name": "asset", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "enabled", - "type": "bool", - "indexed": false, - "internalType": "bool" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ReserveDropped", - "inputs": [ - { - "name": "asset", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ReserveFactorChanged", - "inputs": [ - { - "name": "asset", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "oldReserveFactor", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newReserveFactor", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ReserveFlashLoaning", - "inputs": [ - { - "name": "asset", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "enabled", - "type": "bool", - "indexed": false, - "internalType": "bool" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ReserveFrozen", - "inputs": [ - { - "name": "asset", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "frozen", - "type": "bool", - "indexed": false, - "internalType": "bool" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ReserveInitialized", - "inputs": [ - { - "name": "asset", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "aToken", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "stableDebtToken", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "variableDebtToken", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "interestRateStrategyAddress", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ReserveInterestRateStrategyChanged", - "inputs": [ - { - "name": "asset", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "oldStrategy", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "newStrategy", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ReservePaused", - "inputs": [ - { - "name": "asset", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "paused", - "type": "bool", - "indexed": false, - "internalType": "bool" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ReserveStableRateBorrowing", - "inputs": [ - { - "name": "asset", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "enabled", - "type": "bool", - "indexed": false, - "internalType": "bool" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "SiloedBorrowingChanged", - "inputs": [ - { - "name": "asset", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "oldState", - "type": "bool", - "indexed": false, - "internalType": "bool" - }, - { - "name": "newState", - "type": "bool", - "indexed": false, - "internalType": "bool" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "StableDebtTokenUpgraded", - "inputs": [ - { - "name": "asset", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "proxy", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "implementation", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "SupplyCapChanged", - "inputs": [ - { - "name": "asset", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "oldSupplyCap", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newSupplyCap", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "UnbackedMintCapChanged", - "inputs": [ - { - "name": "asset", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "oldUnbackedMintCap", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newUnbackedMintCap", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "VariableDebtTokenUpgraded", - "inputs": [ - { - "name": "asset", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "proxy", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "implementation", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - } -] diff --git a/bend/PoolDataProvider.json b/bend/PoolDataProvider.json deleted file mode 100644 index 5429f34..0000000 --- a/bend/PoolDataProvider.json +++ /dev/null @@ -1,523 +0,0 @@ -[ - { - "type": "function", - "name": "ADDRESSES_PROVIDER", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IPoolAddressesProvider" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getATokenTotalSupply", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getAllATokens", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "tuple[]", - "internalType": "struct IPoolDataProvider.TokenData[]", - "components": [ - { - "name": "symbol", - "type": "string", - "internalType": "string" - }, - { - "name": "tokenAddress", - "type": "address", - "internalType": "address" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getAllReservesTokens", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "tuple[]", - "internalType": "struct IPoolDataProvider.TokenData[]", - "components": [ - { - "name": "symbol", - "type": "string", - "internalType": "string" - }, - { - "name": "tokenAddress", - "type": "address", - "internalType": "address" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getDebtCeiling", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getDebtCeilingDecimals", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "pure" - }, - { - "type": "function", - "name": "getFlashLoanEnabled", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getInterestRateStrategyAddress", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "irStrategyAddress", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getLiquidationProtocolFee", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getPaused", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "isPaused", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getReserveCaps", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "borrowCap", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "supplyCap", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getReserveConfigurationData", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "decimals", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "ltv", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "liquidationThreshold", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "liquidationBonus", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "reserveFactor", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "usageAsCollateralEnabled", - "type": "bool", - "internalType": "bool" - }, - { - "name": "borrowingEnabled", - "type": "bool", - "internalType": "bool" - }, - { - "name": "stableBorrowRateEnabled", - "type": "bool", - "internalType": "bool" - }, - { - "name": "isActive", - "type": "bool", - "internalType": "bool" - }, - { - "name": "isFrozen", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getReserveData", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "unbacked", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "accruedToTreasuryScaled", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "totalAToken", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "totalStableDebt", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "totalVariableDebt", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "liquidityRate", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "variableBorrowRate", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "stableBorrowRate", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "averageStableBorrowRate", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "liquidityIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "variableBorrowIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "lastUpdateTimestamp", - "type": "uint40", - "internalType": "uint40" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getReserveEModeCategory", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getReserveTokensAddresses", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "aTokenAddress", - "type": "address", - "internalType": "address" - }, - { - "name": "stableDebtTokenAddress", - "type": "address", - "internalType": "address" - }, - { - "name": "variableDebtTokenAddress", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getSiloedBorrowing", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getTotalDebt", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getUnbackedMintCap", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getUserReserveData", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "user", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "currentATokenBalance", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "currentStableDebt", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "currentVariableDebt", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "principalStableDebt", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "scaledVariableDebt", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "stableBorrowRate", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "liquidityRate", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "stableRateLastUpdated", - "type": "uint40", - "internalType": "uint40" - }, - { - "name": "usageAsCollateralEnabled", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - } -] diff --git a/bend/PoolLogic.json b/bend/PoolLogic.json deleted file mode 100644 index 867d9e4..0000000 --- a/bend/PoolLogic.json +++ /dev/null @@ -1,40 +0,0 @@ -[ - { - "type": "event", - "name": "IsolationModeTotalDebtUpdated", - "inputs": [ - { - "name": "asset", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "totalDebt", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "MintedToPOLFeeCollector", - "inputs": [ - { - "name": "reserve", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amountMinted", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - } -] diff --git a/bend/SupplyLogic.json b/bend/SupplyLogic.json deleted file mode 100644 index 81af5e0..0000000 --- a/bend/SupplyLogic.json +++ /dev/null @@ -1,151 +0,0 @@ -[ - { - "type": "event", - "name": "ReserveDataUpdated", - "inputs": [ - { - "name": "reserve", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "liquidityRate", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "stableBorrowRate", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "variableBorrowRate", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "liquidityIndex", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "variableBorrowIndex", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ReserveUsedAsCollateralDisabled", - "inputs": [ - { - "name": "reserve", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "user", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ReserveUsedAsCollateralEnabled", - "inputs": [ - { - "name": "reserve", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "user", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Supply", - "inputs": [ - { - "name": "reserve", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "user", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "onBehalfOf", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "referralCode", - "type": "uint16", - "indexed": true, - "internalType": "uint16" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Withdraw", - "inputs": [ - { - "name": "reserve", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "user", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "to", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - } -] diff --git a/bend/VariableDebtToken.json b/bend/VariableDebtToken.json deleted file mode 100644 index d434f5a..0000000 --- a/bend/VariableDebtToken.json +++ /dev/null @@ -1,831 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "pool", - "type": "address", - "internalType": "contract IPool" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "DEBT_TOKEN_REVISION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "DELEGATION_WITH_SIG_TYPEHASH", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "DOMAIN_SEPARATOR", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "EIP712_REVISION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes", - "internalType": "bytes" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "POOL", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IPool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "UNDERLYING_ASSET_ADDRESS", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "allowance", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - }, - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "approve", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - }, - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "approveDelegation", - "inputs": [ - { - "name": "delegatee", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "balanceOf", - "inputs": [ - { - "name": "user", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "borrowAllowance", - "inputs": [ - { - "name": "fromUser", - "type": "address", - "internalType": "address" - }, - { - "name": "toUser", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "burn", - "inputs": [ - { - "name": "from", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "index", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "decimals", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint8", - "internalType": "uint8" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "decreaseAllowance", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - }, - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "delegationWithSig", - "inputs": [ - { - "name": "delegator", - "type": "address", - "internalType": "address" - }, - { - "name": "delegatee", - "type": "address", - "internalType": "address" - }, - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "deadline", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "v", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "r", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "getIncentivesController", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IAaveIncentivesController" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getPreviousIndex", - "inputs": [ - { - "name": "user", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getScaledUserBalanceAndSupply", - "inputs": [ - { - "name": "user", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "increaseAllowance", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - }, - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "initializingPool", - "type": "address", - "internalType": "contract IPool" - }, - { - "name": "underlyingAsset", - "type": "address", - "internalType": "address" - }, - { - "name": "incentivesController", - "type": "address", - "internalType": "contract IAaveIncentivesController" - }, - { - "name": "debtTokenDecimals", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "debtTokenName", - "type": "string", - "internalType": "string" - }, - { - "name": "debtTokenSymbol", - "type": "string", - "internalType": "string" - }, - { - "name": "params", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "mint", - "inputs": [ - { - "name": "user", - "type": "address", - "internalType": "address" - }, - { - "name": "onBehalfOf", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "index", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - }, - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "nonces", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "scaledBalanceOf", - "inputs": [ - { - "name": "user", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "scaledTotalSupply", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "setIncentivesController", - "inputs": [ - { - "name": "controller", - "type": "address", - "internalType": "contract IAaveIncentivesController" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "symbol", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "totalSupply", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "transfer", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - }, - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "transferFrom", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - }, - { - "name": "", - "type": "address", - "internalType": "address" - }, - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "event", - "name": "Approval", - "inputs": [ - { - "name": "owner", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "spender", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "value", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "BorrowAllowanceDelegated", - "inputs": [ - { - "name": "fromUser", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "toUser", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "asset", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Burn", - "inputs": [ - { - "name": "from", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "target", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "value", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "balanceIncrease", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "index", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Initialized", - "inputs": [ - { - "name": "underlyingAsset", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "pool", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "incentivesController", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "debtTokenDecimals", - "type": "uint8", - "indexed": false, - "internalType": "uint8" - }, - { - "name": "debtTokenName", - "type": "string", - "indexed": false, - "internalType": "string" - }, - { - "name": "debtTokenSymbol", - "type": "string", - "indexed": false, - "internalType": "string" - }, - { - "name": "params", - "type": "bytes", - "indexed": false, - "internalType": "bytes" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Mint", - "inputs": [ - { - "name": "caller", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "onBehalfOf", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "value", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "balanceIncrease", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "index", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Transfer", - "inputs": [ - { - "name": "from", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "to", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "value", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - } -] diff --git a/berps/Entrypoint.json b/berps/Entrypoint.json deleted file mode 100644 index 477212d..0000000 --- a/berps/Entrypoint.json +++ /dev/null @@ -1,974 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "receive", - "stateMutability": "payable" - }, - { - "type": "function", - "name": "UPGRADE_INTERFACE_VERSION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "_msgSender", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "cancelOpenLimitOrder", - "inputs": [ - { - "name": "limitIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "closeTradeMarket", - "inputs": [ - { - "name": "tradeIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "priceUpdateData", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "delegatedAction", - "inputs": [ - { - "name": "trader", - "type": "address", - "internalType": "address" - }, - { - "name": "call_data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes", - "internalType": "bytes" - } - ], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "delegations", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "done", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "executeLimitOrder", - "inputs": [ - { - "name": "index", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "priceUpdateData", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "feesAccrued", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IFeesAccrued" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "feesMarkets", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IFeesMarkets" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "_pyth", - "type": "address", - "internalType": "address" - }, - { - "name": "_orders", - "type": "address", - "internalType": "address" - }, - { - "name": "_feesMarkets", - "type": "address", - "internalType": "address" - }, - { - "name": "_feesAccrued", - "type": "address", - "internalType": "address" - }, - { - "name": "_pythCfg", - "type": "tuple", - "internalType": "struct IEntrypoint.PythConfig", - "components": [ - { - "name": "confThresholdP", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "staleTolerance", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "useEma", - "type": "bool", - "internalType": "bool" - } - ] - }, - { - "name": "_maxPosHoney", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "isDone", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isPaused", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "maxPosHoney", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "multicall", - "inputs": [ - { - "name": "requireSuccess", - "type": "bool", - "internalType": "bool" - }, - { - "name": "data", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "openTrade", - "inputs": [ - { - "name": "t", - "type": "tuple", - "internalType": "struct IOrders.Trade", - "components": [ - { - "name": "trader", - "type": "address", - "internalType": "address" - }, - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "index", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "initialPosToken", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "positionSizeHoney", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "openPrice", - "type": "int64", - "internalType": "int64" - }, - { - "name": "buy", - "type": "bool", - "internalType": "bool" - }, - { - "name": "leverage", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "tp", - "type": "int64", - "internalType": "int64" - }, - { - "name": "sl", - "type": "int64", - "internalType": "int64" - } - ] - }, - { - "name": "orderType", - "type": "uint8", - "internalType": "enum ISettlement.TradeType" - }, - { - "name": "slippageP", - "type": "int64", - "internalType": "int64" - }, - { - "name": "priceUpdateData", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "orders", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IOrders" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "pause", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "proxiableUUID", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "pyth", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IPyth" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "pythConfig", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "tuple", - "internalType": "struct IEntrypoint.PythConfig", - "components": [ - { - "name": "confThresholdP", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "staleTolerance", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "useEma", - "type": "bool", - "internalType": "bool" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "refundValue", - "inputs": [], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "removeDelegate", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setDelegate", - "inputs": [ - { - "name": "delegate", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setMaxPosHoney", - "inputs": [ - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setPyth", - "inputs": [ - { - "name": "_pyth", - "type": "address", - "internalType": "contract IPyth" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setPythConfig", - "inputs": [ - { - "name": "_pythCfg", - "type": "tuple", - "internalType": "struct IEntrypoint.PythConfig", - "components": [ - { - "name": "confThresholdP", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "staleTolerance", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "useEma", - "type": "bool", - "internalType": "bool" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateOpenLimitOrder", - "inputs": [ - { - "name": "limitIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "newPrice", - "type": "int64", - "internalType": "int64" - }, - { - "name": "tp", - "type": "int64", - "internalType": "int64" - }, - { - "name": "sl", - "type": "int64", - "internalType": "int64" - }, - { - "name": "priceUpdateData", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "updateSl", - "inputs": [ - { - "name": "tradeIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "newSl", - "type": "int64", - "internalType": "int64" - }, - { - "name": "priceUpdateData", - "type": "bytes[]", - "internalType": "bytes[]" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "updateTp", - "inputs": [ - { - "name": "tradeIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "newTp", - "type": "int64", - "internalType": "int64" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "upgradeToAndCall", - "inputs": [ - { - "name": "newImplementation", - "type": "address", - "internalType": "address" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "event", - "name": "Done", - "inputs": [ - { - "name": "done", - "type": "bool", - "indexed": false, - "internalType": "bool" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Initialized", - "inputs": [ - { - "name": "version", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "InvalidLimitExecution", - "inputs": [ - { - "name": "index", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "MaxPosHoneyUpdated", - "inputs": [ - { - "name": "newValue", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "OpenLimitCanceled", - "inputs": [ - { - "name": "index", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "OpenLimitPlaced", - "inputs": [ - { - "name": "order", - "type": "tuple", - "indexed": false, - "internalType": "struct IOrders.OpenLimitOrder", - "components": [ - { - "name": "trader", - "type": "address", - "internalType": "address" - }, - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "index", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "positionSize", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "buy", - "type": "bool", - "internalType": "bool" - }, - { - "name": "leverage", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "tp", - "type": "int64", - "internalType": "int64" - }, - { - "name": "sl", - "type": "int64", - "internalType": "int64" - }, - { - "name": "minPrice", - "type": "int64", - "internalType": "int64" - }, - { - "name": "maxPrice", - "type": "int64", - "internalType": "int64" - } - ] - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "OpenLimitUpdated", - "inputs": [ - { - "name": "index", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newPrice", - "type": "int64", - "indexed": false, - "internalType": "int64" - }, - { - "name": "newTp", - "type": "int64", - "indexed": false, - "internalType": "int64" - }, - { - "name": "newSl", - "type": "int64", - "indexed": false, - "internalType": "int64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Paused", - "inputs": [ - { - "name": "paused", - "type": "bool", - "indexed": false, - "internalType": "bool" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "PythConfigUpdated", - "inputs": [ - { - "name": "config", - "type": "tuple", - "indexed": false, - "internalType": "struct IEntrypoint.PythConfig", - "components": [ - { - "name": "confThresholdP", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "staleTolerance", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "useEma", - "type": "bool", - "internalType": "bool" - } - ] - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "PythUpdated", - "inputs": [ - { - "name": "pyth", - "type": "address", - "indexed": false, - "internalType": "contract IPyth" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "SlUpdated", - "inputs": [ - { - "name": "index", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newSl", - "type": "int64", - "indexed": false, - "internalType": "int64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "TpUpdated", - "inputs": [ - { - "name": "index", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newTp", - "type": "int64", - "indexed": false, - "internalType": "int64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Upgraded", - "inputs": [ - { - "name": "implementation", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AddressEmptyCode", - "inputs": [ - { - "name": "target", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AmountOverflow", - "inputs": [] - }, - { - "type": "error", - "name": "ERC1967InvalidImplementation", - "inputs": [ - { - "name": "implementation", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967NonPayable", - "inputs": [] - }, - { - "type": "error", - "name": "EthTransferFailed", - "inputs": [] - }, - { - "type": "error", - "name": "FailedInnerCall", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidConfidence", - "inputs": [ - { - "name": "invalidConfP", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "InvalidExpo", - "inputs": [ - { - "name": "pythExpo", - "type": "int32", - "internalType": "int32" - } - ] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "MarketClosed", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnauthorizedCallContext", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnsupportedProxiableUUID", - "inputs": [ - { - "name": "slot", - "type": "bytes32", - "internalType": "bytes32" - } - ] - } -] diff --git a/berps/FeesAccrued.json b/berps/FeesAccrued.json deleted file mode 100644 index 079c3a6..0000000 --- a/berps/FeesAccrued.json +++ /dev/null @@ -1,1699 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "UPGRADE_INTERFACE_VERSION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "feesMarkets", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IFeesMarkets" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getAllPairs", - "inputs": [], - "outputs": [ - { - "name": "p", - "type": "tuple[]", - "internalType": "struct IFeesAccrued.Pair[]", - "components": [ - { - "name": "groups", - "type": "tuple[]", - "internalType": "struct IFeesAccrued.PairGroup[]", - "components": [ - { - "name": "groupIndex", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "timestamp", - "type": "uint48", - "internalType": "uint48" - }, - { - "name": "initialAccFeeLong", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "initialAccFeeShort", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "prevGroupAccFeeLong", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "prevGroupAccFeeShort", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "pairAccFeeLong", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "pairAccFeeShort", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "_placeholder", - "type": "uint64", - "internalType": "uint64" - } - ] - }, - { - "name": "feePerSecond", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "accFeeLong", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "accFeeShort", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "accLastUpdatedTime", - "type": "uint48", - "internalType": "uint48" - }, - { - "name": "_placeholder", - "type": "uint48", - "internalType": "uint48" - }, - { - "name": "lastAccTimeWeightedMarketCap", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getGroupPendingAccFee", - "inputs": [ - { - "name": "groupIndex", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "currentTime", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "long", - "type": "bool", - "internalType": "bool" - } - ], - "outputs": [ - { - "name": "accFee", - "type": "uint64", - "internalType": "uint64" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getGroupPendingAccFees", - "inputs": [ - { - "name": "groupIndex", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "currentTime", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "accFeeLong", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "accFeeShort", - "type": "uint64", - "internalType": "uint64" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getGroupWeightedVaultMarketCapSinceLastUpdate", - "inputs": [ - { - "name": "groupIndex", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "currentTime", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getGroups", - "inputs": [ - { - "name": "indices", - "type": "uint16[]", - "internalType": "uint16[]" - } - ], - "outputs": [ - { - "name": "g", - "type": "tuple[]", - "internalType": "struct IFeesAccrued.Group[]", - "components": [ - { - "name": "oiLong", - "type": "uint112", - "internalType": "uint112" - }, - { - "name": "oiShort", - "type": "uint112", - "internalType": "uint112" - }, - { - "name": "feePerSecond", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "accFeeLong", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "accFeeShort", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "accLastUpdatedTime", - "type": "uint48", - "internalType": "uint48" - }, - { - "name": "maxOi", - "type": "uint80", - "internalType": "uint80" - }, - { - "name": "lastAccTimeWeightedMarketCap", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getGroupsCurrentAPR", - "inputs": [ - { - "name": "indices", - "type": "uint16[]", - "internalType": "uint16[]" - } - ], - "outputs": [ - { - "name": "borrowAPRLong", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "borrowAPRShort", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getInitialAccFees", - "inputs": [ - { - "name": "offset", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "count", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "fees", - "type": "tuple[]", - "internalType": "struct IFeesAccrued.InitialAccFees[]", - "components": [ - { - "name": "tradeIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "accPairFee", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "accGroupFee", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "timestamp", - "type": "uint48", - "internalType": "uint48" - }, - { - "name": "_placeholder", - "type": "uint80", - "internalType": "uint80" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getPairGroupAccFeesDeltas", - "inputs": [ - { - "name": "i", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "pairGroups", - "type": "tuple[]", - "internalType": "struct IFeesAccrued.PairGroup[]", - "components": [ - { - "name": "groupIndex", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "timestamp", - "type": "uint48", - "internalType": "uint48" - }, - { - "name": "initialAccFeeLong", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "initialAccFeeShort", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "prevGroupAccFeeLong", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "prevGroupAccFeeShort", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "pairAccFeeLong", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "pairAccFeeShort", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "_placeholder", - "type": "uint64", - "internalType": "uint64" - } - ] - }, - { - "name": "initialFees", - "type": "tuple", - "internalType": "struct IFeesAccrued.InitialAccFees", - "components": [ - { - "name": "tradeIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "accPairFee", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "accGroupFee", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "timestamp", - "type": "uint48", - "internalType": "uint48" - }, - { - "name": "_placeholder", - "type": "uint80", - "internalType": "uint80" - } - ] - }, - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "long", - "type": "bool", - "internalType": "bool" - }, - { - "name": "currentTime", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "deltaGroup", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "deltaPair", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "beforeTradeOpen", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getPairGroupAccFeesDeltasNoTrade", - "inputs": [ - { - "name": "i", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "pairGroups", - "type": "tuple[]", - "internalType": "struct IFeesAccrued.PairGroup[]", - "components": [ - { - "name": "groupIndex", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "timestamp", - "type": "uint48", - "internalType": "uint48" - }, - { - "name": "initialAccFeeLong", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "initialAccFeeShort", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "prevGroupAccFeeLong", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "prevGroupAccFeeShort", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "pairAccFeeLong", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "pairAccFeeShort", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "_placeholder", - "type": "uint64", - "internalType": "uint64" - } - ] - }, - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "long", - "type": "bool", - "internalType": "bool" - }, - { - "name": "currentTime", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "deltaGroup", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "deltaPair", - "type": "uint64", - "internalType": "uint64" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getPairGroupIndex", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "groupIndex", - "type": "uint16", - "internalType": "uint16" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getPairOpenInterest", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getPairPendingAccFee", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "currentTime", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "long", - "type": "bool", - "internalType": "bool" - } - ], - "outputs": [ - { - "name": "accFee", - "type": "uint64", - "internalType": "uint64" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getPairPendingAccFees", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "currentTime", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "accFeeLong", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "accFeeShort", - "type": "uint64", - "internalType": "uint64" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getPairWeightedVaultMarketCapSinceLastUpdate", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "currentTime", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getPairsCurrentAPR", - "inputs": [ - { - "name": "indices", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "outputs": [ - { - "name": "borrowAPRLong", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "borrowAPRShort", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getPairsOpenInterest", - "inputs": [ - { - "name": "indices", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "outputs": [ - { - "name": "longOIs", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "shortOIs", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "maxOIs", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getPendingAccFees", - "inputs": [ - { - "name": "accFeeLong", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "accFeeShort", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "oiLong", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "oiShort", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "feePerSecond", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "currentTime", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "accLastUpdatedTime", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "vaultMarketCap", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "newAccFeeLong", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "newAccFeeShort", - "type": "uint64", - "internalType": "uint64" - } - ], - "stateMutability": "pure" - }, - { - "type": "function", - "name": "getPendingAccTimeWeightedMarketCap", - "inputs": [ - { - "name": "currentTime", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getTradeBorrowingFee", - "inputs": [ - { - "name": "input", - "type": "tuple", - "internalType": "struct IFeesAccrued.BorrowingFeeInput", - "components": [ - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "tradeIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "long", - "type": "bool", - "internalType": "bool" - }, - { - "name": "collateral", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "leverage", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "outputs": [ - { - "name": "fee", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getTradeInitialAccFees", - "inputs": [ - { - "name": "tradeIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "feesAccrued", - "type": "tuple", - "internalType": "struct IFeesAccrued.InitialAccFees", - "components": [ - { - "name": "tradeIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "accPairFee", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "accGroupFee", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "timestamp", - "type": "uint48", - "internalType": "uint48" - }, - { - "name": "_placeholder", - "type": "uint80", - "internalType": "uint80" - } - ] - }, - { - "name": "otherFees", - "type": "tuple", - "internalType": "struct IFeesMarkets.TradeInitialAccFees", - "components": [ - { - "name": "tradeIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "rollover", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "funding", - "type": "int256", - "internalType": "int256" - }, - { - "name": "openedAfterUpdate", - "type": "bool", - "internalType": "bool" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getTradeLiquidationPrice", - "inputs": [ - { - "name": "input", - "type": "tuple", - "internalType": "struct IFeesAccrued.LiqPriceInput", - "components": [ - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "tradeIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "openPrice", - "type": "int64", - "internalType": "int64" - }, - { - "name": "long", - "type": "bool", - "internalType": "bool" - }, - { - "name": "collateral", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "leverage", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "outputs": [ - { - "name": "liqPrice", - "type": "int64", - "internalType": "int64" - }, - { - "name": "borrowFee", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getTradesLiquidationPrices", - "inputs": [ - { - "name": "tradeIndices", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "outputs": [ - { - "name": "liqPrices", - "type": "int64[]", - "internalType": "int64[]" - }, - { - "name": "borrowFees", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getWeightedVaultMarketCap", - "inputs": [ - { - "name": "accTimeWeightedMarketCap", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "lastAccTimeWeightedMarketCap", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "timeDelta", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "pure" - }, - { - "type": "function", - "name": "groups", - "inputs": [ - { - "name": "", - "type": "uint16", - "internalType": "uint16" - } - ], - "outputs": [ - { - "name": "oiLong", - "type": "uint112", - "internalType": "uint112" - }, - { - "name": "oiShort", - "type": "uint112", - "internalType": "uint112" - }, - { - "name": "feePerSecond", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "accFeeLong", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "accFeeShort", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "accLastUpdatedTime", - "type": "uint48", - "internalType": "uint48" - }, - { - "name": "maxOi", - "type": "uint80", - "internalType": "uint80" - }, - { - "name": "lastAccTimeWeightedMarketCap", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "handleTradeAction", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "tradeIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "positionSizeHoney", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "open", - "type": "bool", - "internalType": "bool" - }, - { - "name": "long", - "type": "bool", - "internalType": "bool" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "_orders", - "type": "address", - "internalType": "address" - }, - { - "name": "_feesMarkets", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "orders", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IOrders" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "pairs", - "inputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "feePerSecond", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "accFeeLong", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "accFeeShort", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "accLastUpdatedTime", - "type": "uint48", - "internalType": "uint48" - }, - { - "name": "_placeholder", - "type": "uint48", - "internalType": "uint48" - }, - { - "name": "lastAccTimeWeightedMarketCap", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "proxiableUUID", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "setGroupParams", - "inputs": [ - { - "name": "groupIndex", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "value", - "type": "tuple", - "internalType": "struct IFeesAccrued.GroupParams", - "components": [ - { - "name": "baseBorrowAPR", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "maxOi", - "type": "uint80", - "internalType": "uint80" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setGroupParamsArray", - "inputs": [ - { - "name": "indices", - "type": "uint16[]", - "internalType": "uint16[]" - }, - { - "name": "values", - "type": "tuple[]", - "internalType": "struct IFeesAccrued.GroupParams[]", - "components": [ - { - "name": "baseBorrowAPR", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "maxOi", - "type": "uint80", - "internalType": "uint80" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setPairParams", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "value", - "type": "tuple", - "internalType": "struct IFeesAccrued.PairParams", - "components": [ - { - "name": "groupIndex", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "baseBorrowAPR", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setPairParamsArray", - "inputs": [ - { - "name": "indices", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "values", - "type": "tuple[]", - "internalType": "struct IFeesAccrued.PairParams[]", - "components": [ - { - "name": "groupIndex", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "baseBorrowAPR", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "upgradeToAndCall", - "inputs": [ - { - "name": "newImplementation", - "type": "address", - "internalType": "address" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "withinMaxGroupOi", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "long", - "type": "bool", - "internalType": "bool" - }, - { - "name": "positionSizeHoney", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "event", - "name": "GroupAccFeesUpdated", - "inputs": [ - { - "name": "groupIndex", - "type": "uint16", - "indexed": true, - "internalType": "uint16" - }, - { - "name": "currentTime", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "accFeeLong", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - }, - { - "name": "accFeeShort", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - }, - { - "name": "accBlockWeightedMarketCap", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "GroupOiUpdated", - "inputs": [ - { - "name": "groupIndex", - "type": "uint16", - "indexed": true, - "internalType": "uint16" - }, - { - "name": "long", - "type": "bool", - "indexed": true, - "internalType": "bool" - }, - { - "name": "increase", - "type": "bool", - "indexed": true, - "internalType": "bool" - }, - { - "name": "amount", - "type": "uint112", - "indexed": false, - "internalType": "uint112" - }, - { - "name": "oiLong", - "type": "uint112", - "indexed": false, - "internalType": "uint112" - }, - { - "name": "oiShort", - "type": "uint112", - "indexed": false, - "internalType": "uint112" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "GroupUpdated", - "inputs": [ - { - "name": "groupIndex", - "type": "uint16", - "indexed": true, - "internalType": "uint16" - }, - { - "name": "feePerSecond", - "type": "uint32", - "indexed": false, - "internalType": "uint32" - }, - { - "name": "maxOi", - "type": "uint80", - "indexed": false, - "internalType": "uint80" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Initialized", - "inputs": [ - { - "name": "version", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "PairAccFeesUpdated", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "currentTime", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "accFeeLong", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - }, - { - "name": "accFeeShort", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - }, - { - "name": "accBlockWeightedMarketCap", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "PairGroupUpdated", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "prevGroupIndex", - "type": "uint16", - "indexed": true, - "internalType": "uint16" - }, - { - "name": "newGroupIndex", - "type": "uint16", - "indexed": true, - "internalType": "uint16" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "PairParamsUpdated", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "groupIndex", - "type": "uint16", - "indexed": true, - "internalType": "uint16" - }, - { - "name": "feePerSecond", - "type": "uint32", - "indexed": false, - "internalType": "uint32" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "TradeInitialAccFeesStored", - "inputs": [ - { - "name": "tradeIndex", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "initialPairAccFee", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - }, - { - "name": "initialGroupAccFees", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Upgraded", - "inputs": [ - { - "name": "implementation", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AddressEmptyCode", - "inputs": [ - { - "name": "target", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967InvalidImplementation", - "inputs": [ - { - "name": "implementation", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967NonPayable", - "inputs": [] - }, - { - "type": "error", - "name": "FailedInnerCall", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnauthorizedCallContext", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnsupportedProxiableUUID", - "inputs": [ - { - "name": "slot", - "type": "bytes32", - "internalType": "bytes32" - } - ] - } -] diff --git a/berps/FeesMarkets.json b/berps/FeesMarkets.json deleted file mode 100644 index 50502fc..0000000 --- a/berps/FeesMarkets.json +++ /dev/null @@ -1,1498 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "UPGRADE_INTERFACE_VERSION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getAccFundingFeesLong", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "int256", - "internalType": "int256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getAccFundingFeesShort", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "int256", - "internalType": "int256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getAccFundingFeesUpdateBlock", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getAccRolloverFees", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getAccRolloverFeesUpdateBlock", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getAllPairs", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "tuple[]", - "internalType": "struct IFeesMarkets.PairParams[]", - "components": [ - { - "name": "onePercentDepthAbove", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "onePercentDepthBelow", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "rolloverFeePerBlockP", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "fundingFeePerBlockP", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "name": "", - "type": "tuple[]", - "internalType": "struct IFeesMarkets.PairRolloverFees[]", - "components": [ - { - "name": "accPerCollateral", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "lastUpdateBlock", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "name": "", - "type": "tuple[]", - "internalType": "struct IFeesMarkets.PairFundingFees[]", - "components": [ - { - "name": "accPerOiLong", - "type": "int256", - "internalType": "int256" - }, - { - "name": "accPerOiShort", - "type": "int256", - "internalType": "int256" - }, - { - "name": "lastUpdateBlock", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getFundingFeePerBlockP", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getOnePercentDepthAbove", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getOnePercentDepthBelow", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getPair", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "tuple", - "internalType": "struct IFeesMarkets.PairParams", - "components": [ - { - "name": "onePercentDepthAbove", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "onePercentDepthBelow", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "rolloverFeePerBlockP", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "fundingFeePerBlockP", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "name": "", - "type": "tuple", - "internalType": "struct IFeesMarkets.PairRolloverFees", - "components": [ - { - "name": "accPerCollateral", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "lastUpdateBlock", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "name": "", - "type": "tuple", - "internalType": "struct IFeesMarkets.PairFundingFees", - "components": [ - { - "name": "accPerOiLong", - "type": "int256", - "internalType": "int256" - }, - { - "name": "accPerOiShort", - "type": "int256", - "internalType": "int256" - }, - { - "name": "lastUpdateBlock", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getPendingAccFundingFees", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "valueLong", - "type": "int256", - "internalType": "int256" - }, - { - "name": "valueShort", - "type": "int256", - "internalType": "int256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getPendingAccRolloverFees", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getRolloverFeePerBlockP", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getTradeFundingFee", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "tradeIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "long", - "type": "bool", - "internalType": "bool" - }, - { - "name": "collateral", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "leverage", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "int256", - "internalType": "int256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getTradeFundingFeePure", - "inputs": [ - { - "name": "accFundingFeesPerOi", - "type": "int256", - "internalType": "int256" - }, - { - "name": "endAccFundingFeesPerOi", - "type": "int256", - "internalType": "int256" - }, - { - "name": "collateral", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "leverage", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "int256", - "internalType": "int256" - } - ], - "stateMutability": "pure" - }, - { - "type": "function", - "name": "getTradeInitialAccFees", - "inputs": [ - { - "name": "offset", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "count", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "fees", - "type": "tuple[]", - "internalType": "struct IFeesMarkets.TradeInitialAccFees[]", - "components": [ - { - "name": "tradeIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "rollover", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "funding", - "type": "int256", - "internalType": "int256" - }, - { - "name": "openedAfterUpdate", - "type": "bool", - "internalType": "bool" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getTradeLiquidationPrice", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "index", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "openPrice", - "type": "int64", - "internalType": "int64" - }, - { - "name": "long", - "type": "bool", - "internalType": "bool" - }, - { - "name": "collateral", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "leverage", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "int64", - "internalType": "int64" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getTradeLiquidationPricePure", - "inputs": [ - { - "name": "openPrice", - "type": "int64", - "internalType": "int64" - }, - { - "name": "long", - "type": "bool", - "internalType": "bool" - }, - { - "name": "collateral", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "leverage", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "rolloverFee", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "fundingFee", - "type": "int256", - "internalType": "int256" - } - ], - "outputs": [ - { - "name": "", - "type": "int64", - "internalType": "int64" - } - ], - "stateMutability": "pure" - }, - { - "type": "function", - "name": "getTradePriceImpact", - "inputs": [ - { - "name": "openPrice", - "type": "int64", - "internalType": "int64" - }, - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "long", - "type": "bool", - "internalType": "bool" - }, - { - "name": "tradeOpenInterest", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "priceImpactP", - "type": "int64", - "internalType": "int64" - }, - { - "name": "priceAfterImpact", - "type": "int64", - "internalType": "int64" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getTradePriceImpactPure", - "inputs": [ - { - "name": "openPrice", - "type": "int64", - "internalType": "int64" - }, - { - "name": "long", - "type": "bool", - "internalType": "bool" - }, - { - "name": "startOpenInterest", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "tradeOpenInterest", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "onePercentDepth", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "priceImpactP", - "type": "int64", - "internalType": "int64" - }, - { - "name": "priceAfterImpact", - "type": "int64", - "internalType": "int64" - } - ], - "stateMutability": "pure" - }, - { - "type": "function", - "name": "getTradeRolloverFee", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "tradeIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "collateral", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getTradeRolloverFeePure", - "inputs": [ - { - "name": "accRolloverFeesPerCollateral", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "endAccRolloverFeesPerCollateral", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "collateral", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "pure" - }, - { - "type": "function", - "name": "getTradeValue", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "tradeIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "long", - "type": "bool", - "internalType": "bool" - }, - { - "name": "collateral", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "leverage", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "percentProfit", - "type": "int256", - "internalType": "int256" - }, - { - "name": "closingFee", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "r", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "f", - "type": "int256", - "internalType": "int256" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "getTradeValuePure", - "inputs": [ - { - "name": "collateral", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "percentProfit", - "type": "int256", - "internalType": "int256" - }, - { - "name": "rolloverFee", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "fundingFee", - "type": "int256", - "internalType": "int256" - }, - { - "name": "closingFee", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "pure" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "_orders", - "type": "address", - "internalType": "address" - }, - { - "name": "_manager", - "type": "address", - "internalType": "address" - }, - { - "name": "_maxNegativePnlOnOpenP", - "type": "int64", - "internalType": "int64" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "manager", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "maxNegativePnlOnOpenP", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "int64", - "internalType": "int64" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "orders", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IOrders" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "proxiableUUID", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "setFundingFeePerBlockP", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setFundingFeePerBlockPArray", - "inputs": [ - { - "name": "indices", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "values", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setManager", - "inputs": [ - { - "name": "_manager", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setMaxNegativePnlOnOpenP", - "inputs": [ - { - "name": "value", - "type": "int64", - "internalType": "int64" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setOnePercentDepth", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "valueAbove", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "valueBelow", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setOnePercentDepthArray", - "inputs": [ - { - "name": "indices", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "valuesAbove", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "valuesBelow", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setPairParams", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "value", - "type": "tuple", - "internalType": "struct IFeesMarkets.PairParams", - "components": [ - { - "name": "onePercentDepthAbove", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "onePercentDepthBelow", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "rolloverFeePerBlockP", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "fundingFeePerBlockP", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setPairParamsArray", - "inputs": [ - { - "name": "indices", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "values", - "type": "tuple[]", - "internalType": "struct IFeesMarkets.PairParams[]", - "components": [ - { - "name": "onePercentDepthAbove", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "onePercentDepthBelow", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "rolloverFeePerBlockP", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "fundingFeePerBlockP", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setRolloverFeePerBlockP", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setRolloverFeePerBlockPArray", - "inputs": [ - { - "name": "indices", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "values", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "storeTradeInitialAccFees", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "tradeIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "long", - "type": "bool", - "internalType": "bool" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "tradeInitialAccFees", - "inputs": [ - { - "name": "tradeIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "fee", - "type": "tuple", - "internalType": "struct IFeesMarkets.TradeInitialAccFees", - "components": [ - { - "name": "tradeIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "rollover", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "funding", - "type": "int256", - "internalType": "int256" - }, - { - "name": "openedAfterUpdate", - "type": "bool", - "internalType": "bool" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "upgradeToAndCall", - "inputs": [ - { - "name": "newImplementation", - "type": "address", - "internalType": "address" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "event", - "name": "AccFundingFeesStored", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "valueLong", - "type": "int256", - "indexed": false, - "internalType": "int256" - }, - { - "name": "valueShort", - "type": "int256", - "indexed": false, - "internalType": "int256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "AccRolloverFeesStored", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "value", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "FundingFeePerBlockPUpdated", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "value", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Initialized", - "inputs": [ - { - "name": "version", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ManagerUpdated", - "inputs": [ - { - "name": "value", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "MaxNegativePnlOnOpenPUpdated", - "inputs": [ - { - "name": "value", - "type": "int64", - "indexed": false, - "internalType": "int64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "OnePercentDepthUpdated", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "valueAbove", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "valueBelow", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "PairParamsUpdated", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "value", - "type": "tuple", - "indexed": false, - "internalType": "struct IFeesMarkets.PairParams", - "components": [ - { - "name": "onePercentDepthAbove", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "onePercentDepthBelow", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "rolloverFeePerBlockP", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "fundingFeePerBlockP", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "RolloverFeePerBlockPUpdated", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "value", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "TradeInitialAccFeesStored", - "inputs": [ - { - "name": "index", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "rollover", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "funding", - "type": "int256", - "indexed": false, - "internalType": "int256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Upgraded", - "inputs": [ - { - "name": "implementation", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AddressEmptyCode", - "inputs": [ - { - "name": "target", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967InvalidImplementation", - "inputs": [ - { - "name": "implementation", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967NonPayable", - "inputs": [] - }, - { - "type": "error", - "name": "FailedInnerCall", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnauthorizedCallContext", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnsupportedProxiableUUID", - "inputs": [ - { - "name": "slot", - "type": "bytes32", - "internalType": "bytes32" - } - ] - } -] diff --git a/berps/Markets.json b/berps/Markets.json deleted file mode 100644 index d1748ff..0000000 --- a/berps/Markets.json +++ /dev/null @@ -1,1221 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "MAX_LEVERAGE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "UPGRADE_INTERFACE_VERSION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "addFee", - "inputs": [ - { - "name": "_fee", - "type": "tuple", - "internalType": "struct IMarkets.Fee", - "components": [ - { - "name": "name", - "type": "string", - "internalType": "string" - }, - { - "name": "openFeeP", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "closeFeeP", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "limitOrderFeeP", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "minLevPosHoney", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "addGroup", - "inputs": [ - { - "name": "_group", - "type": "tuple", - "internalType": "struct IMarkets.Group", - "components": [ - { - "name": "name", - "type": "string", - "internalType": "string" - }, - { - "name": "minLeverage", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "maxLeverage", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "maxCollateralP", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "addPair", - "inputs": [ - { - "name": "_pair", - "type": "tuple", - "internalType": "struct IMarkets.Pair", - "components": [ - { - "name": "from", - "type": "string", - "internalType": "string" - }, - { - "name": "to", - "type": "string", - "internalType": "string" - }, - { - "name": "feed", - "type": "tuple", - "internalType": "struct IMarkets.Feed", - "components": [ - { - "name": "baseID", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "quoteID", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "feedCalculation", - "type": "uint8", - "internalType": "enum IMarkets.FeedCalculation" - }, - { - "name": "useConfSpread", - "type": "bool", - "internalType": "bool" - } - ] - }, - { - "name": "groupIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "feeIndex", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "addPairs", - "inputs": [ - { - "name": "_pairs", - "type": "tuple[]", - "internalType": "struct IMarkets.Pair[]", - "components": [ - { - "name": "from", - "type": "string", - "internalType": "string" - }, - { - "name": "to", - "type": "string", - "internalType": "string" - }, - { - "name": "feed", - "type": "tuple", - "internalType": "struct IMarkets.Feed", - "components": [ - { - "name": "baseID", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "quoteID", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "feedCalculation", - "type": "uint8", - "internalType": "enum IMarkets.FeedCalculation" - }, - { - "name": "useConfSpread", - "type": "bool", - "internalType": "bool" - } - ] - }, - { - "name": "groupIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "feeIndex", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "feesCount", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getAllPairs", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "tuple[]", - "internalType": "struct IMarkets.Pair[]", - "components": [ - { - "name": "from", - "type": "string", - "internalType": "string" - }, - { - "name": "to", - "type": "string", - "internalType": "string" - }, - { - "name": "feed", - "type": "tuple", - "internalType": "struct IMarkets.Feed", - "components": [ - { - "name": "baseID", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "quoteID", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "feedCalculation", - "type": "uint8", - "internalType": "enum IMarkets.FeedCalculation" - }, - { - "name": "useConfSpread", - "type": "bool", - "internalType": "bool" - } - ] - }, - { - "name": "groupIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "feeIndex", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "name": "", - "type": "tuple[]", - "internalType": "struct IMarkets.Group[]", - "components": [ - { - "name": "name", - "type": "string", - "internalType": "string" - }, - { - "name": "minLeverage", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "maxLeverage", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "maxCollateralP", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "name": "", - "type": "tuple[]", - "internalType": "struct IMarkets.Fee[]", - "components": [ - { - "name": "name", - "type": "string", - "internalType": "string" - }, - { - "name": "openFeeP", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "closeFeeP", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "limitOrderFeeP", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "minLevPosHoney", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getPair", - "inputs": [ - { - "name": "_pairIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "tuple", - "internalType": "struct IMarkets.Pair", - "components": [ - { - "name": "from", - "type": "string", - "internalType": "string" - }, - { - "name": "to", - "type": "string", - "internalType": "string" - }, - { - "name": "feed", - "type": "tuple", - "internalType": "struct IMarkets.Feed", - "components": [ - { - "name": "baseID", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "quoteID", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "feedCalculation", - "type": "uint8", - "internalType": "enum IMarkets.FeedCalculation" - }, - { - "name": "useConfSpread", - "type": "bool", - "internalType": "bool" - } - ] - }, - { - "name": "groupIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "feeIndex", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "name": "", - "type": "tuple", - "internalType": "struct IMarkets.Group", - "components": [ - { - "name": "name", - "type": "string", - "internalType": "string" - }, - { - "name": "minLeverage", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "maxLeverage", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "maxCollateralP", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "name": "", - "type": "tuple", - "internalType": "struct IMarkets.Fee", - "components": [ - { - "name": "name", - "type": "string", - "internalType": "string" - }, - { - "name": "openFeeP", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "closeFeeP", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "limitOrderFeeP", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "minLevPosHoney", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "groupCollateral", - "inputs": [ - { - "name": "_pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "_long", - "type": "bool", - "internalType": "bool" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "groupMaxCollateral", - "inputs": [ - { - "name": "_pairIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "groupsCollaterals", - "inputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "groupsCount", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "guaranteedSlEnabled", - "inputs": [ - { - "name": "_pairIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "_orders", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "isPairIndexListed", - "inputs": [ - { - "name": "_pairIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "isPairListed", - "inputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "orders", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IOrders" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "pairCloseFeeP", - "inputs": [ - { - "name": "_pairIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "pairFeed", - "inputs": [ - { - "name": "_pairIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "tuple", - "internalType": "struct IMarkets.Feed", - "components": [ - { - "name": "baseID", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "quoteID", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "feedCalculation", - "type": "uint8", - "internalType": "enum IMarkets.FeedCalculation" - }, - { - "name": "useConfSpread", - "type": "bool", - "internalType": "bool" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "pairLimitOrderFeeP", - "inputs": [ - { - "name": "_pairIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "pairMaxLeverage", - "inputs": [ - { - "name": "_pairIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "pairMinLevPosHoney", - "inputs": [ - { - "name": "_pairIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "pairMinLeverage", - "inputs": [ - { - "name": "_pairIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "pairOpenFeeP", - "inputs": [ - { - "name": "_pairIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "pairsCount", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "proxiableUUID", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "updateFee", - "inputs": [ - { - "name": "_id", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "_fee", - "type": "tuple", - "internalType": "struct IMarkets.Fee", - "components": [ - { - "name": "name", - "type": "string", - "internalType": "string" - }, - { - "name": "openFeeP", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "closeFeeP", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "limitOrderFeeP", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "minLevPosHoney", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateGroup", - "inputs": [ - { - "name": "_id", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "_group", - "type": "tuple", - "internalType": "struct IMarkets.Group", - "components": [ - { - "name": "name", - "type": "string", - "internalType": "string" - }, - { - "name": "minLeverage", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "maxLeverage", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "maxCollateralP", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateGroupCollateral", - "inputs": [ - { - "name": "_pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "_amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "_long", - "type": "bool", - "internalType": "bool" - }, - { - "name": "_increase", - "type": "bool", - "internalType": "bool" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updatePair", - "inputs": [ - { - "name": "_pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "_pair", - "type": "tuple", - "internalType": "struct IMarkets.Pair", - "components": [ - { - "name": "from", - "type": "string", - "internalType": "string" - }, - { - "name": "to", - "type": "string", - "internalType": "string" - }, - { - "name": "feed", - "type": "tuple", - "internalType": "struct IMarkets.Feed", - "components": [ - { - "name": "baseID", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "quoteID", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "feedCalculation", - "type": "uint8", - "internalType": "enum IMarkets.FeedCalculation" - }, - { - "name": "useConfSpread", - "type": "bool", - "internalType": "bool" - } - ] - }, - { - "name": "groupIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "feeIndex", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "upgradeToAndCall", - "inputs": [ - { - "name": "newImplementation", - "type": "address", - "internalType": "address" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "event", - "name": "FeeAdded", - "inputs": [ - { - "name": "index", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "name", - "type": "string", - "indexed": false, - "internalType": "string" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "FeeUpdated", - "inputs": [ - { - "name": "index", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "GroupAdded", - "inputs": [ - { - "name": "index", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "name", - "type": "string", - "indexed": false, - "internalType": "string" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "GroupUpdated", - "inputs": [ - { - "name": "index", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Initialized", - "inputs": [ - { - "name": "version", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "PairAdded", - "inputs": [ - { - "name": "index", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "from", - "type": "string", - "indexed": false, - "internalType": "string" - }, - { - "name": "to", - "type": "string", - "indexed": false, - "internalType": "string" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "PairUpdated", - "inputs": [ - { - "name": "index", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Upgraded", - "inputs": [ - { - "name": "implementation", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AddressEmptyCode", - "inputs": [ - { - "name": "target", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967InvalidImplementation", - "inputs": [ - { - "name": "implementation", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967NonPayable", - "inputs": [] - }, - { - "type": "error", - "name": "FailedInnerCall", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnauthorizedCallContext", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnsupportedProxiableUUID", - "inputs": [ - { - "name": "slot", - "type": "bytes32", - "internalType": "bytes32" - } - ] - } -] diff --git a/berps/Orders.json b/berps/Orders.json deleted file mode 100644 index 2f7f0fc..0000000 --- a/berps/Orders.json +++ /dev/null @@ -1,1305 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "PRECISION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "UPGRADE_INTERFACE_VERSION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "addTradingContract", - "inputs": [ - { - "name": "_trading", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "entrypoint", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getOpenLimitOrder", - "inputs": [ - { - "name": "limitIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "order", - "type": "tuple", - "internalType": "struct IOrders.OpenLimitOrder", - "components": [ - { - "name": "trader", - "type": "address", - "internalType": "address" - }, - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "index", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "positionSize", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "buy", - "type": "bool", - "internalType": "bool" - }, - { - "name": "leverage", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "tp", - "type": "int64", - "internalType": "int64" - }, - { - "name": "sl", - "type": "int64", - "internalType": "int64" - }, - { - "name": "minPrice", - "type": "int64", - "internalType": "int64" - }, - { - "name": "maxPrice", - "type": "int64", - "internalType": "int64" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getOpenLimitOrders", - "inputs": [ - { - "name": "offset", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "count", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "orders", - "type": "tuple[]", - "internalType": "struct IOrders.OpenLimitOrder[]", - "components": [ - { - "name": "trader", - "type": "address", - "internalType": "address" - }, - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "index", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "positionSize", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "buy", - "type": "bool", - "internalType": "bool" - }, - { - "name": "leverage", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "tp", - "type": "int64", - "internalType": "int64" - }, - { - "name": "sl", - "type": "int64", - "internalType": "int64" - }, - { - "name": "minPrice", - "type": "int64", - "internalType": "int64" - }, - { - "name": "maxPrice", - "type": "int64", - "internalType": "int64" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getOpenLimitOrdersCount", - "inputs": [ - { - "name": "trader", - "type": "address", - "internalType": "address" - }, - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getOpenTrade", - "inputs": [ - { - "name": "tradeIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "trade", - "type": "tuple", - "internalType": "struct IOrders.Trade", - "components": [ - { - "name": "trader", - "type": "address", - "internalType": "address" - }, - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "index", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "initialPosToken", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "positionSizeHoney", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "openPrice", - "type": "int64", - "internalType": "int64" - }, - { - "name": "buy", - "type": "bool", - "internalType": "bool" - }, - { - "name": "leverage", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "tp", - "type": "int64", - "internalType": "int64" - }, - { - "name": "sl", - "type": "int64", - "internalType": "int64" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getOpenTradeInfo", - "inputs": [ - { - "name": "tradeIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "tradeInfo", - "type": "tuple", - "internalType": "struct IOrders.TradeInfo", - "components": [ - { - "name": "tokenPriceHoney", - "type": "int64", - "internalType": "int64" - }, - { - "name": "openInterestHoney", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getOpenTradeInfos", - "inputs": [ - { - "name": "offset", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "count", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "tradeInfos", - "type": "tuple[]", - "internalType": "struct IOrders.TradeInfo[]", - "components": [ - { - "name": "tokenPriceHoney", - "type": "int64", - "internalType": "int64" - }, - { - "name": "openInterestHoney", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getOpenTrades", - "inputs": [ - { - "name": "offset", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "count", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "trades", - "type": "tuple[]", - "internalType": "struct IOrders.Trade[]", - "components": [ - { - "name": "trader", - "type": "address", - "internalType": "address" - }, - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "index", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "initialPosToken", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "positionSizeHoney", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "openPrice", - "type": "int64", - "internalType": "int64" - }, - { - "name": "buy", - "type": "bool", - "internalType": "bool" - }, - { - "name": "leverage", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "tp", - "type": "int64", - "internalType": "int64" - }, - { - "name": "sl", - "type": "int64", - "internalType": "int64" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getOpenTradesCount", - "inputs": [ - { - "name": "trader", - "type": "address", - "internalType": "address" - }, - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "globalIndex", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "gov", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "handleDevGovFees", - "inputs": [ - { - "name": "_pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "_leveragedPositionSize", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "fee", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "honey", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "_honey", - "type": "address", - "internalType": "address" - }, - { - "name": "_gov", - "type": "address", - "internalType": "address" - }, - { - "name": "_markets", - "type": "address", - "internalType": "address" - }, - { - "name": "_vault", - "type": "address", - "internalType": "address" - }, - { - "name": "_entrypoint", - "type": "address", - "internalType": "address" - }, - { - "name": "_settlement", - "type": "address", - "internalType": "address" - }, - { - "name": "_referrals", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "isTradingContract", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "markets", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IMarkets" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "maxTradesPerPair", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "openInterestHoney", - "inputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "proxiableUUID", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "referrals", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IReferrals" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "removeTradingContract", - "inputs": [ - { - "name": "_trading", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setGov", - "inputs": [ - { - "name": "_gov", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setMaxOpenInterestHoney", - "inputs": [ - { - "name": "_pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "_newMaxOpenInterest", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setMaxTradesPerPair", - "inputs": [ - { - "name": "_maxTradesPerPair", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "settlement", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "storeOpenLimitOrder", - "inputs": [ - { - "name": "o", - "type": "tuple", - "internalType": "struct IOrders.OpenLimitOrder", - "components": [ - { - "name": "trader", - "type": "address", - "internalType": "address" - }, - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "index", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "positionSize", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "buy", - "type": "bool", - "internalType": "bool" - }, - { - "name": "leverage", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "tp", - "type": "int64", - "internalType": "int64" - }, - { - "name": "sl", - "type": "int64", - "internalType": "int64" - }, - { - "name": "minPrice", - "type": "int64", - "internalType": "int64" - }, - { - "name": "maxPrice", - "type": "int64", - "internalType": "int64" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "storeTrade", - "inputs": [ - { - "name": "t", - "type": "tuple", - "internalType": "struct IOrders.Trade", - "components": [ - { - "name": "trader", - "type": "address", - "internalType": "address" - }, - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "index", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "initialPosToken", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "positionSizeHoney", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "openPrice", - "type": "int64", - "internalType": "int64" - }, - { - "name": "buy", - "type": "bool", - "internalType": "bool" - }, - { - "name": "leverage", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "tp", - "type": "int64", - "internalType": "int64" - }, - { - "name": "sl", - "type": "int64", - "internalType": "int64" - } - ] - }, - { - "name": "i", - "type": "tuple", - "internalType": "struct IOrders.TradeInfo", - "components": [ - { - "name": "tokenPriceHoney", - "type": "int64", - "internalType": "int64" - }, - { - "name": "openInterestHoney", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "transferHoney", - "inputs": [ - { - "name": "_from", - "type": "address", - "internalType": "address" - }, - { - "name": "_to", - "type": "address", - "internalType": "address" - }, - { - "name": "_amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "unregisterOpenLimitOrder", - "inputs": [ - { - "name": "removeIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "unregisterTrade", - "inputs": [ - { - "name": "removeIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateOpenLimitOrder", - "inputs": [ - { - "name": "_o", - "type": "tuple", - "internalType": "struct IOrders.OpenLimitOrder", - "components": [ - { - "name": "trader", - "type": "address", - "internalType": "address" - }, - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "index", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "positionSize", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "buy", - "type": "bool", - "internalType": "bool" - }, - { - "name": "leverage", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "tp", - "type": "int64", - "internalType": "int64" - }, - { - "name": "sl", - "type": "int64", - "internalType": "int64" - }, - { - "name": "minPrice", - "type": "int64", - "internalType": "int64" - }, - { - "name": "maxPrice", - "type": "int64", - "internalType": "int64" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateSl", - "inputs": [ - { - "name": "tradeIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "newSl", - "type": "int64", - "internalType": "int64" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateTp", - "inputs": [ - { - "name": "tradeIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "newTp", - "type": "int64", - "internalType": "int64" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateTrade", - "inputs": [ - { - "name": "_t", - "type": "tuple", - "internalType": "struct IOrders.Trade", - "components": [ - { - "name": "trader", - "type": "address", - "internalType": "address" - }, - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "index", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "initialPosToken", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "positionSizeHoney", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "openPrice", - "type": "int64", - "internalType": "int64" - }, - { - "name": "buy", - "type": "bool", - "internalType": "bool" - }, - { - "name": "leverage", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "tp", - "type": "int64", - "internalType": "int64" - }, - { - "name": "sl", - "type": "int64", - "internalType": "int64" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "upgradeToAndCall", - "inputs": [ - { - "name": "newImplementation", - "type": "address", - "internalType": "address" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "vault", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IVault" - } - ], - "stateMutability": "view" - }, - { - "type": "event", - "name": "AddressUpdated", - "inputs": [ - { - "name": "name", - "type": "string", - "indexed": false, - "internalType": "string" - }, - { - "name": "a", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Initialized", - "inputs": [ - { - "name": "version", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "NumberUpdated", - "inputs": [ - { - "name": "name", - "type": "string", - "indexed": false, - "internalType": "string" - }, - { - "name": "value", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "NumberUpdatedPair", - "inputs": [ - { - "name": "name", - "type": "string", - "indexed": false, - "internalType": "string" - }, - { - "name": "pairIndex", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "value", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "TradingContractAdded", - "inputs": [ - { - "name": "a", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "TradingContractRemoved", - "inputs": [ - { - "name": "a", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Upgraded", - "inputs": [ - { - "name": "implementation", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AddressEmptyCode", - "inputs": [ - { - "name": "target", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967InvalidImplementation", - "inputs": [ - { - "name": "implementation", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967NonPayable", - "inputs": [] - }, - { - "type": "error", - "name": "FailedInnerCall", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnauthorizedCallContext", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnsupportedProxiableUUID", - "inputs": [ - { - "name": "slot", - "type": "bytes32", - "internalType": "bytes32" - } - ] - } -] diff --git a/berps/Referrals.json b/berps/Referrals.json deleted file mode 100644 index fbe3200..0000000 --- a/berps/Referrals.json +++ /dev/null @@ -1,552 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "UPGRADE_INTERFACE_VERSION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "distributePotentialReward", - "inputs": [ - { - "name": "trader", - "type": "address", - "internalType": "address" - }, - { - "name": "volumeHoney", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "pairOpenFeeP", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "getAllReferrerDetails", - "inputs": [ - { - "name": "offset", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "count", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "details", - "type": "tuple[]", - "internalType": "struct IReferrals.ReferrerDetails[]", - "components": [ - { - "name": "tradersReferred", - "type": "address[]", - "internalType": "address[]" - }, - { - "name": "volumeReferredHoney", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "pendingRewardsToken", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "totalRewardsToken", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "totalRewardsValueHoney", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getPercentOfOpenFeeP", - "inputs": [ - { - "name": "trader", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getPercentOfOpenFeeP_calc", - "inputs": [ - { - "name": "volumeReferredHoney", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "resultP", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getReferrerDetails", - "inputs": [ - { - "name": "referrer", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "tuple", - "internalType": "struct IReferrals.ReferrerDetails", - "components": [ - { - "name": "tradersReferred", - "type": "address[]", - "internalType": "address[]" - }, - { - "name": "volumeReferredHoney", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "pendingRewardsToken", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "totalRewardsToken", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "totalRewardsValueHoney", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getTraderReferrer", - "inputs": [ - { - "name": "trader", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "_orders", - "type": "address", - "internalType": "address" - }, - { - "name": "_startReferrerFeeP", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "_openFeeP", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "_targetVolumeHoney", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "openFeeP", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "orders", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IOrdersForReferrals" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "proxiableUUID", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "referrersCount", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "registerPotentialReferrer", - "inputs": [ - { - "name": "referrer", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "startReferrerFeeP", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "targetVolumeHoney", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "updateOpenFeeP", - "inputs": [ - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateStartReferrerFeeP", - "inputs": [ - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateTargetVolumeHoney", - "inputs": [ - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "upgradeToAndCall", - "inputs": [ - { - "name": "newImplementation", - "type": "address", - "internalType": "address" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "event", - "name": "Initialized", - "inputs": [ - { - "name": "version", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ReferrerRegistered", - "inputs": [ - { - "name": "trader", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "referrer", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ReferrerRewardDistributed", - "inputs": [ - { - "name": "referrer", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "trader", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "volumeHoney", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "referredAmtHoney", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "UpdatedOpenFeeP", - "inputs": [ - { - "name": "value", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "UpdatedStartReferrerFeeP", - "inputs": [ - { - "name": "value", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "UpdatedTargetVolumeHoney", - "inputs": [ - { - "name": "value", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Upgraded", - "inputs": [ - { - "name": "implementation", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AddressEmptyCode", - "inputs": [ - { - "name": "target", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967InvalidImplementation", - "inputs": [ - { - "name": "implementation", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967NonPayable", - "inputs": [] - }, - { - "type": "error", - "name": "FailedInnerCall", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnauthorizedCallContext", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnsupportedProxiableUUID", - "inputs": [ - { - "name": "slot", - "type": "bytes32", - "internalType": "bytes32" - } - ] - } -] diff --git a/berps/Settlement.json b/berps/Settlement.json deleted file mode 100644 index 45ed8aa..0000000 --- a/berps/Settlement.json +++ /dev/null @@ -1,1328 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "UPGRADE_INTERFACE_VERSION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "canExecuteTimeout", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint64", - "internalType": "uint64" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "closeTradeMarketCallback", - "inputs": [ - { - "name": "currentPrice", - "type": "int64", - "internalType": "int64" - }, - { - "name": "tradeIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "executeLimitCloseOrderCallback", - "inputs": [ - { - "name": "currentPrice", - "type": "int64", - "internalType": "int64" - }, - { - "name": "tradeIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "executor", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "executeLimitOpenOrderCallback", - "inputs": [ - { - "name": "currentPrice", - "type": "int64", - "internalType": "int64" - }, - { - "name": "o", - "type": "tuple", - "internalType": "struct IOrders.OpenLimitOrder", - "components": [ - { - "name": "trader", - "type": "address", - "internalType": "address" - }, - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "index", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "positionSize", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "buy", - "type": "bool", - "internalType": "bool" - }, - { - "name": "leverage", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "tp", - "type": "int64", - "internalType": "int64" - }, - { - "name": "sl", - "type": "int64", - "internalType": "int64" - }, - { - "name": "minPrice", - "type": "int64", - "internalType": "int64" - }, - { - "name": "maxPrice", - "type": "int64", - "internalType": "int64" - } - ] - }, - { - "name": "executor", - "type": "address", - "internalType": "address" - }, - { - "name": "isPaused", - "type": "bool", - "internalType": "bool" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "feesAccrued", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IFeesAccrued" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "feesMarkets", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IFeesMarkets" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getAllPairsMaxLeverage", - "inputs": [], - "outputs": [ - { - "name": "lev", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "_orders", - "type": "address", - "internalType": "address" - }, - { - "name": "_feesMarkets", - "type": "address", - "internalType": "address" - }, - { - "name": "_referrals", - "type": "address", - "internalType": "address" - }, - { - "name": "_feesAccrued", - "type": "address", - "internalType": "address" - }, - { - "name": "_vault", - "type": "address", - "internalType": "address" - }, - { - "name": "_honey", - "type": "address", - "internalType": "address" - }, - { - "name": "_canExecuteTimeout", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "_updateSlFeeP", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "_liqFeeP", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "liqFeeP", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "openTradeMarketCallback", - "inputs": [ - { - "name": "currentPrice", - "type": "int64", - "internalType": "int64" - }, - { - "name": "t", - "type": "tuple", - "internalType": "struct IOrders.Trade", - "components": [ - { - "name": "trader", - "type": "address", - "internalType": "address" - }, - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "index", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "initialPosToken", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "positionSizeHoney", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "openPrice", - "type": "int64", - "internalType": "int64" - }, - { - "name": "buy", - "type": "bool", - "internalType": "bool" - }, - { - "name": "leverage", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "tp", - "type": "int64", - "internalType": "int64" - }, - { - "name": "sl", - "type": "int64", - "internalType": "int64" - } - ] - }, - { - "name": "wantedPrice", - "type": "int64", - "internalType": "int64" - }, - { - "name": "slippageP", - "type": "int64", - "internalType": "int64" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "orders", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IOrders" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "pairMaxLeverage", - "inputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "proxiableUUID", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "referrals", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IReferrals" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "removeLimitLastUpdated", - "inputs": [ - { - "name": "limitIndex", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setCanExecuteTimeout", - "inputs": [ - { - "name": "_canExecuteTimeout", - "type": "uint64", - "internalType": "uint64" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setLiqFeeP", - "inputs": [ - { - "name": "_liqFeeP", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setPairMaxLeverage", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "maxLeverage", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setPairMaxLeverageArray", - "inputs": [ - { - "name": "indices", - "type": "uint256[]", - "internalType": "uint256[]" - }, - { - "name": "values", - "type": "uint256[]", - "internalType": "uint256[]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setTradeLastUpdated", - "inputs": [ - { - "name": "index", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "_lastUpdated", - "type": "tuple", - "internalType": "struct ISettlement.LastUpdated", - "components": [ - { - "name": "tp", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "sl", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "limit", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "created", - "type": "uint64", - "internalType": "uint64" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setUpdateSlFeeP", - "inputs": [ - { - "name": "_updateSlFeeP", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "tradeLastUpdated", - "inputs": [ - { - "name": "index", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "tuple", - "internalType": "struct ISettlement.LastUpdated", - "components": [ - { - "name": "tp", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "sl", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "limit", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "created", - "type": "uint64", - "internalType": "uint64" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "updateSlCallback", - "inputs": [ - { - "name": "currentPrice", - "type": "int64", - "internalType": "int64" - }, - { - "name": "tradeIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "newSl", - "type": "int64", - "internalType": "int64" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateSlFeeP", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "upgradeToAndCall", - "inputs": [ - { - "name": "newImplementation", - "type": "address", - "internalType": "address" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "vault", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IVault" - } - ], - "stateMutability": "view" - }, - { - "type": "event", - "name": "CanExecuteTimeoutUpdated", - "inputs": [ - { - "name": "newValue", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Initialized", - "inputs": [ - { - "name": "version", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "LimitCloseCanceled", - "inputs": [ - { - "name": "executor", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "tradeIndex", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "cancelReason", - "type": "uint8", - "indexed": false, - "internalType": "enum ISettlement.CancelReason" - }, - { - "name": "currPrice", - "type": "int64", - "indexed": false, - "internalType": "int64" - }, - { - "name": "tp", - "type": "int64", - "indexed": false, - "internalType": "int64" - }, - { - "name": "sl", - "type": "int64", - "indexed": false, - "internalType": "int64" - }, - { - "name": "liq", - "type": "int64", - "indexed": false, - "internalType": "int64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "LimitCloseExecuted", - "inputs": [ - { - "name": "executor", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "t", - "type": "tuple", - "indexed": false, - "internalType": "struct IOrders.Trade", - "components": [ - { - "name": "trader", - "type": "address", - "internalType": "address" - }, - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "index", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "initialPosToken", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "positionSizeHoney", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "openPrice", - "type": "int64", - "internalType": "int64" - }, - { - "name": "buy", - "type": "bool", - "internalType": "bool" - }, - { - "name": "leverage", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "tp", - "type": "int64", - "internalType": "int64" - }, - { - "name": "sl", - "type": "int64", - "internalType": "int64" - } - ] - }, - { - "name": "closeType", - "type": "uint8", - "indexed": false, - "internalType": "enum IOrders.LimitOrder" - }, - { - "name": "closePrice", - "type": "int64", - "indexed": false, - "internalType": "int64" - }, - { - "name": "percentProfit", - "type": "int256", - "indexed": false, - "internalType": "int256" - }, - { - "name": "pnl", - "type": "int256", - "indexed": false, - "internalType": "int256" - }, - { - "name": "fees", - "type": "tuple", - "indexed": false, - "internalType": "struct ISettlement.ClosingFees", - "components": [ - { - "name": "borrowFee", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "closeFee", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "rolloverFee", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "fundingFee", - "type": "int256", - "internalType": "int256" - } - ] - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "LimitOpenCanceled", - "inputs": [ - { - "name": "executor", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "limitIndex", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "cancelReason", - "type": "uint8", - "indexed": false, - "internalType": "enum ISettlement.CancelReason" - }, - { - "name": "currPrice", - "type": "int64", - "indexed": false, - "internalType": "int64" - }, - { - "name": "minExecPrice", - "type": "int64", - "indexed": false, - "internalType": "int64" - }, - { - "name": "maxExecPrice", - "type": "int64", - "indexed": false, - "internalType": "int64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "LimitOpenExecuted", - "inputs": [ - { - "name": "executor", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "limitIndex", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "t", - "type": "tuple", - "indexed": false, - "internalType": "struct IOrders.Trade", - "components": [ - { - "name": "trader", - "type": "address", - "internalType": "address" - }, - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "index", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "initialPosToken", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "positionSizeHoney", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "openPrice", - "type": "int64", - "internalType": "int64" - }, - { - "name": "buy", - "type": "bool", - "internalType": "bool" - }, - { - "name": "leverage", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "tp", - "type": "int64", - "internalType": "int64" - }, - { - "name": "sl", - "type": "int64", - "internalType": "int64" - } - ] - }, - { - "name": "priceImpactP", - "type": "int64", - "indexed": false, - "internalType": "int64" - }, - { - "name": "openFee", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "LiqFeePUpdated", - "inputs": [ - { - "name": "newValue", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "MarketClosed", - "inputs": [ - { - "name": "t", - "type": "tuple", - "indexed": false, - "internalType": "struct IOrders.Trade", - "components": [ - { - "name": "trader", - "type": "address", - "internalType": "address" - }, - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "index", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "initialPosToken", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "positionSizeHoney", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "openPrice", - "type": "int64", - "internalType": "int64" - }, - { - "name": "buy", - "type": "bool", - "internalType": "bool" - }, - { - "name": "leverage", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "tp", - "type": "int64", - "internalType": "int64" - }, - { - "name": "sl", - "type": "int64", - "internalType": "int64" - } - ] - }, - { - "name": "closePrice", - "type": "int64", - "indexed": false, - "internalType": "int64" - }, - { - "name": "percentProfit", - "type": "int256", - "indexed": false, - "internalType": "int256" - }, - { - "name": "pnl", - "type": "int256", - "indexed": false, - "internalType": "int256" - }, - { - "name": "fees", - "type": "tuple", - "indexed": false, - "internalType": "struct ISettlement.ClosingFees", - "components": [ - { - "name": "borrowFee", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "closeFee", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "rolloverFee", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "fundingFee", - "type": "int256", - "internalType": "int256" - } - ] - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "MarketOpened", - "inputs": [ - { - "name": "t", - "type": "tuple", - "indexed": false, - "internalType": "struct IOrders.Trade", - "components": [ - { - "name": "trader", - "type": "address", - "internalType": "address" - }, - { - "name": "pairIndex", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "index", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "initialPosToken", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "positionSizeHoney", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "openPrice", - "type": "int64", - "internalType": "int64" - }, - { - "name": "buy", - "type": "bool", - "internalType": "bool" - }, - { - "name": "leverage", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "tp", - "type": "int64", - "internalType": "int64" - }, - { - "name": "sl", - "type": "int64", - "internalType": "int64" - } - ] - }, - { - "name": "priceImpactP", - "type": "int64", - "indexed": false, - "internalType": "int64" - }, - { - "name": "openFee", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "OpenLimitSlCanceled", - "inputs": [ - { - "name": "limitIndex", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "currPrice", - "type": "int64", - "indexed": false, - "internalType": "int64" - }, - { - "name": "sl", - "type": "int64", - "indexed": false, - "internalType": "int64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "PairMaxLeverageUpdated", - "inputs": [ - { - "name": "pairIndex", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "maxLeverage", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "SlUpdated", - "inputs": [ - { - "name": "index", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "newSl", - "type": "int64", - "indexed": false, - "internalType": "int64" - }, - { - "name": "initialPosToken", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "posSizeHoney", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "UpdateSlFeePUpdated", - "inputs": [ - { - "name": "newValue", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Upgraded", - "inputs": [ - { - "name": "implementation", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AddressEmptyCode", - "inputs": [ - { - "name": "target", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967InvalidImplementation", - "inputs": [ - { - "name": "implementation", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967NonPayable", - "inputs": [] - }, - { - "type": "error", - "name": "FailedInnerCall", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "MarketClosed", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnauthorizedCallContext", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnsupportedProxiableUUID", - "inputs": [ - { - "name": "slot", - "type": "bytes32", - "internalType": "bytes32" - } - ] - } -] diff --git a/berps/Vault.json b/berps/Vault.json deleted file mode 100644 index 8ff3ce5..0000000 --- a/berps/Vault.json +++ /dev/null @@ -1,2217 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "UPGRADE_INTERFACE_VERSION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "accPnlPerToken", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "int256", - "internalType": "int256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "accRewardsPerToken", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "accTimeWeightedMarketCap", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "accTimeWeightedMarketCapLastStored", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "allowance", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - }, - { - "name": "spender", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "approve", - "inputs": [ - { - "name": "spender", - "type": "address", - "internalType": "address" - }, - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "asset", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "availableAssets", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "balanceOf", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "cancelWithdrawRequest", - "inputs": [ - { - "name": "shares", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "unlockEpoch", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "collateralizationP", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "completeBalanceOf", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "completeBalanceOfAssets", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "convertToAssets", - "inputs": [ - { - "name": "shares", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "convertToShares", - "inputs": [ - { - "name": "assets", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "currentEpoch", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "currentEpochPositiveOpenPnl", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "currentEpochStart", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "currentMaxSupply", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "dailyAccPnlDelta", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "int256", - "internalType": "int256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "decimals", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint8", - "internalType": "uint8" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "deposit", - "inputs": [ - { - "name": "assets", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "receiver", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "distributeReward", - "inputs": [ - { - "name": "assets", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "epochLength", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "forceNewEpoch", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "getPendingAccTimeWeightedMarketCap", - "inputs": [ - { - "name": "currentTime", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "_name", - "type": "string", - "internalType": "string" - }, - { - "name": "_symbol", - "type": "string", - "internalType": "string" - }, - { - "name": "_contractAddresses", - "type": "tuple", - "internalType": "struct IVault.ContractAddresses", - "components": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "owner", - "type": "address", - "internalType": "address" - }, - { - "name": "manager", - "type": "address", - "internalType": "address" - }, - { - "name": "pnlHandler", - "type": "address", - "internalType": "address" - }, - { - "name": "safetyModule", - "type": "address", - "internalType": "address" - } - ] - }, - { - "name": "params", - "type": "tuple", - "internalType": "struct IVault.Params", - "components": [ - { - "name": "_maxDailyAccPnlDelta", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "_withdrawLockThresholdsPLow", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "_withdrawLockThresholdsPHigh", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "_maxSupplyIncreaseDailyP", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "_epochLength", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "_minRecollatP", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "_safeMinSharePrice", - "type": "uint256", - "internalType": "uint256" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "lastDailyAccPnlDeltaReset", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "lastMaxSupplyUpdate", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "makeWithdrawRequest", - "inputs": [ - { - "name": "shares", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "manager", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "marketCap", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "maxAccPnlPerToken", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "maxDailyAccPnlDelta", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "maxDeposit", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "maxMint", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "maxRedeem", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "maxSupplyIncreaseDailyP", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "maxWithdraw", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "minRecollatP", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "mint", - "inputs": [ - { - "name": "shares", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "receiver", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "name", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "numEpochsWithdrawLocked", - "inputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "owner", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "pnlHandler", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "previewDeposit", - "inputs": [ - { - "name": "assets", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "previewMint", - "inputs": [ - { - "name": "shares", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "previewRedeem", - "inputs": [ - { - "name": "shares", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "previewWithdraw", - "inputs": [ - { - "name": "assets", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "proxiableUUID", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "recapitalize", - "inputs": [ - { - "name": "assets", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "receiveAssets", - "inputs": [ - { - "name": "assets", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "user", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "redeem", - "inputs": [ - { - "name": "shares", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "receiver", - "type": "address", - "internalType": "address" - }, - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "renounceOwnership", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "safeMinSharePrice", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "safetyModule", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "sendAssets", - "inputs": [ - { - "name": "assets", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "receiver", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "shareToAssetsPrice", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "storeAccTimeWeightedMarketCap", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "symbol", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "totalAssets", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "totalClosedPnl", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "int256", - "internalType": "int256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "totalDeposited", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "totalLiability", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "int256", - "internalType": "int256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "totalRecapitalized", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "totalRewards", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "totalSharesBeingWithdrawn", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "shares", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "totalSupply", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "transfer", - "inputs": [ - { - "name": "to", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "transferFrom", - "inputs": [ - { - "name": "from", - "type": "address", - "internalType": "address" - }, - { - "name": "to", - "type": "address", - "internalType": "address" - }, - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "transferOwnership", - "inputs": [ - { - "name": "newOwner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "tryResetDailyAccPnlDelta", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "tryUpdateCurrentMaxSupply", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "tvl", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "updateEpochLength", - "inputs": [ - { - "name": "newValue", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateManager", - "inputs": [ - { - "name": "newValue", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateMaxDailyAccPnlDelta", - "inputs": [ - { - "name": "newValue", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateMaxSupplyIncreaseDailyP", - "inputs": [ - { - "name": "newValue", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateMinRecollatP", - "inputs": [ - { - "name": "newValue", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updatePnlHandler", - "inputs": [ - { - "name": "newValue", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateSafeMinSharePrice", - "inputs": [ - { - "name": "newValue", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateSafetyModule", - "inputs": [ - { - "name": "newValue", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateWithdrawLockThresholdsP", - "inputs": [ - { - "name": "newValue", - "type": "uint256[2]", - "internalType": "uint256[2]" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "upgradeToAndCall", - "inputs": [ - { - "name": "newImplementation", - "type": "address", - "internalType": "address" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "withdraw", - "inputs": [ - { - "name": "assets", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "receiver", - "type": "address", - "internalType": "address" - }, - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "withdrawEpochsTimelock", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "withdrawLockThresholdsP", - "inputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "withdrawRequests", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - }, - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "event", - "name": "AccTimeWeightedMarketCapStored", - "inputs": [ - { - "name": "currentTime", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "newAccValue", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "AddressParamUpdated", - "inputs": [ - { - "name": "name", - "type": "string", - "indexed": false, - "internalType": "string" - }, - { - "name": "newValue", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Approval", - "inputs": [ - { - "name": "owner", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "spender", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "value", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "AssetsDirectedToSafetyModule", - "inputs": [ - { - "name": "sender", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "assets", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "collatPSnapshot", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "AssetsReceived", - "inputs": [ - { - "name": "sender", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "user", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "assets", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "AssetsSent", - "inputs": [ - { - "name": "sender", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "receiver", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "assets", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "CurrentMaxSupplyUpdated", - "inputs": [ - { - "name": "newValue", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "DailyAccPnlDeltaReset", - "inputs": [], - "anonymous": false - }, - { - "type": "event", - "name": "Deposit", - "inputs": [ - { - "name": "sender", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "owner", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "assets", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "shares", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "FeesDistributed", - "inputs": [ - { - "name": "assetsToVault", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "totalDepositedSnapshot", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "FeesSentToSafetyModule", - "inputs": [ - { - "name": "assets", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "shareToAssetsPriceSnapshot", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Initialized", - "inputs": [ - { - "name": "version", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "NewEpoch", - "inputs": [ - { - "name": "newEpoch", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "newEpochPositiveOpenPnl", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "NewEpochForced", - "inputs": [ - { - "name": "newEpoch", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "NumberParamUpdated", - "inputs": [ - { - "name": "name", - "type": "string", - "indexed": false, - "internalType": "string" - }, - { - "name": "newValue", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "OpenTradesPnlFeedCallFailed", - "inputs": [], - "anonymous": false - }, - { - "type": "event", - "name": "OwnershipTransferred", - "inputs": [ - { - "name": "previousOwner", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "newOwner", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Recapitalized", - "inputs": [ - { - "name": "sender", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "assetsRecapitalized", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "collatPSnapshot", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "ShareToAssetsPriceUpdated", - "inputs": [ - { - "name": "newValue", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Transfer", - "inputs": [ - { - "name": "from", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "to", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "value", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Upgraded", - "inputs": [ - { - "name": "implementation", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Withdraw", - "inputs": [ - { - "name": "sender", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "receiver", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "owner", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "assets", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "shares", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "WithdrawLockThresholdsPUpdated", - "inputs": [ - { - "name": "newValue", - "type": "uint256[2]", - "indexed": false, - "internalType": "uint256[2]" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "WithdrawalCanceled", - "inputs": [ - { - "name": "owner", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "unlockEpoch", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "newSharesAmount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "WithdrawalRequested", - "inputs": [ - { - "name": "owner", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "unlockEpoch", - "type": "uint256", - "indexed": true, - "internalType": "uint256" - }, - { - "name": "newSharesAmount", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AddressEmptyCode", - "inputs": [ - { - "name": "target", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AddressInsufficientBalance", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967InvalidImplementation", - "inputs": [ - { - "name": "implementation", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967NonPayable", - "inputs": [] - }, - { - "type": "error", - "name": "ERC20InsufficientAllowance", - "inputs": [ - { - "name": "spender", - "type": "address", - "internalType": "address" - }, - { - "name": "allowance", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "needed", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "ERC20InsufficientBalance", - "inputs": [ - { - "name": "sender", - "type": "address", - "internalType": "address" - }, - { - "name": "balance", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "needed", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "ERC20InvalidApprover", - "inputs": [ - { - "name": "approver", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC20InvalidReceiver", - "inputs": [ - { - "name": "receiver", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC20InvalidSender", - "inputs": [ - { - "name": "sender", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC20InvalidSpender", - "inputs": [ - { - "name": "spender", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC4626ExceededMaxDeposit", - "inputs": [ - { - "name": "receiver", - "type": "address", - "internalType": "address" - }, - { - "name": "assets", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "max", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "ERC4626ExceededMaxMint", - "inputs": [ - { - "name": "receiver", - "type": "address", - "internalType": "address" - }, - { - "name": "shares", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "max", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "ERC4626ExceededMaxRedeem", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - }, - { - "name": "shares", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "max", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "ERC4626ExceededMaxWithdraw", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - }, - { - "name": "assets", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "max", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "FailedInnerCall", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "MathOverflowedMulDiv", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "OwnableInvalidOwner", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "OwnableUnauthorizedAccount", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "SafeERC20FailedOperation", - "inputs": [ - { - "name": "token", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "UUPSUnauthorizedCallContext", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnsupportedProxiableUUID", - "inputs": [ - { - "name": "slot", - "type": "bytes32", - "internalType": "bytes32" - } - ] - } -] diff --git a/berps/VaultSafetyModule.json b/berps/VaultSafetyModule.json deleted file mode 100644 index 0db769a..0000000 --- a/berps/VaultSafetyModule.json +++ /dev/null @@ -1,364 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "UPGRADE_INTERFACE_VERSION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "asset", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "donateAllToPoL", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "donateToPoL", - "inputs": [ - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "feeCollector", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IFeeCollector" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "_manager", - "type": "address", - "internalType": "address" - }, - { - "name": "_asset", - "type": "address", - "internalType": "address" - }, - { - "name": "_vault", - "type": "address", - "internalType": "address" - }, - { - "name": "_feeCollector", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "manager", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "proxiableUUID", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "recapitalize", - "inputs": [ - { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "recapitalizeAll", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateAsset", - "inputs": [ - { - "name": "newAsset", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateFeeCollector", - "inputs": [ - { - "name": "newFeeCollector", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateManager", - "inputs": [ - { - "name": "newManager", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "updateVault", - "inputs": [ - { - "name": "newVault", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "upgradeToAndCall", - "inputs": [ - { - "name": "newImplementation", - "type": "address", - "internalType": "address" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "vault", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IVault" - } - ], - "stateMutability": "view" - }, - { - "type": "event", - "name": "AddressUpdated", - "inputs": [ - { - "name": "name", - "type": "string", - "indexed": false, - "internalType": "string" - }, - { - "name": "newValue", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "DonatedToPoL", - "inputs": [ - { - "name": "assets", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "totalDepositedSnapshot", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Initialized", - "inputs": [ - { - "name": "version", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Recapitalized", - "inputs": [ - { - "name": "assets", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - }, - { - "name": "collatPSnapshot", - "type": "uint256", - "indexed": false, - "internalType": "uint256" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Upgraded", - "inputs": [ - { - "name": "implementation", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AddressEmptyCode", - "inputs": [ - { - "name": "target", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967InvalidImplementation", - "inputs": [ - { - "name": "implementation", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967NonPayable", - "inputs": [] - }, - { - "type": "error", - "name": "FailedInnerCall", - "inputs": [] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnauthorizedCallContext", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnsupportedProxiableUUID", - "inputs": [ - { - "name": "slot", - "type": "bytes32", - "internalType": "bytes32" - } - ] - } -] From 6e993db60b2c436b93215d5bcb70f0a3407b5e2d Mon Sep 17 00:00:00 2001 From: Larry the Cucumber Date: Wed, 4 Dec 2024 13:09:58 -0500 Subject: [PATCH 2/3] update core interfaces --- README.md | 2 +- bex/BeraCrocMultiSwap.json | 149 --- bex/ColdPath.json | 119 --- bex/CrocImpact.json | 90 -- bex/CrocPolicy.json | 557 ----------- bex/CrocQuery.json | 888 ------------------ bex/CrocShell.json | 205 ---- bex/CrocSwapDex.json | 289 ------ bex/HotPath.json | 69 -- bex/HotProxy.json | 117 --- bex/KnockoutFlagPath.json | 103 -- bex/KnockoutLiqPath.json | 117 --- bex/LongPath.json | 112 --- bex/MicroPaths.json | 534 ----------- bex/MultiPaths.json | 39 - bex/WarmPath.json | 117 --- core/BGT.json | 784 +++++----------- core/BeaconDeposit.json | 268 ++++++ core/BeraChef.json | 612 +++++------- core/BlockRewardController.json | 409 ++++---- core/Distributor.json | 192 +++- core/FeeCollector.json | 391 +++----- core/HONEY.json | 362 ++++++- core/HoneyFactory.json | 780 +++------------ core/HoneyFactoryReader.json | 709 ++++++++++++++ ...hainRewardsVault.json => RewardVault.json} | 390 +++++++- ...ltFactory.json => RewardVaultFactory.json} | 202 +++- core/StakingRewards.json | 49 - 28 files changed, 2833 insertions(+), 5822 deletions(-) delete mode 100644 bex/BeraCrocMultiSwap.json delete mode 100644 bex/ColdPath.json delete mode 100644 bex/CrocImpact.json delete mode 100644 bex/CrocPolicy.json delete mode 100644 bex/CrocQuery.json delete mode 100644 bex/CrocShell.json delete mode 100644 bex/CrocSwapDex.json delete mode 100644 bex/HotPath.json delete mode 100644 bex/HotProxy.json delete mode 100644 bex/KnockoutFlagPath.json delete mode 100644 bex/KnockoutLiqPath.json delete mode 100644 bex/LongPath.json delete mode 100644 bex/MicroPaths.json delete mode 100644 bex/MultiPaths.json delete mode 100644 bex/WarmPath.json create mode 100644 core/BeaconDeposit.json create mode 100644 core/HoneyFactoryReader.json rename core/{BerachainRewardsVault.json => RewardVault.json} (73%) rename core/{BerachainRewardsVaultFactory.json => RewardVaultFactory.json} (61%) diff --git a/README.md b/README.md index d31e844..cf16905 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # doc-abis -This repository contains all the ABIs for deployed contracts on Berachain bArtio (Testnet). +This repository contains all the ABIs for deployed contracts on Berachain. diff --git a/bex/BeraCrocMultiSwap.json b/bex/BeraCrocMultiSwap.json deleted file mode 100644 index fd84202..0000000 --- a/bex/BeraCrocMultiSwap.json +++ /dev/null @@ -1,149 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "_crocSwapDex", - "type": "address", - "internalType": "address" - }, - { - "name": "_crocImpact", - "type": "address", - "internalType": "address" - }, - { - "name": "_crocQuery", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "receive", - "stateMutability": "payable" - }, - { - "type": "function", - "name": "crocSwapDex", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract CrocSwapDex" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "multiSwap", - "inputs": [ - { - "name": "_steps", - "type": "tuple[]", - "internalType": "struct SwapHelpers.SwapStep[]", - "components": [ - { - "name": "poolIdx", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "base", - "type": "address", - "internalType": "address" - }, - { - "name": "quote", - "type": "address", - "internalType": "address" - }, - { - "name": "isBuy", - "type": "bool", - "internalType": "bool" - } - ] - }, - { - "name": "_amount", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "_minOut", - "type": "uint128", - "internalType": "uint128" - } - ], - "outputs": [ - { - "name": "out", - "type": "uint128", - "internalType": "uint128" - } - ], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "previewMultiSwap", - "inputs": [ - { - "name": "_steps", - "type": "tuple[]", - "internalType": "struct SwapHelpers.SwapStep[]", - "components": [ - { - "name": "poolIdx", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "base", - "type": "address", - "internalType": "address" - }, - { - "name": "quote", - "type": "address", - "internalType": "address" - }, - { - "name": "isBuy", - "type": "bool", - "internalType": "bool" - } - ] - }, - { - "name": "_amount", - "type": "uint128", - "internalType": "uint128" - } - ], - "outputs": [ - { - "name": "out", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "predictedQty", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "retire", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - } -] diff --git a/bex/ColdPath.json b/bex/ColdPath.json deleted file mode 100644 index 9e9c7b9..0000000 --- a/bex/ColdPath.json +++ /dev/null @@ -1,119 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "initialWbera", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "acceptCrocProxyRole", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - }, - { - "name": "slot", - "type": "uint16", - "internalType": "uint16" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "protocolCmd", - "inputs": [ - { - "name": "cmd", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "userCmd", - "inputs": [ - { - "name": "cmd", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "wbera", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "event", - "name": "CrocKnockoutCross", - "inputs": [ - { - "name": "pool", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "tick", - "type": "int24", - "indexed": true, - "internalType": "int24" - }, - { - "name": "isBid", - "type": "bool", - "indexed": false, - "internalType": "bool" - }, - { - "name": "pivotTime", - "type": "uint32", - "indexed": false, - "internalType": "uint32" - }, - { - "name": "feeMileage", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - }, - { - "name": "commitEntropy", - "type": "uint160", - "indexed": false, - "internalType": "uint160" - } - ], - "anonymous": false - } -] diff --git a/bex/CrocImpact.json b/bex/CrocImpact.json deleted file mode 100644 index 1bc7fe7..0000000 --- a/bex/CrocImpact.json +++ /dev/null @@ -1,90 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "dex", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "calcImpact", - "inputs": [ - { - "name": "base", - "type": "address", - "internalType": "address" - }, - { - "name": "quote", - "type": "address", - "internalType": "address" - }, - { - "name": "poolIdx", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "isBuy", - "type": "bool", - "internalType": "bool" - }, - { - "name": "inBaseQty", - "type": "bool", - "internalType": "bool" - }, - { - "name": "qty", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "poolTip", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "limitPrice", - "type": "uint128", - "internalType": "uint128" - } - ], - "outputs": [ - { - "name": "baseFlow", - "type": "int128", - "internalType": "int128" - }, - { - "name": "quoteFlow", - "type": "int128", - "internalType": "int128" - }, - { - "name": "finalPrice", - "type": "uint128", - "internalType": "uint128" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "dex_", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - } -] diff --git a/bex/CrocPolicy.json b/bex/CrocPolicy.json deleted file mode 100644 index 3cf71c7..0000000 --- a/bex/CrocPolicy.json +++ /dev/null @@ -1,557 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "dex", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "acceptsCrocAuthority", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "pure" - }, - { - "type": "function", - "name": "dex_", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "emergencyAuthority_", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "emergencyHalt", - "inputs": [ - { - "name": "minion", - "type": "address", - "internalType": "address" - }, - { - "name": "reason", - "type": "string", - "internalType": "string" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "emergencyReset", - "inputs": [ - { - "name": "conduit", - "type": "address", - "internalType": "address" - }, - { - "name": "proxyPath", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "reason", - "type": "string", - "internalType": "string" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "forcePolicy", - "inputs": [ - { - "name": "conduit", - "type": "address", - "internalType": "address" - }, - { - "name": "proxyPath", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "policy", - "type": "tuple", - "internalType": "struct CrocPolicy.PolicyRule", - "components": [ - { - "name": "cmdFlags_", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "mandateTime_", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "expiryOffset_", - "type": "uint32", - "internalType": "uint32" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "invokePolicy", - "inputs": [ - { - "name": "minion", - "type": "address", - "internalType": "address" - }, - { - "name": "proxyPath", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "cmd", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "opsAuthority_", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "opsResolution", - "inputs": [ - { - "name": "minion", - "type": "address", - "internalType": "address" - }, - { - "name": "proxyPath", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "cmd", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "passesPolicy", - "inputs": [ - { - "name": "policy", - "type": "tuple", - "internalType": "struct CrocPolicy.PolicyRule", - "components": [ - { - "name": "cmdFlags_", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "mandateTime_", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "expiryOffset_", - "type": "uint32", - "internalType": "uint32" - } - ] - }, - { - "name": "protocolCmd", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "rules_", - "inputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "cmdFlags_", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "mandateTime_", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "expiryOffset_", - "type": "uint32", - "internalType": "uint32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "setPolicy", - "inputs": [ - { - "name": "conduit", - "type": "address", - "internalType": "address" - }, - { - "name": "proxyPath", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "policy", - "type": "tuple", - "internalType": "struct CrocPolicy.PolicyRule", - "components": [ - { - "name": "cmdFlags_", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "mandateTime_", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "expiryOffset_", - "type": "uint32", - "internalType": "uint32" - } - ] - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "transferGovernance", - "inputs": [ - { - "name": "ops", - "type": "address", - "internalType": "address" - }, - { - "name": "treasury", - "type": "address", - "internalType": "address" - }, - { - "name": "emergency", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "treasuryAuthority_", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "treasuryResolution", - "inputs": [ - { - "name": "minion", - "type": "address", - "internalType": "address" - }, - { - "name": "proxyPath", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "cmd", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "sudo", - "type": "bool", - "internalType": "bool" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "event", - "name": "CrocEmergencyHalt", - "inputs": [ - { - "name": "minion", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "reason", - "type": "string", - "indexed": false, - "internalType": "string" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "CrocGovernAuthority", - "inputs": [ - { - "name": "ops", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "treasury", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "emergency", - "type": "address", - "indexed": false, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "CrocPolicyEmergency", - "inputs": [ - { - "name": "conduit", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "reason", - "type": "string", - "indexed": false, - "internalType": "string" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "CrocPolicyForce", - "inputs": [ - { - "name": "conduit", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "proxyPath", - "type": "uint16", - "indexed": false, - "internalType": "uint16" - }, - { - "name": "", - "type": "tuple", - "indexed": false, - "internalType": "struct CrocPolicy.PolicyRule", - "components": [ - { - "name": "cmdFlags_", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "mandateTime_", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "expiryOffset_", - "type": "uint32", - "internalType": "uint32" - } - ] - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "CrocPolicySet", - "inputs": [ - { - "name": "conduit", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "proxyPath", - "type": "uint16", - "indexed": false, - "internalType": "uint16" - }, - { - "name": "", - "type": "tuple", - "indexed": false, - "internalType": "struct CrocPolicy.PolicyRule", - "components": [ - { - "name": "cmdFlags_", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "mandateTime_", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "expiryOffset_", - "type": "uint32", - "internalType": "uint32" - } - ] - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "CrocResolutionOps", - "inputs": [ - { - "name": "minion", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "cmd", - "type": "bytes", - "indexed": false, - "internalType": "bytes" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "CrocResolutionTreasury", - "inputs": [ - { - "name": "minion", - "type": "address", - "indexed": false, - "internalType": "address" - }, - { - "name": "sudo", - "type": "bool", - "indexed": false, - "internalType": "bool" - }, - { - "name": "cmd", - "type": "bytes", - "indexed": false, - "internalType": "bytes" - } - ], - "anonymous": false - } -] diff --git a/bex/CrocQuery.json b/bex/CrocQuery.json deleted file mode 100644 index a0276f0..0000000 --- a/bex/CrocQuery.json +++ /dev/null @@ -1,888 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "dex", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "dex_", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "queryAmbientPosition", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - }, - { - "name": "base", - "type": "address", - "internalType": "address" - }, - { - "name": "quote", - "type": "address", - "internalType": "address" - }, - { - "name": "poolIdx", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "seeds", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "timestamp", - "type": "uint32", - "internalType": "uint32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "queryAmbientTokens", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - }, - { - "name": "base", - "type": "address", - "internalType": "address" - }, - { - "name": "quote", - "type": "address", - "internalType": "address" - }, - { - "name": "poolIdx", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "liq", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "baseQty", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "quoteQty", - "type": "uint128", - "internalType": "uint128" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "queryConcRewards", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - }, - { - "name": "base", - "type": "address", - "internalType": "address" - }, - { - "name": "quote", - "type": "address", - "internalType": "address" - }, - { - "name": "poolIdx", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "lowerTick", - "type": "int24", - "internalType": "int24" - }, - { - "name": "upperTick", - "type": "int24", - "internalType": "int24" - } - ], - "outputs": [ - { - "name": "liqRewards", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "baseRewards", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "quoteRewards", - "type": "uint128", - "internalType": "uint128" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "queryCurve", - "inputs": [ - { - "name": "base", - "type": "address", - "internalType": "address" - }, - { - "name": "quote", - "type": "address", - "internalType": "address" - }, - { - "name": "poolIdx", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "curve", - "type": "tuple", - "internalType": "struct CurveMath.CurveState", - "components": [ - { - "name": "priceRoot_", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "ambientSeeds_", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "concLiq_", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "seedDeflator_", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "concGrowth_", - "type": "uint64", - "internalType": "uint64" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "queryCurveTick", - "inputs": [ - { - "name": "base", - "type": "address", - "internalType": "address" - }, - { - "name": "quote", - "type": "address", - "internalType": "address" - }, - { - "name": "poolIdx", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "int24", - "internalType": "int24" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "queryKnockoutMerkle", - "inputs": [ - { - "name": "base", - "type": "address", - "internalType": "address" - }, - { - "name": "quote", - "type": "address", - "internalType": "address" - }, - { - "name": "poolIdx", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "isBid", - "type": "bool", - "internalType": "bool" - }, - { - "name": "tick", - "type": "int24", - "internalType": "int24" - } - ], - "outputs": [ - { - "name": "root", - "type": "uint160", - "internalType": "uint160" - }, - { - "name": "pivot", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "fee", - "type": "uint64", - "internalType": "uint64" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "queryKnockoutPivot", - "inputs": [ - { - "name": "base", - "type": "address", - "internalType": "address" - }, - { - "name": "quote", - "type": "address", - "internalType": "address" - }, - { - "name": "poolIdx", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "isBid", - "type": "bool", - "internalType": "bool" - }, - { - "name": "tick", - "type": "int24", - "internalType": "int24" - } - ], - "outputs": [ - { - "name": "lots", - "type": "uint96", - "internalType": "uint96" - }, - { - "name": "pivot", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "range", - "type": "uint16", - "internalType": "uint16" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "queryKnockoutPos", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - }, - { - "name": "base", - "type": "address", - "internalType": "address" - }, - { - "name": "quote", - "type": "address", - "internalType": "address" - }, - { - "name": "poolIdx", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "pivot", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "isBid", - "type": "bool", - "internalType": "bool" - }, - { - "name": "lowerTick", - "type": "int24", - "internalType": "int24" - }, - { - "name": "upperTick", - "type": "int24", - "internalType": "int24" - } - ], - "outputs": [ - { - "name": "lots", - "type": "uint96", - "internalType": "uint96" - }, - { - "name": "mileage", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "timestamp", - "type": "uint32", - "internalType": "uint32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "queryKnockoutTokens", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - }, - { - "name": "base", - "type": "address", - "internalType": "address" - }, - { - "name": "quote", - "type": "address", - "internalType": "address" - }, - { - "name": "poolIdx", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "pivot", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "isBid", - "type": "bool", - "internalType": "bool" - }, - { - "name": "lowerTick", - "type": "int24", - "internalType": "int24" - }, - { - "name": "upperTick", - "type": "int24", - "internalType": "int24" - } - ], - "outputs": [ - { - "name": "liq", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "baseQty", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "quoteQty", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "knockedOut", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "queryLevel", - "inputs": [ - { - "name": "base", - "type": "address", - "internalType": "address" - }, - { - "name": "quote", - "type": "address", - "internalType": "address" - }, - { - "name": "poolIdx", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "tick", - "type": "int24", - "internalType": "int24" - } - ], - "outputs": [ - { - "name": "bidLots", - "type": "uint96", - "internalType": "uint96" - }, - { - "name": "askLots", - "type": "uint96", - "internalType": "uint96" - }, - { - "name": "odometer", - "type": "uint64", - "internalType": "uint64" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "queryLiquidity", - "inputs": [ - { - "name": "base", - "type": "address", - "internalType": "address" - }, - { - "name": "quote", - "type": "address", - "internalType": "address" - }, - { - "name": "poolIdx", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint128", - "internalType": "uint128" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "queryPoolParams", - "inputs": [ - { - "name": "base", - "type": "address", - "internalType": "address" - }, - { - "name": "quote", - "type": "address", - "internalType": "address" - }, - { - "name": "poolIdx", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "pool", - "type": "tuple", - "internalType": "struct PoolSpecs.Pool", - "components": [ - { - "name": "schema_", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "feeRate_", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "protocolTake_", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "tickSize_", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "jitThresh_", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "knockoutBits_", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "oracleFlags_", - "type": "uint8", - "internalType": "uint8" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "queryPoolTemplate", - "inputs": [ - { - "name": "poolIdx", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "pool", - "type": "tuple", - "internalType": "struct PoolSpecs.Pool", - "components": [ - { - "name": "schema_", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "feeRate_", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "protocolTake_", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "tickSize_", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "jitThresh_", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "knockoutBits_", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "oracleFlags_", - "type": "uint8", - "internalType": "uint8" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "queryPrice", - "inputs": [ - { - "name": "base", - "type": "address", - "internalType": "address" - }, - { - "name": "quote", - "type": "address", - "internalType": "address" - }, - { - "name": "poolIdx", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint128", - "internalType": "uint128" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "queryProtocolAccum", - "inputs": [ - { - "name": "token", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint128", - "internalType": "uint128" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "queryRangePosition", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - }, - { - "name": "base", - "type": "address", - "internalType": "address" - }, - { - "name": "quote", - "type": "address", - "internalType": "address" - }, - { - "name": "poolIdx", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "lowerTick", - "type": "int24", - "internalType": "int24" - }, - { - "name": "upperTick", - "type": "int24", - "internalType": "int24" - } - ], - "outputs": [ - { - "name": "liq", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "fee", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "timestamp", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "atomic", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "queryRangeTokens", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - }, - { - "name": "base", - "type": "address", - "internalType": "address" - }, - { - "name": "quote", - "type": "address", - "internalType": "address" - }, - { - "name": "poolIdx", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "lowerTick", - "type": "int24", - "internalType": "int24" - }, - { - "name": "upperTick", - "type": "int24", - "internalType": "int24" - } - ], - "outputs": [ - { - "name": "liq", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "baseQty", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "quoteQty", - "type": "uint128", - "internalType": "uint128" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "querySurplus", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - }, - { - "name": "token", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "surplus", - "type": "uint128", - "internalType": "uint128" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "queryVirtual", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - }, - { - "name": "tracker", - "type": "address", - "internalType": "address" - }, - { - "name": "salt", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "surplus", - "type": "uint128", - "internalType": "uint128" - } - ], - "stateMutability": "view" - } -] diff --git a/bex/CrocShell.json b/bex/CrocShell.json deleted file mode 100644 index f32d5a8..0000000 --- a/bex/CrocShell.json +++ /dev/null @@ -1,205 +0,0 @@ -[ - { - "type": "function", - "name": "protocolCmd", - "inputs": [ - { - "name": "callpath", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "cmd", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "sudo", - "type": "bool", - "internalType": "bool" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "readSlot", - "inputs": [ - { - "name": "slot", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "swap", - "inputs": [ - { - "name": "base", - "type": "address", - "internalType": "address" - }, - { - "name": "quote", - "type": "address", - "internalType": "address" - }, - { - "name": "poolIdx", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "isBuy", - "type": "bool", - "internalType": "bool" - }, - { - "name": "inBaseQty", - "type": "bool", - "internalType": "bool" - }, - { - "name": "qty", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "tip", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "limitPrice", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "minOut", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "settleFlags", - "type": "uint8", - "internalType": "uint8" - } - ], - "outputs": [ - { - "name": "", - "type": "int128", - "internalType": "int128" - } - ], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "userCmd", - "inputs": [ - { - "name": "callpath", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "cmd", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes", - "internalType": "bytes" - } - ], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "userCmdRelayer", - "inputs": [ - { - "name": "callpath", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "cmd", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "conds", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "relayerTip", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "signature", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [ - { - "name": "output", - "type": "bytes", - "internalType": "bytes" - } - ], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "userCmdRouter", - "inputs": [ - { - "name": "callpath", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "cmd", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "client", - "type": "address", - "internalType": "address" - }, - { - "name": "salt", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes", - "internalType": "bytes" - } - ], - "stateMutability": "payable" - } -] diff --git a/bex/CrocSwapDex.json b/bex/CrocSwapDex.json deleted file mode 100644 index 1e89afe..0000000 --- a/bex/CrocSwapDex.json +++ /dev/null @@ -1,289 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "initialWbera", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "receive", - "stateMutability": "payable" - }, - { - "type": "function", - "name": "acceptCrocDex", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "pure" - }, - { - "type": "function", - "name": "protocolCmd", - "inputs": [ - { - "name": "callpath", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "cmd", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "sudo", - "type": "bool", - "internalType": "bool" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "readSlot", - "inputs": [ - { - "name": "slot", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "data", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "swap", - "inputs": [ - { - "name": "base", - "type": "address", - "internalType": "address" - }, - { - "name": "quote", - "type": "address", - "internalType": "address" - }, - { - "name": "poolIdx", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "isBuy", - "type": "bool", - "internalType": "bool" - }, - { - "name": "inBaseQty", - "type": "bool", - "internalType": "bool" - }, - { - "name": "qty", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "tip", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "limitPrice", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "minOut", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "reserveFlags", - "type": "uint8", - "internalType": "uint8" - } - ], - "outputs": [ - { - "name": "baseFlow", - "type": "int128", - "internalType": "int128" - }, - { - "name": "quoteFlow", - "type": "int128", - "internalType": "int128" - } - ], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "userCmd", - "inputs": [ - { - "name": "callpath", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "cmd", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes", - "internalType": "bytes" - } - ], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "userCmdRelayer", - "inputs": [ - { - "name": "callpath", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "cmd", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "conds", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "relayerTip", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "signature", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [ - { - "name": "output", - "type": "bytes", - "internalType": "bytes" - } - ], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "userCmdRouter", - "inputs": [ - { - "name": "callpath", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "cmd", - "type": "bytes", - "internalType": "bytes" - }, - { - "name": "client", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bytes", - "internalType": "bytes" - } - ], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "wbera", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "event", - "name": "CrocKnockoutCross", - "inputs": [ - { - "name": "pool", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "tick", - "type": "int24", - "indexed": true, - "internalType": "int24" - }, - { - "name": "isBid", - "type": "bool", - "indexed": false, - "internalType": "bool" - }, - { - "name": "pivotTime", - "type": "uint32", - "indexed": false, - "internalType": "uint32" - }, - { - "name": "feeMileage", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - }, - { - "name": "commitEntropy", - "type": "uint160", - "indexed": false, - "internalType": "uint160" - } - ], - "anonymous": false - } -] diff --git a/bex/HotPath.json b/bex/HotPath.json deleted file mode 100644 index f7ecd7b..0000000 --- a/bex/HotPath.json +++ /dev/null @@ -1,69 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "initialWbera", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "wbera", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "event", - "name": "CrocKnockoutCross", - "inputs": [ - { - "name": "pool", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "tick", - "type": "int24", - "indexed": true, - "internalType": "int24" - }, - { - "name": "isBid", - "type": "bool", - "indexed": false, - "internalType": "bool" - }, - { - "name": "pivotTime", - "type": "uint32", - "indexed": false, - "internalType": "uint32" - }, - { - "name": "feeMileage", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - }, - { - "name": "commitEntropy", - "type": "uint160", - "indexed": false, - "internalType": "uint160" - } - ], - "anonymous": false - } -] diff --git a/bex/HotProxy.json b/bex/HotProxy.json deleted file mode 100644 index 8a2890e..0000000 --- a/bex/HotProxy.json +++ /dev/null @@ -1,117 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "initialWbera", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "acceptCrocProxyRole", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - }, - { - "name": "slot", - "type": "uint16", - "internalType": "uint16" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "pure" - }, - { - "type": "function", - "name": "userCmd", - "inputs": [ - { - "name": "input", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [ - { - "name": "baseFlow", - "type": "int128", - "internalType": "int128" - }, - { - "name": "quoteFlow", - "type": "int128", - "internalType": "int128" - } - ], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "wbera", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "event", - "name": "CrocKnockoutCross", - "inputs": [ - { - "name": "pool", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "tick", - "type": "int24", - "indexed": true, - "internalType": "int24" - }, - { - "name": "isBid", - "type": "bool", - "indexed": false, - "internalType": "bool" - }, - { - "name": "pivotTime", - "type": "uint32", - "indexed": false, - "internalType": "uint32" - }, - { - "name": "feeMileage", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - }, - { - "name": "commitEntropy", - "type": "uint160", - "indexed": false, - "internalType": "uint160" - } - ], - "anonymous": false - } -] diff --git a/bex/KnockoutFlagPath.json b/bex/KnockoutFlagPath.json deleted file mode 100644 index a7d61a6..0000000 --- a/bex/KnockoutFlagPath.json +++ /dev/null @@ -1,103 +0,0 @@ -[ - { - "type": "function", - "name": "acceptCrocProxyRole", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - }, - { - "name": "slot", - "type": "uint16", - "internalType": "uint16" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "pure" - }, - { - "type": "function", - "name": "crossCurveFlag", - "inputs": [ - { - "name": "pool", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "tick", - "type": "int24", - "internalType": "int24" - }, - { - "name": "isBuy", - "type": "bool", - "internalType": "bool" - }, - { - "name": "feeGlobal", - "type": "uint64", - "internalType": "uint64" - } - ], - "outputs": [ - { - "name": "", - "type": "int128", - "internalType": "int128" - } - ], - "stateMutability": "payable" - }, - { - "type": "event", - "name": "CrocKnockoutCross", - "inputs": [ - { - "name": "pool", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "tick", - "type": "int24", - "indexed": true, - "internalType": "int24" - }, - { - "name": "isBid", - "type": "bool", - "indexed": false, - "internalType": "bool" - }, - { - "name": "pivotTime", - "type": "uint32", - "indexed": false, - "internalType": "uint32" - }, - { - "name": "feeMileage", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - }, - { - "name": "commitEntropy", - "type": "uint160", - "indexed": false, - "internalType": "uint160" - } - ], - "anonymous": false - } -] diff --git a/bex/KnockoutLiqPath.json b/bex/KnockoutLiqPath.json deleted file mode 100644 index 5bf8d65..0000000 --- a/bex/KnockoutLiqPath.json +++ /dev/null @@ -1,117 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "initialWbera", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "acceptCrocProxyRole", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - }, - { - "name": "slot", - "type": "uint16", - "internalType": "uint16" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "pure" - }, - { - "type": "function", - "name": "userCmd", - "inputs": [ - { - "name": "cmd", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [ - { - "name": "baseFlow", - "type": "int128", - "internalType": "int128" - }, - { - "name": "quoteFlow", - "type": "int128", - "internalType": "int128" - } - ], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "wbera", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "event", - "name": "CrocKnockoutCross", - "inputs": [ - { - "name": "pool", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "tick", - "type": "int24", - "indexed": true, - "internalType": "int24" - }, - { - "name": "isBid", - "type": "bool", - "indexed": false, - "internalType": "bool" - }, - { - "name": "pivotTime", - "type": "uint32", - "indexed": false, - "internalType": "uint32" - }, - { - "name": "feeMileage", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - }, - { - "name": "commitEntropy", - "type": "uint160", - "indexed": false, - "internalType": "uint160" - } - ], - "anonymous": false - } -] diff --git a/bex/LongPath.json b/bex/LongPath.json deleted file mode 100644 index a433da9..0000000 --- a/bex/LongPath.json +++ /dev/null @@ -1,112 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "initialWbera", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "acceptCrocProxyRole", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - }, - { - "name": "slot", - "type": "uint16", - "internalType": "uint16" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "pure" - }, - { - "type": "function", - "name": "userCmd", - "inputs": [ - { - "name": "input", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [ - { - "name": "", - "type": "int128[]", - "internalType": "int128[]" - } - ], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "wbera", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "event", - "name": "CrocKnockoutCross", - "inputs": [ - { - "name": "pool", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "tick", - "type": "int24", - "indexed": true, - "internalType": "int24" - }, - { - "name": "isBid", - "type": "bool", - "indexed": false, - "internalType": "bool" - }, - { - "name": "pivotTime", - "type": "uint32", - "indexed": false, - "internalType": "uint32" - }, - { - "name": "feeMileage", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - }, - { - "name": "commitEntropy", - "type": "uint160", - "indexed": false, - "internalType": "uint160" - } - ], - "anonymous": false - } -] diff --git a/bex/MicroPaths.json b/bex/MicroPaths.json deleted file mode 100644 index 819b40c..0000000 --- a/bex/MicroPaths.json +++ /dev/null @@ -1,534 +0,0 @@ -[ - { - "type": "function", - "name": "acceptCrocProxyRole", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - }, - { - "name": "slot", - "type": "uint16", - "internalType": "uint16" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "pure" - }, - { - "type": "function", - "name": "burnAmbient", - "inputs": [ - { - "name": "price", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "seed", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "conc", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "seedGrowth", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "concGrowth", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "liq", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "poolHash", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "baseFlow", - "type": "int128", - "internalType": "int128" - }, - { - "name": "quoteFlow", - "type": "int128", - "internalType": "int128" - }, - { - "name": "seedOut", - "type": "uint128", - "internalType": "uint128" - } - ], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "burnRange", - "inputs": [ - { - "name": "price", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "priceTick", - "type": "int24", - "internalType": "int24" - }, - { - "name": "seed", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "conc", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "seedGrowth", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "concGrowth", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "lowTick", - "type": "int24", - "internalType": "int24" - }, - { - "name": "highTick", - "type": "int24", - "internalType": "int24" - }, - { - "name": "liq", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "poolHash", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "baseFlow", - "type": "int128", - "internalType": "int128" - }, - { - "name": "quoteFlow", - "type": "int128", - "internalType": "int128" - }, - { - "name": "seedOut", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "concOut", - "type": "uint128", - "internalType": "uint128" - } - ], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "mintAmbient", - "inputs": [ - { - "name": "price", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "seed", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "conc", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "seedGrowth", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "concGrowth", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "liq", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "poolHash", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "baseFlow", - "type": "int128", - "internalType": "int128" - }, - { - "name": "quoteFlow", - "type": "int128", - "internalType": "int128" - }, - { - "name": "seedOut", - "type": "uint128", - "internalType": "uint128" - } - ], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "mintRange", - "inputs": [ - { - "name": "price", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "priceTick", - "type": "int24", - "internalType": "int24" - }, - { - "name": "seed", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "conc", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "seedGrowth", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "concGrowth", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "lowTick", - "type": "int24", - "internalType": "int24" - }, - { - "name": "highTick", - "type": "int24", - "internalType": "int24" - }, - { - "name": "liq", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "poolHash", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "outputs": [ - { - "name": "baseFlow", - "type": "int128", - "internalType": "int128" - }, - { - "name": "quoteFlow", - "type": "int128", - "internalType": "int128" - }, - { - "name": "seedOut", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "concOut", - "type": "uint128", - "internalType": "uint128" - } - ], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "sweepSwap", - "inputs": [ - { - "name": "curve", - "type": "tuple", - "internalType": "struct CurveMath.CurveState", - "components": [ - { - "name": "priceRoot_", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "ambientSeeds_", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "concLiq_", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "seedDeflator_", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "concGrowth_", - "type": "uint64", - "internalType": "uint64" - } - ] - }, - { - "name": "midTick", - "type": "int24", - "internalType": "int24" - }, - { - "name": "swap", - "type": "tuple", - "internalType": "struct Directives.SwapDirective", - "components": [ - { - "name": "isBuy_", - "type": "bool", - "internalType": "bool" - }, - { - "name": "inBaseQty_", - "type": "bool", - "internalType": "bool" - }, - { - "name": "rollType_", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "qty_", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "limitPrice_", - "type": "uint128", - "internalType": "uint128" - } - ] - }, - { - "name": "pool", - "type": "tuple", - "internalType": "struct PoolSpecs.PoolCursor", - "components": [ - { - "name": "head_", - "type": "tuple", - "internalType": "struct PoolSpecs.Pool", - "components": [ - { - "name": "schema_", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "feeRate_", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "protocolTake_", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "tickSize_", - "type": "uint16", - "internalType": "uint16" - }, - { - "name": "jitThresh_", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "knockoutBits_", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "oracleFlags_", - "type": "uint8", - "internalType": "uint8" - } - ] - }, - { - "name": "hash_", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "oracle_", - "type": "address", - "internalType": "address" - } - ] - } - ], - "outputs": [ - { - "name": "accum", - "type": "tuple", - "internalType": "struct Chaining.PairFlow", - "components": [ - { - "name": "baseFlow_", - "type": "int128", - "internalType": "int128" - }, - { - "name": "quoteFlow_", - "type": "int128", - "internalType": "int128" - }, - { - "name": "baseProto_", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "quoteProto_", - "type": "uint128", - "internalType": "uint128" - } - ] - }, - { - "name": "priceOut", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "seedOut", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "concOut", - "type": "uint128", - "internalType": "uint128" - }, - { - "name": "ambientOut", - "type": "uint64", - "internalType": "uint64" - }, - { - "name": "concGrowthOut", - "type": "uint64", - "internalType": "uint64" - } - ], - "stateMutability": "payable" - }, - { - "type": "event", - "name": "CrocKnockoutCross", - "inputs": [ - { - "name": "pool", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "tick", - "type": "int24", - "indexed": true, - "internalType": "int24" - }, - { - "name": "isBid", - "type": "bool", - "indexed": false, - "internalType": "bool" - }, - { - "name": "pivotTime", - "type": "uint32", - "indexed": false, - "internalType": "uint32" - }, - { - "name": "feeMileage", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - }, - { - "name": "commitEntropy", - "type": "uint160", - "indexed": false, - "internalType": "uint160" - } - ], - "anonymous": false - } -] diff --git a/bex/MultiPaths.json b/bex/MultiPaths.json deleted file mode 100644 index 6327333..0000000 --- a/bex/MultiPaths.json +++ /dev/null @@ -1,39 +0,0 @@ -[ - { - "type": "function", - "name": "acceptCrocProxyRole", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - }, - { - "name": "slot", - "type": "uint16", - "internalType": "uint16" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "pure" - }, - { - "type": "function", - "name": "userCmd", - "inputs": [ - { - "name": "cmd", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "payable" - } -] diff --git a/bex/WarmPath.json b/bex/WarmPath.json deleted file mode 100644 index 8a2890e..0000000 --- a/bex/WarmPath.json +++ /dev/null @@ -1,117 +0,0 @@ -[ - { - "type": "constructor", - "inputs": [ - { - "name": "initialWbera", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "acceptCrocProxyRole", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - }, - { - "name": "slot", - "type": "uint16", - "internalType": "uint16" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "pure" - }, - { - "type": "function", - "name": "userCmd", - "inputs": [ - { - "name": "input", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [ - { - "name": "baseFlow", - "type": "int128", - "internalType": "int128" - }, - { - "name": "quoteFlow", - "type": "int128", - "internalType": "int128" - } - ], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "wbera", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "event", - "name": "CrocKnockoutCross", - "inputs": [ - { - "name": "pool", - "type": "bytes32", - "indexed": true, - "internalType": "bytes32" - }, - { - "name": "tick", - "type": "int24", - "indexed": true, - "internalType": "int24" - }, - { - "name": "isBid", - "type": "bool", - "indexed": false, - "internalType": "bool" - }, - { - "name": "pivotTime", - "type": "uint32", - "indexed": false, - "internalType": "uint32" - }, - { - "name": "feeMileage", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - }, - { - "name": "commitEntropy", - "type": "uint160", - "indexed": false, - "internalType": "uint160" - } - ], - "anonymous": false - } -] diff --git a/core/BGT.json b/core/BGT.json index 7c6b84a..77bae56 100644 --- a/core/BGT.json +++ b/core/BGT.json @@ -1,28 +1,26 @@ [ - { - "type": "function", - "name": "CLOCK_MODE", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, { "type": "function", "name": "activateBoost", "inputs": [ { - "name": "validator", + "name": "user", "type": "address", "internalType": "address" + }, + { + "name": "pubkey", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" } ], - "outputs": [], "stateMutability": "nonpayable" }, { @@ -59,7 +57,7 @@ "internalType": "address" }, { - "name": "amount", + "name": "value", "type": "uint256", "internalType": "uint256" } @@ -92,19 +90,6 @@ ], "stateMutability": "view" }, - { - "type": "function", - "name": "beraChef", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IBeraChef" - } - ], - "stateMutability": "view" - }, { "type": "function", "name": "boosted", @@ -115,9 +100,9 @@ "internalType": "address" }, { - "name": "validator", - "type": "address", - "internalType": "address" + "name": "pubkey", + "type": "bytes", + "internalType": "bytes" } ], "outputs": [ @@ -139,9 +124,9 @@ "internalType": "address" }, { - "name": "validator", - "type": "address", - "internalType": "address" + "name": "pubkey", + "type": "bytes", + "internalType": "bytes" } ], "outputs": [ @@ -158,38 +143,14 @@ ], "stateMutability": "view" }, - { - "type": "function", - "name": "boostedRewardRate", - "inputs": [ - { - "name": "validator", - "type": "address", - "internalType": "address" - }, - { - "name": "rewardRate", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, { "type": "function", "name": "boostees", "inputs": [ { - "name": "validator", - "type": "address", - "internalType": "address" + "name": "pubkey", + "type": "bytes", + "internalType": "bytes" } ], "outputs": [ @@ -225,9 +186,9 @@ "name": "cancelBoost", "inputs": [ { - "name": "validator", - "type": "address", - "internalType": "address" + "name": "pubkey", + "type": "bytes", + "internalType": "bytes" }, { "name": "amount", @@ -240,100 +201,21 @@ }, { "type": "function", - "name": "checkpoints", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - }, - { - "name": "pos", - "type": "uint32", - "internalType": "uint32" - } - ], - "outputs": [ - { - "name": "", - "type": "tuple", - "internalType": "struct Checkpoints.Checkpoint208", - "components": [ - { - "name": "_key", - "type": "uint48", - "internalType": "uint48" - }, - { - "name": "_value", - "type": "uint208", - "internalType": "uint208" - } - ] - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "clock", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint48", - "internalType": "uint48" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "commissionRewardRate", + "name": "cancelDropBoost", "inputs": [ { - "name": "validator", - "type": "address", - "internalType": "address" + "name": "pubkey", + "type": "bytes", + "internalType": "bytes" }, { - "name": "rewardRate", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "commissions", - "inputs": [ - { - "name": "validator", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "blockNumberLast", - "type": "uint32", - "internalType": "uint32" - }, - { - "name": "rate", - "type": "uint224", - "internalType": "uint224" + "name": "amount", + "type": "uint128", + "internalType": "uint128" } ], - "stateMutability": "view" + "outputs": [], + "stateMutability": "nonpayable" }, { "type": "function", @@ -423,61 +305,24 @@ "name": "dropBoost", "inputs": [ { - "name": "validator", + "name": "user", "type": "address", "internalType": "address" }, { - "name": "amount", - "type": "uint128", - "internalType": "uint128" + "name": "pubkey", + "type": "bytes", + "internalType": "bytes" } ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "eip712Domain", - "inputs": [], "outputs": [ { - "name": "fields", - "type": "bytes1", - "internalType": "bytes1" - }, - { - "name": "name", - "type": "string", - "internalType": "string" - }, - { - "name": "version", - "type": "string", - "internalType": "string" - }, - { - "name": "chainId", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "verifyingContract", - "type": "address", - "internalType": "address" - }, - { - "name": "salt", - "type": "bytes32", - "internalType": "bytes32" - }, - { - "name": "extensions", - "type": "uint256[]", - "internalType": "uint256[]" + "name": "", + "type": "bool", + "internalType": "bool" } ], - "stateMutability": "view" + "stateMutability": "nonpayable" }, { "type": "function", @@ -541,38 +386,6 @@ ], "stateMutability": "view" }, - { - "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "isWhitelistedSender", - "inputs": [ - { - "name": "sender", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, { "type": "function", "name": "mint", @@ -615,16 +428,16 @@ "internalType": "string" } ], - "stateMutability": "pure" + "stateMutability": "view" }, { "type": "function", - "name": "nonces", + "name": "normalizedBoost", "inputs": [ { - "name": "owner", - "type": "address", - "internalType": "address" + "name": "pubkey", + "type": "bytes", + "internalType": "bytes" } ], "outputs": [ @@ -638,44 +451,30 @@ }, { "type": "function", - "name": "numCheckpoints", + "name": "queueBoost", "inputs": [ { - "name": "account", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint32", - "internalType": "uint32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "owner", - "inputs": [], - "outputs": [ + "name": "pubkey", + "type": "bytes", + "internalType": "bytes" + }, { - "name": "", - "type": "address", - "internalType": "address" + "name": "amount", + "type": "uint128", + "internalType": "uint128" } ], - "stateMutability": "view" + "outputs": [], + "stateMutability": "nonpayable" }, { "type": "function", - "name": "queueBoost", + "name": "queueDropBoost", "inputs": [ { - "name": "validator", - "type": "address", - "internalType": "address" + "name": "pubkey", + "type": "bytes", + "internalType": "bytes" }, { "name": "amount", @@ -725,19 +524,12 @@ }, { "type": "function", - "name": "renounceOwnership", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setBeraChef", + "name": "setActivateBoostDelay", "inputs": [ { - "name": "_beraChef", - "type": "address", - "internalType": "address" + "name": "_activateBoostDelay", + "type": "uint32", + "internalType": "uint32" } ], "outputs": [], @@ -745,17 +537,12 @@ }, { "type": "function", - "name": "setCommission", + "name": "setDropBoostDelay", "inputs": [ { - "name": "validator", - "type": "address", - "internalType": "address" - }, - { - "name": "rate", - "type": "uint256", - "internalType": "uint256" + "name": "_dropBoostDelay", + "type": "uint32", + "internalType": "uint32" } ], "outputs": [], @@ -787,19 +574,6 @@ "outputs": [], "stateMutability": "nonpayable" }, - { - "type": "function", - "name": "staker", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract BGTStaker" - } - ], - "stateMutability": "view" - }, { "type": "function", "name": "symbol", @@ -811,7 +585,7 @@ "internalType": "string" } ], - "stateMutability": "pure" + "stateMutability": "view" }, { "type": "function", @@ -849,7 +623,7 @@ "internalType": "address" }, { - "name": "amount", + "name": "value", "type": "uint256", "internalType": "uint256" } @@ -878,7 +652,7 @@ "internalType": "address" }, { - "name": "amount", + "name": "value", "type": "uint256", "internalType": "uint256" } @@ -892,19 +666,6 @@ ], "stateMutability": "nonpayable" }, - { - "type": "function", - "name": "transferOwnership", - "inputs": [ - { - "name": "newOwner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, { "type": "function", "name": "unboostedBalanceOf", @@ -953,16 +714,35 @@ "internalType": "address" }, { - "name": "validator", + "name": "user", "type": "address", "indexed": true, "internalType": "address" }, { - "name": "amount", - "type": "uint128", + "name": "pubkey", + "type": "bytes", + "indexed": true, + "internalType": "bytes" + }, + { + "name": "amount", + "type": "uint128", + "indexed": false, + "internalType": "uint128" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ActivateBoostDelayChanged", + "inputs": [ + { + "name": "newDelay", + "type": "uint32", "indexed": false, - "internalType": "uint128" + "internalType": "uint32" } ], "anonymous": false @@ -994,38 +774,44 @@ }, { "type": "event", - "name": "BeraChefChanged", + "name": "CancelBoost", "inputs": [ { - "name": "previous", + "name": "sender", "type": "address", "indexed": true, "internalType": "address" }, { - "name": "current", - "type": "address", + "name": "pubkey", + "type": "bytes", "indexed": true, - "internalType": "address" + "internalType": "bytes" + }, + { + "name": "amount", + "type": "uint128", + "indexed": false, + "internalType": "uint128" } ], "anonymous": false }, { "type": "event", - "name": "CancelBoost", + "name": "CancelDropBoost", "inputs": [ { - "name": "sender", + "name": "user", "type": "address", "indexed": true, "internalType": "address" }, { - "name": "validator", - "type": "address", + "name": "pubkey", + "type": "bytes", "indexed": true, - "internalType": "address" + "internalType": "bytes" }, { "name": "amount", @@ -1097,10 +883,10 @@ "internalType": "address" }, { - "name": "validator", - "type": "address", + "name": "pubkey", + "type": "bytes", "indexed": true, - "internalType": "address" + "internalType": "bytes" }, { "name": "amount", @@ -1113,19 +899,13 @@ }, { "type": "event", - "name": "EIP712DomainChanged", - "inputs": [], - "anonymous": false - }, - { - "type": "event", - "name": "Initialized", + "name": "DropBoostDelayChanged", "inputs": [ { - "name": "version", - "type": "uint64", + "name": "newDelay", + "type": "uint32", "indexed": false, - "internalType": "uint64" + "internalType": "uint32" } ], "anonymous": false @@ -1151,38 +931,44 @@ }, { "type": "event", - "name": "OwnershipTransferred", + "name": "QueueBoost", "inputs": [ { - "name": "previousOwner", + "name": "sender", "type": "address", "indexed": true, "internalType": "address" }, { - "name": "newOwner", - "type": "address", + "name": "pubkey", + "type": "bytes", "indexed": true, - "internalType": "address" + "internalType": "bytes" + }, + { + "name": "amount", + "type": "uint128", + "indexed": false, + "internalType": "uint128" } ], "anonymous": false }, { "type": "event", - "name": "QueueBoost", + "name": "QueueDropBoost", "inputs": [ { - "name": "sender", + "name": "user", "type": "address", "indexed": true, "internalType": "address" }, { - "name": "validator", - "type": "address", + "name": "pubkey", + "type": "bytes", "indexed": true, - "internalType": "address" + "internalType": "bytes" }, { "name": "amount", @@ -1239,47 +1025,41 @@ }, { "type": "event", - "name": "Transfer", + "name": "StakerChanged", "inputs": [ { - "name": "from", + "name": "previous", "type": "address", "indexed": true, "internalType": "address" }, { - "name": "to", + "name": "current", "type": "address", "indexed": true, "internalType": "address" - }, - { - "name": "value", - "type": "uint256", - "indexed": false, - "internalType": "uint256" } ], "anonymous": false }, { "type": "event", - "name": "UpdateCommission", + "name": "Transfer", "inputs": [ { - "name": "validator", + "name": "from", "type": "address", "indexed": true, "internalType": "address" }, { - "name": "oldRate", - "type": "uint256", - "indexed": false, - "internalType": "uint256" + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" }, { - "name": "newRate", + "name": "value", "type": "uint256", "indexed": false, "internalType": "uint256" @@ -1299,248 +1079,147 @@ }, { "type": "error", - "name": "BlockDoesNotExist", + "name": "CannotRecoverIncentiveToken", "inputs": [] }, { "type": "error", - "name": "BlockNotInBuffer", + "name": "CannotRecoverRewardToken", "inputs": [] }, { "type": "error", - "name": "CannotRecoverRewardToken", + "name": "CannotRecoverStakingToken", "inputs": [] }, { "type": "error", - "name": "CannotRecoverStakingToken", + "name": "DepositNotMultipleOfGwei", "inputs": [] }, { "type": "error", - "name": "CheckpointUnorderedInsertion", + "name": "DepositValueTooHigh", "inputs": [] }, { "type": "error", - "name": "DelegateStakedOverflow", + "name": "DonateAmountLessThanPayoutAmount", "inputs": [] }, { "type": "error", - "name": "ECDSAInvalidSignature", + "name": "IncentiveRateTooHigh", "inputs": [] }, { "type": "error", - "name": "ECDSAInvalidSignatureLength", - "inputs": [ - { - "name": "length", - "type": "uint256", - "internalType": "uint256" - } - ] + "name": "IndexOutOfRange", + "inputs": [] }, { "type": "error", - "name": "ECDSAInvalidSignatureS", - "inputs": [ - { - "name": "s", - "type": "bytes32", - "internalType": "bytes32" - } - ] + "name": "InsolventReward", + "inputs": [] }, { "type": "error", - "name": "ERC20ExceededSafeSupply", - "inputs": [ - { - "name": "increasedSupply", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "cap", - "type": "uint256", - "internalType": "uint256" - } - ] + "name": "InsufficientDelegateStake", + "inputs": [] }, { "type": "error", - "name": "ERC20InsufficientAllowance", - "inputs": [ - { - "name": "spender", - "type": "address", - "internalType": "address" - }, - { - "name": "allowance", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "needed", - "type": "uint256", - "internalType": "uint256" - } - ] + "name": "InsufficientDeposit", + "inputs": [] }, { "type": "error", - "name": "ERC20InsufficientBalance", - "inputs": [ - { - "name": "sender", - "type": "address", - "internalType": "address" - }, - { - "name": "balance", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "needed", - "type": "uint256", - "internalType": "uint256" - } - ] + "name": "InsufficientSelfStake", + "inputs": [] }, { "type": "error", - "name": "ERC20InvalidApprover", - "inputs": [ - { - "name": "approver", - "type": "address", - "internalType": "address" - } - ] + "name": "InsufficientStake", + "inputs": [] }, { "type": "error", - "name": "ERC20InvalidReceiver", - "inputs": [ - { - "name": "receiver", - "type": "address", - "internalType": "address" - } - ] + "name": "InvalidActivateBoostDelay", + "inputs": [] }, { "type": "error", - "name": "ERC20InvalidSender", - "inputs": [ - { - "name": "sender", - "type": "address", - "internalType": "address" - } - ] + "name": "InvalidBaseRate", + "inputs": [] }, { "type": "error", - "name": "ERC20InvalidSpender", - "inputs": [ - { - "name": "spender", - "type": "address", - "internalType": "address" - } - ] + "name": "InvalidBoostMultiplier", + "inputs": [] }, { "type": "error", - "name": "ERC5805FutureLookup", - "inputs": [ - { - "name": "timepoint", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "clock", - "type": "uint48", - "internalType": "uint48" - } - ] + "name": "InvalidCredentialsLength", + "inputs": [] }, { "type": "error", - "name": "ERC6372InconsistentClock", + "name": "InvalidDropBoostDelay", "inputs": [] }, { "type": "error", - "name": "InsolventReward", + "name": "InvalidMaxIncentiveTokensCount", "inputs": [] }, { "type": "error", - "name": "InsufficientDelegateStake", + "name": "InvalidMinBoostedRewardRate", "inputs": [] }, { "type": "error", - "name": "InsufficientSelfStake", + "name": "InvalidProof", "inputs": [] }, { "type": "error", - "name": "InsufficientStake", + "name": "InvalidPubKeyLength", "inputs": [] }, { "type": "error", - "name": "InvalidAccountNonce", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - }, - { - "name": "currentNonce", - "type": "uint256", - "internalType": "uint256" - } - ] + "name": "InvalidRewardAllocationWeights", + "inputs": [] }, { "type": "error", - "name": "InvalidCommission", + "name": "InvalidRewardConvexity", "inputs": [] }, { "type": "error", - "name": "InvalidCuttingBoardWeights", + "name": "InvalidRewardRate", "inputs": [] }, { "type": "error", - "name": "InvalidInitialization", + "name": "InvalidRewardVaultAddress", "inputs": [] }, { "type": "error", - "name": "InvalidMaxIncentiveTokensCount", + "name": "InvalidSignatureLength", "inputs": [] }, { "type": "error", - "name": "InvalidMinter", + "name": "InvalidStartBlock", "inputs": [] }, { "type": "error", - "name": "InvalidStartBlock", + "name": "InvalidateDefaultRewardAllocation", "inputs": [] }, { @@ -1550,17 +1229,17 @@ }, { "type": "error", - "name": "MaxNumWeightsPerCuttingBoardIsZero", + "name": "MaxNumWeightsPerRewardAllocationIsZero", "inputs": [] }, { "type": "error", - "name": "NoWhitelistedTokens", + "name": "MinIncentiveRateIsZero", "inputs": [] }, { "type": "error", - "name": "NotActionableBlock", + "name": "NotAContract", "inputs": [] }, { @@ -1595,89 +1274,72 @@ }, { "type": "error", - "name": "NotEnoughTime", + "name": "NotEnoughBoostedBalance", "inputs": [] }, { "type": "error", - "name": "NotFeeCollector", + "name": "NotEnoughTime", "inputs": [] }, { "type": "error", - "name": "NotFriendOfTheChef", + "name": "NotFactoryVault", "inputs": [] }, { "type": "error", - "name": "NotGovernance", + "name": "NotFeeCollector", "inputs": [] }, { "type": "error", - "name": "NotInitializing", + "name": "NotGovernance", "inputs": [] }, { "type": "error", - "name": "NotOperator", + "name": "NotIncentiveManager", "inputs": [] }, { "type": "error", - "name": "NotProver", + "name": "NotNewOperator", "inputs": [] }, { "type": "error", - "name": "NotRootFollower", + "name": "NotOperator", "inputs": [] }, { "type": "error", - "name": "NotValidatorOrOperator", + "name": "NotRootFollower", "inputs": [] }, { "type": "error", - "name": "OwnableInvalidOwner", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "OwnableUnauthorizedAccount", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - } - ] + "name": "NotWhitelistedVault", + "inputs": [] }, { "type": "error", - "name": "PayoutAmountIsZero", + "name": "OperatorAlreadySet", "inputs": [] }, { "type": "error", - "name": "PayoutTokenIsZero", + "name": "PayoutAmountIsZero", "inputs": [] }, { "type": "error", - "name": "QueuedCuttingBoardNotFound", + "name": "RewardAllocationAlreadyQueued", "inputs": [] }, { "type": "error", - "name": "QueuedCuttingBoardNotReady", + "name": "RewardAllocationBlockDelayTooLarge", "inputs": [] }, { @@ -1687,28 +1349,17 @@ }, { "type": "error", - "name": "RewardCycleStarted", + "name": "RewardsDurationIsZero", "inputs": [] }, { "type": "error", - "name": "SafeCastOverflowedUintDowncast", - "inputs": [ - { - "name": "bits", - "type": "uint8", - "internalType": "uint8" - }, - { - "name": "value", - "type": "uint256", - "internalType": "uint256" - } - ] + "name": "StakeAmountIsZero", + "inputs": [] }, { "type": "error", - "name": "StakeAmountIsZero", + "name": "TimestampAlreadyProcessed", "inputs": [] }, { @@ -1731,17 +1382,6 @@ "name": "TotalSupplyOverflow", "inputs": [] }, - { - "type": "error", - "name": "Unauthorized", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ] - }, { "type": "error", "name": "VaultAlreadyExists", @@ -1767,5 +1407,15 @@ "type": "error", "name": "ZeroAddress", "inputs": [] + }, + { + "type": "error", + "name": "ZeroOperatorOnFirstDeposit", + "inputs": [] + }, + { + "type": "error", + "name": "ZeroPercentageWeight", + "inputs": [] } ] diff --git a/core/BeaconDeposit.json b/core/BeaconDeposit.json new file mode 100644 index 0000000..0bcb7b3 --- /dev/null +++ b/core/BeaconDeposit.json @@ -0,0 +1,268 @@ +[ + { + "type": "function", + "name": "acceptOperatorChange", + "inputs": [{ "name": "pubkey", "type": "bytes", "internalType": "bytes" }], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "cancelOperatorChange", + "inputs": [{ "name": "pubkey", "type": "bytes", "internalType": "bytes" }], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "deposit", + "inputs": [ + { "name": "pubkey", "type": "bytes", "internalType": "bytes" }, + { "name": "credentials", "type": "bytes", "internalType": "bytes" }, + { "name": "signature", "type": "bytes", "internalType": "bytes" }, + { "name": "operator", "type": "address", "internalType": "address" } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "depositCount", + "inputs": [], + "outputs": [{ "name": "", "type": "uint64", "internalType": "uint64" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "genesisDepositsRoot", + "inputs": [], + "outputs": [{ "name": "", "type": "bytes32", "internalType": "bytes32" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getOperator", + "inputs": [{ "name": "pubkey", "type": "bytes", "internalType": "bytes" }], + "outputs": [{ "name": "", "type": "address", "internalType": "address" }], + "stateMutability": "view" + }, + { + "type": "function", + "name": "queuedOperator", + "inputs": [{ "name": "", "type": "bytes", "internalType": "bytes" }], + "outputs": [ + { "name": "queuedTimestamp", "type": "uint96", "internalType": "uint96" }, + { "name": "newOperator", "type": "address", "internalType": "address" } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "requestOperatorChange", + "inputs": [ + { "name": "pubkey", "type": "bytes", "internalType": "bytes" }, + { "name": "newOperator", "type": "address", "internalType": "address" } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "supportsInterface", + "inputs": [ + { "name": "interfaceId", "type": "bytes4", "internalType": "bytes4" } + ], + "outputs": [{ "name": "", "type": "bool", "internalType": "bool" }], + "stateMutability": "pure" + }, + { + "type": "event", + "name": "Deposit", + "inputs": [ + { + "name": "pubkey", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + }, + { + "name": "credentials", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + }, + { + "name": "amount", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + }, + { + "name": "signature", + "type": "bytes", + "indexed": false, + "internalType": "bytes" + }, + { + "name": "index", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OperatorChangeCancelled", + "inputs": [ + { + "name": "pubkey", + "type": "bytes", + "indexed": true, + "internalType": "bytes" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OperatorChangeQueued", + "inputs": [ + { + "name": "pubkey", + "type": "bytes", + "indexed": true, + "internalType": "bytes" + }, + { + "name": "queuedOperator", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "currentOperator", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "queuedTimestamp", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OperatorUpdated", + "inputs": [ + { + "name": "pubkey", + "type": "bytes", + "indexed": true, + "internalType": "bytes" + }, + { + "name": "newOperator", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "previousOperator", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { "type": "error", "name": "AlreadyInitialized", "inputs": [] }, + { "type": "error", "name": "AmountLessThanMinIncentiveRate", "inputs": [] }, + { "type": "error", "name": "CannotRecoverIncentiveToken", "inputs": [] }, + { "type": "error", "name": "CannotRecoverRewardToken", "inputs": [] }, + { "type": "error", "name": "CannotRecoverStakingToken", "inputs": [] }, + { "type": "error", "name": "DepositNotMultipleOfGwei", "inputs": [] }, + { "type": "error", "name": "DepositValueTooHigh", "inputs": [] }, + { "type": "error", "name": "DonateAmountLessThanPayoutAmount", "inputs": [] }, + { "type": "error", "name": "IncentiveRateTooHigh", "inputs": [] }, + { "type": "error", "name": "IndexOutOfRange", "inputs": [] }, + { "type": "error", "name": "InsolventReward", "inputs": [] }, + { "type": "error", "name": "InsufficientDelegateStake", "inputs": [] }, + { "type": "error", "name": "InsufficientDeposit", "inputs": [] }, + { "type": "error", "name": "InsufficientSelfStake", "inputs": [] }, + { "type": "error", "name": "InsufficientStake", "inputs": [] }, + { "type": "error", "name": "InvalidActivateBoostDelay", "inputs": [] }, + { "type": "error", "name": "InvalidBaseRate", "inputs": [] }, + { "type": "error", "name": "InvalidBoostMultiplier", "inputs": [] }, + { "type": "error", "name": "InvalidCredentialsLength", "inputs": [] }, + { "type": "error", "name": "InvalidDropBoostDelay", "inputs": [] }, + { "type": "error", "name": "InvalidMaxIncentiveTokensCount", "inputs": [] }, + { "type": "error", "name": "InvalidMinBoostedRewardRate", "inputs": [] }, + { "type": "error", "name": "InvalidProof", "inputs": [] }, + { "type": "error", "name": "InvalidPubKeyLength", "inputs": [] }, + { "type": "error", "name": "InvalidRewardAllocationWeights", "inputs": [] }, + { "type": "error", "name": "InvalidRewardConvexity", "inputs": [] }, + { "type": "error", "name": "InvalidRewardRate", "inputs": [] }, + { "type": "error", "name": "InvalidRewardVaultAddress", "inputs": [] }, + { "type": "error", "name": "InvalidSignatureLength", "inputs": [] }, + { "type": "error", "name": "InvalidStartBlock", "inputs": [] }, + { + "type": "error", + "name": "InvalidateDefaultRewardAllocation", + "inputs": [] + }, + { "type": "error", "name": "InvariantCheckFailed", "inputs": [] }, + { + "type": "error", + "name": "MaxNumWeightsPerRewardAllocationIsZero", + "inputs": [] + }, + { "type": "error", "name": "MinIncentiveRateIsZero", "inputs": [] }, + { "type": "error", "name": "NotAContract", "inputs": [] }, + { "type": "error", "name": "NotApprovedSender", "inputs": [] }, + { "type": "error", "name": "NotBGT", "inputs": [] }, + { "type": "error", "name": "NotBlockRewardController", "inputs": [] }, + { "type": "error", "name": "NotDelegate", "inputs": [] }, + { "type": "error", "name": "NotDistributor", "inputs": [] }, + { "type": "error", "name": "NotEnoughBalance", "inputs": [] }, + { "type": "error", "name": "NotEnoughBoostedBalance", "inputs": [] }, + { "type": "error", "name": "NotEnoughTime", "inputs": [] }, + { "type": "error", "name": "NotFactoryVault", "inputs": [] }, + { "type": "error", "name": "NotFeeCollector", "inputs": [] }, + { "type": "error", "name": "NotGovernance", "inputs": [] }, + { "type": "error", "name": "NotIncentiveManager", "inputs": [] }, + { "type": "error", "name": "NotNewOperator", "inputs": [] }, + { "type": "error", "name": "NotOperator", "inputs": [] }, + { "type": "error", "name": "NotRootFollower", "inputs": [] }, + { "type": "error", "name": "NotWhitelistedVault", "inputs": [] }, + { "type": "error", "name": "OperatorAlreadySet", "inputs": [] }, + { "type": "error", "name": "PayoutAmountIsZero", "inputs": [] }, + { "type": "error", "name": "RewardAllocationAlreadyQueued", "inputs": [] }, + { + "type": "error", + "name": "RewardAllocationBlockDelayTooLarge", + "inputs": [] + }, + { "type": "error", "name": "RewardCycleNotEnded", "inputs": [] }, + { "type": "error", "name": "RewardsDurationIsZero", "inputs": [] }, + { "type": "error", "name": "StakeAmountIsZero", "inputs": [] }, + { "type": "error", "name": "TimestampAlreadyProcessed", "inputs": [] }, + { + "type": "error", + "name": "TokenAlreadyWhitelistedOrLimitReached", + "inputs": [] + }, + { "type": "error", "name": "TokenNotWhitelisted", "inputs": [] }, + { "type": "error", "name": "TooManyWeights", "inputs": [] }, + { "type": "error", "name": "TotalSupplyOverflow", "inputs": [] }, + { "type": "error", "name": "VaultAlreadyExists", "inputs": [] }, + { "type": "error", "name": "WithdrawAmountIsZero", "inputs": [] }, + { "type": "error", "name": "ZeroAddress", "inputs": [] }, + { "type": "error", "name": "ZeroOperatorOnFirstDeposit", "inputs": [] }, + { "type": "error", "name": "ZeroPercentageWeight", "inputs": [] } +] diff --git a/core/BeraChef.json b/core/BeraChef.json index bf33d46..6e0ba88 100644 --- a/core/BeraChef.json +++ b/core/BeraChef.json @@ -1,35 +1,12 @@ [ - { - "type": "constructor", - "inputs": [], - "stateMutability": "nonpayable" - }, { "type": "function", - "name": "UPGRADE_INTERFACE_VERSION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "activateQueuedCuttingBoard", + "name": "activateReadyQueuedRewardAllocation", "inputs": [ { - "name": "valCoinbase", - "type": "address", - "internalType": "address" - }, - { - "name": "blockNumber", - "type": "uint256", - "internalType": "uint256" + "name": "valPubkey", + "type": "bytes", + "internalType": "bytes" } ], "outputs": [], @@ -37,58 +14,19 @@ }, { "type": "function", - "name": "cuttingBoardBlockDelay", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint64", - "internalType": "uint64" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "defaultCuttingBoard", - "inputs": [], - "outputs": [ - { - "name": "startBlock", - "type": "uint64", - "internalType": "uint64" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "distributor", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getActiveCuttingBoard", + "name": "getActiveRewardAllocation", "inputs": [ { - "name": "valCoinbase", - "type": "address", - "internalType": "address" + "name": "valPubkey", + "type": "bytes", + "internalType": "bytes" } ], "outputs": [ { "name": "", "type": "tuple", - "internalType": "struct IBeraChef.CuttingBoard", + "internalType": "struct IBeraChef.RewardAllocation", "components": [ { "name": "startBlock", @@ -119,13 +57,13 @@ }, { "type": "function", - "name": "getDefaultCuttingBoard", + "name": "getDefaultRewardAllocation", "inputs": [], "outputs": [ { "name": "", "type": "tuple", - "internalType": "struct IBeraChef.CuttingBoard", + "internalType": "struct IBeraChef.RewardAllocation", "components": [ { "name": "startBlock", @@ -156,38 +94,19 @@ }, { "type": "function", - "name": "getOperator", + "name": "getQueuedRewardAllocation", "inputs": [ { - "name": "valCoinbase", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getQueuedCuttingBoard", - "inputs": [ - { - "name": "valCoinbase", - "type": "address", - "internalType": "address" + "name": "valPubkey", + "type": "bytes", + "internalType": "bytes" } ], "outputs": [ { "name": "", "type": "tuple", - "internalType": "struct IBeraChef.CuttingBoard", + "internalType": "struct IBeraChef.RewardAllocation", "components": [ { "name": "startBlock", @@ -218,54 +137,55 @@ }, { "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "_distributor", - "type": "address", - "internalType": "address" - }, - { - "name": "_governance", - "type": "address", - "internalType": "address" - }, - { - "name": "_maxNumWeightsPerCuttingBoard", - "type": "uint8", - "internalType": "uint8" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "isFriendOfTheChef", + "name": "getSetActiveRewardAllocation", "inputs": [ { - "name": "receiver", - "type": "address", - "internalType": "address" + "name": "valPubkey", + "type": "bytes", + "internalType": "bytes" } ], "outputs": [ { "name": "", - "type": "bool", - "internalType": "bool" + "type": "tuple", + "internalType": "struct IBeraChef.RewardAllocation", + "components": [ + { + "name": "startBlock", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "weights", + "type": "tuple[]", + "internalType": "struct IBeraChef.Weight[]", + "components": [ + { + "name": "receiver", + "type": "address", + "internalType": "address" + }, + { + "name": "percentageNumerator", + "type": "uint96", + "internalType": "uint96" + } + ] + } + ] } ], "stateMutability": "view" }, { "type": "function", - "name": "isQueuedCuttingBoardReady", + "name": "isQueuedRewardAllocationReady", "inputs": [ { - "name": "valCoinbase", - "type": "address", - "internalType": "address" + "name": "valPubkey", + "type": "bytes", + "internalType": "bytes" }, { "name": "blockNumber", @@ -297,51 +217,12 @@ }, { "type": "function", - "name": "maxNumWeightsPerCuttingBoard", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "uint8", - "internalType": "uint8" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "owner", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "proxiableUUID", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "queueNewCuttingBoard", + "name": "queueNewRewardAllocation", "inputs": [ { - "name": "valCoinbase", - "type": "address", - "internalType": "address" + "name": "valPubkey", + "type": "bytes", + "internalType": "bytes" }, { "name": "startBlock", @@ -371,32 +252,12 @@ }, { "type": "function", - "name": "renounceOwnership", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setCuttingBoardBlockDelay", + "name": "setDefaultRewardAllocation", "inputs": [ { - "name": "_cuttingBoardBlockDelay", - "type": "uint64", - "internalType": "uint64" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setDefaultCuttingBoard", - "inputs": [ - { - "name": "cb", + "name": "rewardAllocation", "type": "tuple", - "internalType": "struct IBeraChef.CuttingBoard", + "internalType": "struct IBeraChef.RewardAllocation", "components": [ { "name": "startBlock", @@ -428,10 +289,10 @@ }, { "type": "function", - "name": "setMaxNumWeightsPerCuttingBoard", + "name": "setMaxNumWeightsPerRewardAllocation", "inputs": [ { - "name": "_maxNumWeightsPerCuttingBoard", + "name": "_maxNumWeightsPerRewardAllocation", "type": "uint8", "internalType": "uint8" } @@ -441,25 +302,12 @@ }, { "type": "function", - "name": "setOperator", - "inputs": [ - { - "name": "operatorAddress", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "transferOwnership", + "name": "setRewardAllocationBlockDelay", "inputs": [ { - "name": "newOwner", - "type": "address", - "internalType": "address" + "name": "_rewardAllocationBlockDelay", + "type": "uint64", + "internalType": "uint64" } ], "outputs": [], @@ -467,7 +315,7 @@ }, { "type": "function", - "name": "updateFriendsOfTheChef", + "name": "setVaultWhitelistedStatus", "inputs": [ { "name": "receiver", @@ -475,9 +323,14 @@ "internalType": "address" }, { - "name": "isFriend", + "name": "isWhitelisted", "type": "bool", "internalType": "bool" + }, + { + "name": "metadata", + "type": "string", + "internalType": "string" } ], "outputs": [], @@ -485,31 +338,31 @@ }, { "type": "function", - "name": "upgradeToAndCall", + "name": "updateWhitelistedVaultMetadata", "inputs": [ { - "name": "newImplementation", + "name": "receiver", "type": "address", "internalType": "address" }, { - "name": "data", - "type": "bytes", - "internalType": "bytes" + "name": "metadata", + "type": "string", + "internalType": "string" } ], "outputs": [], - "stateMutability": "payable" + "stateMutability": "nonpayable" }, { "type": "event", - "name": "ActivateCuttingBoard", + "name": "ActivateRewardAllocation", "inputs": [ { - "name": "valCoinbase", - "type": "address", + "name": "valPubkey", + "type": "bytes", "indexed": true, - "internalType": "address" + "internalType": "bytes" }, { "name": "startBlock", @@ -540,55 +393,10 @@ }, { "type": "event", - "name": "CuttingBoardBlockDelaySet", + "name": "MaxNumWeightsPerRewardAllocationSet", "inputs": [ { - "name": "cuttingBoardBlockDelay", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "FriendsOfTheChefUpdated", - "inputs": [ - { - "name": "receiver", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "isFriend", - "type": "bool", - "indexed": true, - "internalType": "bool" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "Initialized", - "inputs": [ - { - "name": "version", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "MaxNumWeightsPerCuttingBoardSet", - "inputs": [ - { - "name": "maxNumWeightsPerCuttingBoard", + "name": "maxNumWeightsPerRewardAllocation", "type": "uint8", "indexed": false, "internalType": "uint8" @@ -598,32 +406,13 @@ }, { "type": "event", - "name": "OwnershipTransferred", - "inputs": [ - { - "name": "previousOwner", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "newOwner", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "QueueCuttingBoard", + "name": "QueueRewardAllocation", "inputs": [ { - "name": "valCoinbase", - "type": "address", + "name": "valPubkey", + "type": "bytes", "indexed": true, - "internalType": "address" + "internalType": "bytes" }, { "name": "startBlock", @@ -654,13 +443,26 @@ }, { "type": "event", - "name": "SetDefaultCuttingBoard", + "name": "RewardAllocationBlockDelaySet", "inputs": [ { - "name": "cuttingBoard", + "name": "rewardAllocationBlockDelay", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "SetDefaultRewardAllocation", + "inputs": [ + { + "name": "rewardAllocation", "type": "tuple", "indexed": false, - "internalType": "struct IBeraChef.CuttingBoard", + "internalType": "struct IBeraChef.RewardAllocation", "components": [ { "name": "startBlock", @@ -691,47 +493,48 @@ }, { "type": "event", - "name": "SetOperator", + "name": "VaultWhitelistedStatusUpdated", "inputs": [ { - "name": "valCoinbase", + "name": "receiver", "type": "address", "indexed": true, "internalType": "address" }, { - "name": "operatorAddress", - "type": "address", + "name": "isWhitelisted", + "type": "bool", "indexed": true, - "internalType": "address" + "internalType": "bool" + }, + { + "name": "metadata", + "type": "string", + "indexed": false, + "internalType": "string" } ], "anonymous": false }, { "type": "event", - "name": "Upgraded", + "name": "WhitelistedVaultMetadataUpdated", "inputs": [ { - "name": "implementation", + "name": "receiver", "type": "address", "indexed": true, "internalType": "address" + }, + { + "name": "metadata", + "type": "string", + "indexed": false, + "internalType": "string" } ], "anonymous": false }, - { - "type": "error", - "name": "AddressEmptyCode", - "inputs": [ - { - "name": "target", - "type": "address", - "internalType": "address" - } - ] - }, { "type": "error", "name": "AlreadyInitialized", @@ -744,48 +547,42 @@ }, { "type": "error", - "name": "BlockDoesNotExist", + "name": "CannotRecoverIncentiveToken", "inputs": [] }, { "type": "error", - "name": "BlockNotInBuffer", + "name": "CannotRecoverRewardToken", "inputs": [] }, { "type": "error", - "name": "CannotRecoverRewardToken", + "name": "CannotRecoverStakingToken", "inputs": [] }, { "type": "error", - "name": "CannotRecoverStakingToken", + "name": "DepositNotMultipleOfGwei", "inputs": [] }, { "type": "error", - "name": "DonateAmountLessThanPayoutAmount", + "name": "DepositValueTooHigh", "inputs": [] }, { "type": "error", - "name": "ERC1967InvalidImplementation", - "inputs": [ - { - "name": "implementation", - "type": "address", - "internalType": "address" - } - ] + "name": "DonateAmountLessThanPayoutAmount", + "inputs": [] }, { "type": "error", - "name": "ERC1967NonPayable", + "name": "IncentiveRateTooHigh", "inputs": [] }, { "type": "error", - "name": "FailedInnerCall", + "name": "IndexOutOfRange", "inputs": [] }, { @@ -798,6 +595,11 @@ "name": "InsufficientDelegateStake", "inputs": [] }, + { + "type": "error", + "name": "InsufficientDeposit", + "inputs": [] + }, { "type": "error", "name": "InsufficientSelfStake", @@ -810,17 +612,27 @@ }, { "type": "error", - "name": "InvalidCommission", + "name": "InvalidActivateBoostDelay", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidBaseRate", "inputs": [] }, { "type": "error", - "name": "InvalidCuttingBoardWeights", + "name": "InvalidBoostMultiplier", "inputs": [] }, { "type": "error", - "name": "InvalidInitialization", + "name": "InvalidCredentialsLength", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidDropBoostDelay", "inputs": [] }, { @@ -830,7 +642,42 @@ }, { "type": "error", - "name": "InvalidMinter", + "name": "InvalidMinBoostedRewardRate", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidProof", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidPubKeyLength", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidRewardAllocationWeights", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidRewardConvexity", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidRewardRate", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidRewardVaultAddress", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidSignatureLength", "inputs": [] }, { @@ -838,6 +685,11 @@ "name": "InvalidStartBlock", "inputs": [] }, + { + "type": "error", + "name": "InvalidateDefaultRewardAllocation", + "inputs": [] + }, { "type": "error", "name": "InvariantCheckFailed", @@ -845,7 +697,7 @@ }, { "type": "error", - "name": "MaxNumWeightsPerCuttingBoardIsZero", + "name": "MaxNumWeightsPerRewardAllocationIsZero", "inputs": [] }, { @@ -855,7 +707,7 @@ }, { "type": "error", - "name": "NotActionableBlock", + "name": "NotAContract", "inputs": [] }, { @@ -890,89 +742,72 @@ }, { "type": "error", - "name": "NotEnoughTime", + "name": "NotEnoughBoostedBalance", "inputs": [] }, { "type": "error", - "name": "NotFeeCollector", + "name": "NotEnoughTime", "inputs": [] }, { "type": "error", - "name": "NotFriendOfTheChef", + "name": "NotFactoryVault", "inputs": [] }, { "type": "error", - "name": "NotGovernance", + "name": "NotFeeCollector", "inputs": [] }, { "type": "error", - "name": "NotInitializing", + "name": "NotGovernance", "inputs": [] }, { "type": "error", - "name": "NotOperator", + "name": "NotIncentiveManager", "inputs": [] }, { "type": "error", - "name": "NotProver", + "name": "NotNewOperator", "inputs": [] }, { "type": "error", - "name": "NotRootFollower", + "name": "NotOperator", "inputs": [] }, { "type": "error", - "name": "NotValidatorOrOperator", + "name": "NotRootFollower", "inputs": [] }, { "type": "error", - "name": "OwnableInvalidOwner", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "OwnableUnauthorizedAccount", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - } - ] + "name": "NotWhitelistedVault", + "inputs": [] }, { "type": "error", - "name": "PayoutAmountIsZero", + "name": "OperatorAlreadySet", "inputs": [] }, { "type": "error", - "name": "PayoutTokenIsZero", + "name": "PayoutAmountIsZero", "inputs": [] }, { "type": "error", - "name": "QueuedCuttingBoardNotFound", + "name": "RewardAllocationAlreadyQueued", "inputs": [] }, { "type": "error", - "name": "QueuedCuttingBoardNotReady", + "name": "RewardAllocationBlockDelayTooLarge", "inputs": [] }, { @@ -982,17 +817,17 @@ }, { "type": "error", - "name": "RewardCycleStarted", + "name": "RewardsDurationIsZero", "inputs": [] }, { "type": "error", - "name": "RewardsDurationIsZero", + "name": "StakeAmountIsZero", "inputs": [] }, { "type": "error", - "name": "StakeAmountIsZero", + "name": "TimestampAlreadyProcessed", "inputs": [] }, { @@ -1017,44 +852,27 @@ }, { "type": "error", - "name": "UUPSUnauthorizedCallContext", + "name": "VaultAlreadyExists", "inputs": [] }, { "type": "error", - "name": "UUPSUnsupportedProxiableUUID", - "inputs": [ - { - "name": "slot", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "Unauthorized", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ] + "name": "WithdrawAmountIsZero", + "inputs": [] }, { "type": "error", - "name": "VaultAlreadyExists", + "name": "ZeroAddress", "inputs": [] }, { "type": "error", - "name": "WithdrawAmountIsZero", + "name": "ZeroOperatorOnFirstDeposit", "inputs": [] }, { "type": "error", - "name": "ZeroAddress", + "name": "ZeroPercentageWeight", "inputs": [] } ] diff --git a/core/BlockRewardController.json b/core/BlockRewardController.json index 7573762..28cff02 100644 --- a/core/BlockRewardController.json +++ b/core/BlockRewardController.json @@ -1,22 +1,4 @@ [ - { - "type": "constructor", - "inputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "UPGRADE_INTERFACE_VERSION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, { "type": "function", "name": "baseRate", @@ -32,75 +14,42 @@ }, { "type": "function", - "name": "beraChef", + "name": "boostMultiplier", "inputs": [], "outputs": [ { "name": "", - "type": "address", - "internalType": "contract IBeraChef" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "bgt", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract BGT" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "distributor", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" + "type": "uint256", + "internalType": "uint256" } ], "stateMutability": "view" }, { "type": "function", - "name": "initialize", + "name": "computeReward", "inputs": [ { - "name": "_bgt", - "type": "address", - "internalType": "address" + "name": "boostPower", + "type": "uint256", + "internalType": "uint256" }, { - "name": "_distributor", - "type": "address", - "internalType": "address" + "name": "_rewardRate", + "type": "uint256", + "internalType": "uint256" }, { - "name": "_beraChef", - "type": "address", - "internalType": "address" + "name": "_boostMultiplier", + "type": "uint256", + "internalType": "uint256" }, { - "name": "_governance", - "type": "address", - "internalType": "address" + "name": "_rewardConvexity", + "type": "int256", + "internalType": "int256" } ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "minBoostedRewardRate", - "inputs": [], "outputs": [ { "name": "", @@ -108,17 +57,17 @@ "internalType": "uint256" } ], - "stateMutability": "view" + "stateMutability": "pure" }, { "type": "function", - "name": "owner", + "name": "minBoostedRewardRate", "inputs": [], "outputs": [ { "name": "", - "type": "address", - "internalType": "address" + "type": "uint256", + "internalType": "uint256" } ], "stateMutability": "view" @@ -128,14 +77,19 @@ "name": "processRewards", "inputs": [ { - "name": "coinbase", - "type": "address", - "internalType": "address" + "name": "pubkey", + "type": "bytes", + "internalType": "bytes" }, { - "name": "blockNumber", - "type": "uint256", - "internalType": "uint256" + "name": "nextTimestamp", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "isReady", + "type": "bool", + "internalType": "bool" } ], "outputs": [ @@ -149,24 +103,17 @@ }, { "type": "function", - "name": "proxiableUUID", + "name": "rewardConvexity", "inputs": [], "outputs": [ { "name": "", - "type": "bytes32", - "internalType": "bytes32" + "type": "int256", + "internalType": "int256" } ], "stateMutability": "view" }, - { - "type": "function", - "name": "renounceOwnership", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, { "type": "function", "name": "rewardRate", @@ -195,12 +142,12 @@ }, { "type": "function", - "name": "setDistributor", + "name": "setBoostMultiplier", "inputs": [ { - "name": "_distributor", - "type": "address", - "internalType": "address" + "name": "_boostMultiplier", + "type": "uint256", + "internalType": "uint256" } ], "outputs": [], @@ -208,12 +155,12 @@ }, { "type": "function", - "name": "setMinBoostedRewardRate", + "name": "setDistributor", "inputs": [ { - "name": "_minBoostedRewardRate", - "type": "uint256", - "internalType": "uint256" + "name": "_distributor", + "type": "address", + "internalType": "address" } ], "outputs": [], @@ -221,10 +168,10 @@ }, { "type": "function", - "name": "setRewardRate", + "name": "setMinBoostedRewardRate", "inputs": [ { - "name": "_rewardRate", + "name": "_minBoostedRewardRate", "type": "uint256", "internalType": "uint256" } @@ -234,12 +181,12 @@ }, { "type": "function", - "name": "transferOwnership", + "name": "setRewardConvexity", "inputs": [ { - "name": "newOwner", - "type": "address", - "internalType": "address" + "name": "_rewardConvexity", + "type": "uint256", + "internalType": "uint256" } ], "outputs": [], @@ -247,21 +194,16 @@ }, { "type": "function", - "name": "upgradeToAndCall", + "name": "setRewardRate", "inputs": [ { - "name": "newImplementation", - "type": "address", - "internalType": "address" - }, - { - "name": "data", - "type": "bytes", - "internalType": "bytes" + "name": "_rewardRate", + "type": "uint256", + "internalType": "uint256" } ], "outputs": [], - "stateMutability": "payable" + "stateMutability": "nonpayable" }, { "type": "event", @@ -287,19 +229,19 @@ "name": "BlockRewardProcessed", "inputs": [ { - "name": "blockNumber", - "type": "uint256", - "indexed": false, - "internalType": "uint256" + "name": "pubkey", + "type": "bytes", + "indexed": true, + "internalType": "bytes" }, { - "name": "baseRate", - "type": "uint256", + "name": "nextTimestamp", + "type": "uint64", "indexed": false, - "internalType": "uint256" + "internalType": "uint64" }, { - "name": "commissionRate", + "name": "baseRate", "type": "uint256", "indexed": false, "internalType": "uint256" @@ -315,13 +257,19 @@ }, { "type": "event", - "name": "Initialized", + "name": "BoostMultiplierChanged", "inputs": [ { - "name": "version", - "type": "uint64", + "name": "oldBoostMultiplier", + "type": "uint256", "indexed": false, - "internalType": "uint64" + "internalType": "uint256" + }, + { + "name": "newBoostMultiplier", + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], "anonymous": false @@ -347,19 +295,19 @@ }, { "type": "event", - "name": "OwnershipTransferred", + "name": "RewardConvexityChanged", "inputs": [ { - "name": "previousOwner", - "type": "address", - "indexed": true, - "internalType": "address" + "name": "oldRewardConvexity", + "type": "uint256", + "indexed": false, + "internalType": "uint256" }, { - "name": "newOwner", - "type": "address", - "indexed": true, - "internalType": "address" + "name": "newRewardConvexity", + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], "anonymous": false @@ -396,30 +344,6 @@ ], "anonymous": false }, - { - "type": "event", - "name": "Upgraded", - "inputs": [ - { - "name": "implementation", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false - }, - { - "type": "error", - "name": "AddressEmptyCode", - "inputs": [ - { - "name": "target", - "type": "address", - "internalType": "address" - } - ] - }, { "type": "error", "name": "AlreadyInitialized", @@ -432,48 +356,42 @@ }, { "type": "error", - "name": "BlockDoesNotExist", + "name": "CannotRecoverIncentiveToken", "inputs": [] }, { "type": "error", - "name": "BlockNotInBuffer", + "name": "CannotRecoverRewardToken", "inputs": [] }, { "type": "error", - "name": "CannotRecoverRewardToken", + "name": "CannotRecoverStakingToken", "inputs": [] }, { "type": "error", - "name": "CannotRecoverStakingToken", + "name": "DepositNotMultipleOfGwei", "inputs": [] }, { "type": "error", - "name": "DonateAmountLessThanPayoutAmount", + "name": "DepositValueTooHigh", "inputs": [] }, { "type": "error", - "name": "ERC1967InvalidImplementation", - "inputs": [ - { - "name": "implementation", - "type": "address", - "internalType": "address" - } - ] + "name": "DonateAmountLessThanPayoutAmount", + "inputs": [] }, { "type": "error", - "name": "ERC1967NonPayable", + "name": "IncentiveRateTooHigh", "inputs": [] }, { "type": "error", - "name": "FailedInnerCall", + "name": "IndexOutOfRange", "inputs": [] }, { @@ -486,6 +404,11 @@ "name": "InsufficientDelegateStake", "inputs": [] }, + { + "type": "error", + "name": "InsufficientDeposit", + "inputs": [] + }, { "type": "error", "name": "InsufficientSelfStake", @@ -498,17 +421,27 @@ }, { "type": "error", - "name": "InvalidCommission", + "name": "InvalidActivateBoostDelay", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidBaseRate", "inputs": [] }, { "type": "error", - "name": "InvalidCuttingBoardWeights", + "name": "InvalidBoostMultiplier", "inputs": [] }, { "type": "error", - "name": "InvalidInitialization", + "name": "InvalidCredentialsLength", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidDropBoostDelay", "inputs": [] }, { @@ -518,7 +451,42 @@ }, { "type": "error", - "name": "InvalidMinter", + "name": "InvalidMinBoostedRewardRate", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidProof", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidPubKeyLength", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidRewardAllocationWeights", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidRewardConvexity", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidRewardRate", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidRewardVaultAddress", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidSignatureLength", "inputs": [] }, { @@ -526,6 +494,11 @@ "name": "InvalidStartBlock", "inputs": [] }, + { + "type": "error", + "name": "InvalidateDefaultRewardAllocation", + "inputs": [] + }, { "type": "error", "name": "InvariantCheckFailed", @@ -533,7 +506,7 @@ }, { "type": "error", - "name": "MaxNumWeightsPerCuttingBoardIsZero", + "name": "MaxNumWeightsPerRewardAllocationIsZero", "inputs": [] }, { @@ -543,7 +516,7 @@ }, { "type": "error", - "name": "NotActionableBlock", + "name": "NotAContract", "inputs": [] }, { @@ -578,89 +551,72 @@ }, { "type": "error", - "name": "NotEnoughTime", + "name": "NotEnoughBoostedBalance", "inputs": [] }, { "type": "error", - "name": "NotFeeCollector", + "name": "NotEnoughTime", "inputs": [] }, { "type": "error", - "name": "NotFriendOfTheChef", + "name": "NotFactoryVault", "inputs": [] }, { "type": "error", - "name": "NotGovernance", + "name": "NotFeeCollector", "inputs": [] }, { "type": "error", - "name": "NotInitializing", + "name": "NotGovernance", "inputs": [] }, { "type": "error", - "name": "NotOperator", + "name": "NotIncentiveManager", "inputs": [] }, { "type": "error", - "name": "NotProver", + "name": "NotNewOperator", "inputs": [] }, { "type": "error", - "name": "NotRootFollower", + "name": "NotOperator", "inputs": [] }, { "type": "error", - "name": "NotValidatorOrOperator", + "name": "NotRootFollower", "inputs": [] }, { "type": "error", - "name": "OwnableInvalidOwner", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "OwnableUnauthorizedAccount", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - } - ] + "name": "NotWhitelistedVault", + "inputs": [] }, { "type": "error", - "name": "PayoutAmountIsZero", + "name": "OperatorAlreadySet", "inputs": [] }, { "type": "error", - "name": "PayoutTokenIsZero", + "name": "PayoutAmountIsZero", "inputs": [] }, { "type": "error", - "name": "QueuedCuttingBoardNotFound", + "name": "RewardAllocationAlreadyQueued", "inputs": [] }, { "type": "error", - "name": "QueuedCuttingBoardNotReady", + "name": "RewardAllocationBlockDelayTooLarge", "inputs": [] }, { @@ -670,17 +626,17 @@ }, { "type": "error", - "name": "RewardCycleStarted", + "name": "RewardsDurationIsZero", "inputs": [] }, { "type": "error", - "name": "RewardsDurationIsZero", + "name": "StakeAmountIsZero", "inputs": [] }, { "type": "error", - "name": "StakeAmountIsZero", + "name": "TimestampAlreadyProcessed", "inputs": [] }, { @@ -705,44 +661,27 @@ }, { "type": "error", - "name": "UUPSUnauthorizedCallContext", + "name": "VaultAlreadyExists", "inputs": [] }, { "type": "error", - "name": "UUPSUnsupportedProxiableUUID", - "inputs": [ - { - "name": "slot", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "Unauthorized", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ] + "name": "WithdrawAmountIsZero", + "inputs": [] }, { "type": "error", - "name": "VaultAlreadyExists", + "name": "ZeroAddress", "inputs": [] }, { "type": "error", - "name": "WithdrawAmountIsZero", + "name": "ZeroOperatorOnFirstDeposit", "inputs": [] }, { "type": "error", - "name": "ZeroAddress", + "name": "ZeroPercentageWeight", "inputs": [] } ] diff --git a/core/Distributor.json b/core/Distributor.json index 84c05bb..b6ef814 100644 --- a/core/Distributor.json +++ b/core/Distributor.json @@ -4,14 +4,29 @@ "name": "distributeFor", "inputs": [ { - "name": "coinbase", - "type": "address", - "internalType": "address" + "name": "nextTimestamp", + "type": "uint64", + "internalType": "uint64" }, { - "name": "blockNumber", - "type": "uint256", - "internalType": "uint256" + "name": "proposerIndex", + "type": "uint64", + "internalType": "uint64" + }, + { + "name": "pubkey", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "proposerIndexProof", + "type": "bytes32[]", + "internalType": "bytes32[]" + }, + { + "name": "pubkeyProof", + "type": "bytes32[]", + "internalType": "bytes32[]" } ], "outputs": [], @@ -22,16 +37,16 @@ "name": "Distributed", "inputs": [ { - "name": "valCoinbase", - "type": "address", + "name": "valPubkey", + "type": "bytes", "indexed": true, - "internalType": "address" + "internalType": "bytes" }, { - "name": "blockNumber", - "type": "uint256", + "name": "nextTimestamp", + "type": "uint64", "indexed": true, - "internalType": "uint256" + "internalType": "uint64" }, { "name": "receiver", @@ -60,27 +75,42 @@ }, { "type": "error", - "name": "BlockDoesNotExist", + "name": "CannotRecoverIncentiveToken", "inputs": [] }, { "type": "error", - "name": "BlockNotInBuffer", + "name": "CannotRecoverRewardToken", "inputs": [] }, { "type": "error", - "name": "CannotRecoverRewardToken", + "name": "CannotRecoverStakingToken", "inputs": [] }, { "type": "error", - "name": "CannotRecoverStakingToken", + "name": "DepositNotMultipleOfGwei", + "inputs": [] + }, + { + "type": "error", + "name": "DepositValueTooHigh", + "inputs": [] + }, + { + "type": "error", + "name": "DonateAmountLessThanPayoutAmount", + "inputs": [] + }, + { + "type": "error", + "name": "IncentiveRateTooHigh", "inputs": [] }, { "type": "error", - "name": "DelegateStakedOverflow", + "name": "IndexOutOfRange", "inputs": [] }, { @@ -93,6 +123,11 @@ "name": "InsufficientDelegateStake", "inputs": [] }, + { + "type": "error", + "name": "InsufficientDeposit", + "inputs": [] + }, { "type": "error", "name": "InsufficientSelfStake", @@ -105,12 +140,27 @@ }, { "type": "error", - "name": "InvalidCommission", + "name": "InvalidActivateBoostDelay", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidBaseRate", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidBoostMultiplier", "inputs": [] }, { "type": "error", - "name": "InvalidCuttingBoardWeights", + "name": "InvalidCredentialsLength", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidDropBoostDelay", "inputs": [] }, { @@ -120,7 +170,42 @@ }, { "type": "error", - "name": "InvalidMinter", + "name": "InvalidMinBoostedRewardRate", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidProof", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidPubKeyLength", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidRewardAllocationWeights", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidRewardConvexity", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidRewardRate", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidRewardVaultAddress", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidSignatureLength", "inputs": [] }, { @@ -128,6 +213,11 @@ "name": "InvalidStartBlock", "inputs": [] }, + { + "type": "error", + "name": "InvalidateDefaultRewardAllocation", + "inputs": [] + }, { "type": "error", "name": "InvariantCheckFailed", @@ -135,17 +225,17 @@ }, { "type": "error", - "name": "MaxNumWeightsPerCuttingBoardIsZero", + "name": "MaxNumWeightsPerRewardAllocationIsZero", "inputs": [] }, { "type": "error", - "name": "NoWhitelistedTokens", + "name": "MinIncentiveRateIsZero", "inputs": [] }, { "type": "error", - "name": "NotActionableBlock", + "name": "NotAContract", "inputs": [] }, { @@ -178,6 +268,11 @@ "name": "NotEnoughBalance", "inputs": [] }, + { + "type": "error", + "name": "NotEnoughBoostedBalance", + "inputs": [] + }, { "type": "error", "name": "NotEnoughTime", @@ -185,12 +280,12 @@ }, { "type": "error", - "name": "NotFeeCollector", + "name": "NotFactoryVault", "inputs": [] }, { "type": "error", - "name": "NotFriendOfTheChef", + "name": "NotFeeCollector", "inputs": [] }, { @@ -200,12 +295,17 @@ }, { "type": "error", - "name": "NotOperator", + "name": "NotIncentiveManager", "inputs": [] }, { "type": "error", - "name": "NotProver", + "name": "NotNewOperator", + "inputs": [] + }, + { + "type": "error", + "name": "NotOperator", "inputs": [] }, { @@ -215,27 +315,27 @@ }, { "type": "error", - "name": "NotValidatorOrOperator", + "name": "NotWhitelistedVault", "inputs": [] }, { "type": "error", - "name": "PayoutAmountIsZero", + "name": "OperatorAlreadySet", "inputs": [] }, { "type": "error", - "name": "PayoutTokenIsZero", + "name": "PayoutAmountIsZero", "inputs": [] }, { "type": "error", - "name": "QueuedCuttingBoardNotFound", + "name": "RewardAllocationAlreadyQueued", "inputs": [] }, { "type": "error", - "name": "QueuedCuttingBoardNotReady", + "name": "RewardAllocationBlockDelayTooLarge", "inputs": [] }, { @@ -245,7 +345,7 @@ }, { "type": "error", - "name": "RewardCycleStarted", + "name": "RewardsDurationIsZero", "inputs": [] }, { @@ -253,6 +353,11 @@ "name": "StakeAmountIsZero", "inputs": [] }, + { + "type": "error", + "name": "TimestampAlreadyProcessed", + "inputs": [] + }, { "type": "error", "name": "TokenAlreadyWhitelistedOrLimitReached", @@ -273,17 +378,6 @@ "name": "TotalSupplyOverflow", "inputs": [] }, - { - "type": "error", - "name": "Unauthorized", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ] - }, { "type": "error", "name": "VaultAlreadyExists", @@ -298,5 +392,15 @@ "type": "error", "name": "ZeroAddress", "inputs": [] + }, + { + "type": "error", + "name": "ZeroOperatorOnFirstDeposit", + "inputs": [] + }, + { + "type": "error", + "name": "ZeroPercentageWeight", + "inputs": [] } ] diff --git a/core/FeeCollector.json b/core/FeeCollector.json index 843fe4f..8039431 100644 --- a/core/FeeCollector.json +++ b/core/FeeCollector.json @@ -1,33 +1,15 @@ [ - { - "type": "constructor", - "inputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "UPGRADE_INTERFACE_VERSION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, { "type": "function", "name": "claimFees", "inputs": [ { - "name": "_recipient", + "name": "recipient", "type": "address", "internalType": "address" }, { - "name": "_feeTokens", + "name": "feeTokens", "type": "address[]", "internalType": "address[]" } @@ -50,45 +32,11 @@ }, { "type": "function", - "name": "initialize", - "inputs": [ - { - "name": "governance", - "type": "address", - "internalType": "address" - }, - { - "name": "_payoutToken", - "type": "address", - "internalType": "address" - }, - { - "name": "_rewardReceiver", - "type": "address", - "internalType": "address" - }, - { - "name": "_payoutAmount", - "type": "uint256", - "internalType": "uint256" - } - ], + "name": "pause", + "inputs": [], "outputs": [], "stateMutability": "nonpayable" }, - { - "type": "function", - "name": "owner", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, { "type": "function", "name": "payoutAmount", @@ -117,93 +65,68 @@ }, { "type": "function", - "name": "proxiableUUID", - "inputs": [], - "outputs": [ + "name": "queuePayoutAmountChange", + "inputs": [ { - "name": "", - "type": "bytes32", - "internalType": "bytes32" + "name": "_newPayoutAmount", + "type": "uint256", + "internalType": "uint256" } ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "renounceOwnership", - "inputs": [], "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", - "name": "rewardReceiver", + "name": "queuedPayoutAmount", "inputs": [], "outputs": [ { "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "setPayoutAmount", - "inputs": [ - { - "name": "_newPayoutAmount", "type": "uint256", "internalType": "uint256" } ], - "outputs": [], - "stateMutability": "nonpayable" + "stateMutability": "view" }, { "type": "function", - "name": "setPayoutToken", - "inputs": [ + "name": "rewardReceiver", + "inputs": [], + "outputs": [ { - "name": "_newPayoutToken", + "name": "", "type": "address", "internalType": "address" } ], - "outputs": [], - "stateMutability": "nonpayable" + "stateMutability": "view" }, { "type": "function", - "name": "transferOwnership", - "inputs": [ - { - "name": "newOwner", - "type": "address", - "internalType": "address" - } - ], + "name": "unpause", + "inputs": [], "outputs": [], "stateMutability": "nonpayable" }, { - "type": "function", - "name": "upgradeToAndCall", + "type": "event", + "name": "FeesClaimed", "inputs": [ { - "name": "newImplementation", + "name": "caller", "type": "address", + "indexed": true, "internalType": "address" }, { - "name": "data", - "type": "bytes", - "internalType": "bytes" + "name": "recipient", + "type": "address", + "indexed": true, + "internalType": "address" } ], - "outputs": [], - "stateMutability": "payable" + "anonymous": false }, { "type": "event", @@ -238,18 +161,18 @@ }, { "type": "event", - "name": "FeesDonated", + "name": "PayoutAmountSet", "inputs": [ { - "name": "caller", - "type": "address", + "name": "oldPayoutAmount", + "type": "uint256", "indexed": true, - "internalType": "address" + "internalType": "uint256" }, { - "name": "amount", + "name": "newPayoutAmount", "type": "uint256", - "indexed": false, + "indexed": true, "internalType": "uint256" } ], @@ -257,187 +180,140 @@ }, { "type": "event", - "name": "Initialized", + "name": "PayoutDonated", "inputs": [ { - "name": "version", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "OwnershipTransferred", - "inputs": [ - { - "name": "previousOwner", + "name": "caller", "type": "address", "indexed": true, "internalType": "address" }, { - "name": "newOwner", - "type": "address", - "indexed": true, - "internalType": "address" + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], "anonymous": false }, { "type": "event", - "name": "PayoutAmountSet", + "name": "QueuedPayoutAmount", "inputs": [ { - "name": "oldPayoutAmount", + "name": "queuedPayoutAmount", "type": "uint256", - "indexed": true, + "indexed": false, "internalType": "uint256" }, { - "name": "newPayoutAmount", + "name": "currentPayoutAmount", "type": "uint256", - "indexed": true, + "indexed": false, "internalType": "uint256" } ], "anonymous": false }, { - "type": "event", - "name": "PayoutTokenSet", - "inputs": [ - { - "name": "oldPayoutToken", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "newPayoutToken", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false + "type": "error", + "name": "AlreadyInitialized", + "inputs": [] }, { - "type": "event", - "name": "Upgraded", - "inputs": [ - { - "name": "implementation", - "type": "address", - "indexed": true, - "internalType": "address" - } - ], - "anonymous": false + "type": "error", + "name": "AmountLessThanMinIncentiveRate", + "inputs": [] }, { "type": "error", - "name": "AddressEmptyCode", - "inputs": [ - { - "name": "target", - "type": "address", - "internalType": "address" - } - ] + "name": "CannotRecoverIncentiveToken", + "inputs": [] }, { "type": "error", - "name": "AlreadyInitialized", + "name": "CannotRecoverRewardToken", "inputs": [] }, { "type": "error", - "name": "AmountLessThanMinIncentiveRate", + "name": "CannotRecoverStakingToken", "inputs": [] }, { "type": "error", - "name": "BlockDoesNotExist", + "name": "DepositNotMultipleOfGwei", "inputs": [] }, { "type": "error", - "name": "BlockNotInBuffer", + "name": "DepositValueTooHigh", "inputs": [] }, { "type": "error", - "name": "CannotRecoverRewardToken", + "name": "DonateAmountLessThanPayoutAmount", "inputs": [] }, { "type": "error", - "name": "CannotRecoverStakingToken", + "name": "IncentiveRateTooHigh", "inputs": [] }, { "type": "error", - "name": "DelegateStakedOverflow", + "name": "IndexOutOfRange", "inputs": [] }, { "type": "error", - "name": "ERC1967InvalidImplementation", - "inputs": [ - { - "name": "implementation", - "type": "address", - "internalType": "address" - } - ] + "name": "InsolventReward", + "inputs": [] }, { "type": "error", - "name": "ERC1967NonPayable", + "name": "InsufficientDelegateStake", "inputs": [] }, { "type": "error", - "name": "FailedInnerCall", + "name": "InsufficientDeposit", "inputs": [] }, { "type": "error", - "name": "InsolventReward", + "name": "InsufficientSelfStake", "inputs": [] }, { "type": "error", - "name": "InsufficientDelegateStake", + "name": "InsufficientStake", "inputs": [] }, { "type": "error", - "name": "InsufficientSelfStake", + "name": "InvalidActivateBoostDelay", "inputs": [] }, { "type": "error", - "name": "InsufficientStake", + "name": "InvalidBaseRate", "inputs": [] }, { "type": "error", - "name": "InvalidCommission", + "name": "InvalidBoostMultiplier", "inputs": [] }, { "type": "error", - "name": "InvalidCuttingBoardWeights", + "name": "InvalidCredentialsLength", "inputs": [] }, { "type": "error", - "name": "InvalidInitialization", + "name": "InvalidDropBoostDelay", "inputs": [] }, { @@ -447,7 +323,42 @@ }, { "type": "error", - "name": "InvalidMinter", + "name": "InvalidMinBoostedRewardRate", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidProof", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidPubKeyLength", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidRewardAllocationWeights", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidRewardConvexity", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidRewardRate", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidRewardVaultAddress", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidSignatureLength", "inputs": [] }, { @@ -455,6 +366,11 @@ "name": "InvalidStartBlock", "inputs": [] }, + { + "type": "error", + "name": "InvalidateDefaultRewardAllocation", + "inputs": [] + }, { "type": "error", "name": "InvariantCheckFailed", @@ -462,17 +378,17 @@ }, { "type": "error", - "name": "MaxNumWeightsPerCuttingBoardIsZero", + "name": "MaxNumWeightsPerRewardAllocationIsZero", "inputs": [] }, { "type": "error", - "name": "NoWhitelistedTokens", + "name": "MinIncentiveRateIsZero", "inputs": [] }, { "type": "error", - "name": "NotActionableBlock", + "name": "NotAContract", "inputs": [] }, { @@ -507,70 +423,58 @@ }, { "type": "error", - "name": "NotEnoughTime", + "name": "NotEnoughBoostedBalance", "inputs": [] }, { "type": "error", - "name": "NotFeeCollector", + "name": "NotEnoughTime", "inputs": [] }, { "type": "error", - "name": "NotFriendOfTheChef", + "name": "NotFactoryVault", "inputs": [] }, { "type": "error", - "name": "NotGovernance", + "name": "NotFeeCollector", "inputs": [] }, { "type": "error", - "name": "NotInitializing", + "name": "NotGovernance", "inputs": [] }, { "type": "error", - "name": "NotOperator", + "name": "NotIncentiveManager", "inputs": [] }, { "type": "error", - "name": "NotProver", + "name": "NotNewOperator", "inputs": [] }, { "type": "error", - "name": "NotRootFollower", + "name": "NotOperator", "inputs": [] }, { "type": "error", - "name": "NotValidatorOrOperator", + "name": "NotRootFollower", "inputs": [] }, { "type": "error", - "name": "OwnableInvalidOwner", - "inputs": [ - { - "name": "owner", - "type": "address", - "internalType": "address" - } - ] + "name": "NotWhitelistedVault", + "inputs": [] }, { "type": "error", - "name": "OwnableUnauthorizedAccount", - "inputs": [ - { - "name": "account", - "type": "address", - "internalType": "address" - } - ] + "name": "OperatorAlreadySet", + "inputs": [] }, { "type": "error", @@ -579,32 +483,32 @@ }, { "type": "error", - "name": "PayoutTokenIsZero", + "name": "RewardAllocationAlreadyQueued", "inputs": [] }, { "type": "error", - "name": "QueuedCuttingBoardNotFound", + "name": "RewardAllocationBlockDelayTooLarge", "inputs": [] }, { "type": "error", - "name": "QueuedCuttingBoardNotReady", + "name": "RewardCycleNotEnded", "inputs": [] }, { "type": "error", - "name": "RewardCycleNotEnded", + "name": "RewardsDurationIsZero", "inputs": [] }, { "type": "error", - "name": "RewardCycleStarted", + "name": "StakeAmountIsZero", "inputs": [] }, { "type": "error", - "name": "StakeAmountIsZero", + "name": "TimestampAlreadyProcessed", "inputs": [] }, { @@ -629,44 +533,27 @@ }, { "type": "error", - "name": "UUPSUnauthorizedCallContext", + "name": "VaultAlreadyExists", "inputs": [] }, { "type": "error", - "name": "UUPSUnsupportedProxiableUUID", - "inputs": [ - { - "name": "slot", - "type": "bytes32", - "internalType": "bytes32" - } - ] - }, - { - "type": "error", - "name": "Unauthorized", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ] + "name": "WithdrawAmountIsZero", + "inputs": [] }, { "type": "error", - "name": "VaultAlreadyExists", + "name": "ZeroAddress", "inputs": [] }, { "type": "error", - "name": "WithdrawAmountIsZero", + "name": "ZeroOperatorOnFirstDeposit", "inputs": [] }, { "type": "error", - "name": "ZeroAddress", + "name": "ZeroPercentageWeight", "inputs": [] } ] diff --git a/core/HONEY.json b/core/HONEY.json index f6f0c38..46eb871 100644 --- a/core/HONEY.json +++ b/core/HONEY.json @@ -4,6 +4,19 @@ "inputs": [], "stateMutability": "nonpayable" }, + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, { "type": "function", "name": "DOMAIN_SEPARATOR", @@ -141,6 +154,67 @@ ], "stateMutability": "view" }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, { "type": "function", "name": "initialize", @@ -209,19 +283,6 @@ ], "stateMutability": "view" }, - { - "type": "function", - "name": "owner", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, { "type": "function", "name": "permit", @@ -280,11 +341,59 @@ }, { "type": "function", - "name": "renounceOwnership", - "inputs": [], + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "callerConfirmation", + "type": "address", + "internalType": "address" + } + ], "outputs": [], "stateMutability": "nonpayable" }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "supportsInterface", + "inputs": [ + { + "name": "interfaceId", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, { "type": "function", "name": "symbol", @@ -364,19 +473,6 @@ ], "stateMutability": "nonpayable" }, - { - "type": "function", - "name": "transferOwnership", - "inputs": [ - { - "name": "newOwner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, { "type": "function", "name": "upgradeToAndCall", @@ -435,16 +531,72 @@ }, { "type": "event", - "name": "OwnershipTransferred", + "name": "RoleAdminChanged", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "previousAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", "inputs": [ { - "name": "previousOwner", + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", "type": "address", "indexed": true, "internalType": "address" }, { - "name": "newOwner", + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", "type": "address", "indexed": true, "internalType": "address" @@ -490,6 +642,27 @@ ], "anonymous": false }, + { + "type": "error", + "name": "AccessControlBadConfirmation", + "inputs": [] + }, + { + "type": "error", + "name": "AccessControlUnauthorizedAccount", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "neededRole", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, { "type": "error", "name": "AddressEmptyCode", @@ -511,6 +684,33 @@ "name": "AllowanceUnderflow", "inputs": [] }, + { + "type": "error", + "name": "AmountOutOfRange", + "inputs": [] + }, + { + "type": "error", + "name": "AssetIsBadCollateral", + "inputs": [ + { + "name": "asset", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "AssetIsNotBadCollateral", + "inputs": [ + { + "name": "asset", + "type": "address", + "internalType": "address" + } + ] + }, { "type": "error", "name": "AssetNotRegistered", @@ -540,7 +740,17 @@ }, { "type": "error", - "name": "FailedInnerCall", + "name": "ExceedGlobalCap", + "inputs": [] + }, + { + "type": "error", + "name": "ExceedRelativeCap", + "inputs": [] + }, + { + "type": "error", + "name": "FailedCall", "inputs": [] }, { @@ -569,6 +779,17 @@ "name": "InsufficientBalance", "inputs": [] }, + { + "type": "error", + "name": "InsufficientRecapitalizeAmount", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ] + }, { "type": "error", "name": "InvalidInitialization", @@ -579,6 +800,16 @@ "name": "InvalidPermit", "inputs": [] }, + { + "type": "error", + "name": "LiquidationDisabled", + "inputs": [] + }, + { + "type": "error", + "name": "LiquidationWithReferenceCollateral", + "inputs": [] + }, { "type": "error", "name": "MismatchedOwner", @@ -607,42 +838,42 @@ }, { "type": "error", - "name": "OverOneHundredPercentRate", + "name": "NotPegged", "inputs": [ { - "name": "rate", - "type": "uint256", - "internalType": "uint256" + "name": "asset", + "type": "address", + "internalType": "address" } ] }, { "type": "error", - "name": "OwnableInvalidOwner", + "name": "OverOneHundredPercentRate", "inputs": [ { - "name": "owner", - "type": "address", - "internalType": "address" + "name": "rate", + "type": "uint256", + "internalType": "uint256" } ] }, { "type": "error", - "name": "OwnableUnauthorizedAccount", + "name": "PermitExpired", + "inputs": [] + }, + { + "type": "error", + "name": "RecapitalizeNotNeeded", "inputs": [ { - "name": "account", + "name": "asset", "type": "address", "internalType": "address" } ] }, - { - "type": "error", - "name": "PermitExpired", - "inputs": [] - }, { "type": "error", "name": "TotalSupplyOverflow", @@ -680,6 +911,17 @@ } ] }, + { + "type": "error", + "name": "UnderNinetyEightPercentRate", + "inputs": [ + { + "name": "rate", + "type": "uint256", + "internalType": "uint256" + } + ] + }, { "type": "error", "name": "VaultAlreadyRegistered", @@ -690,5 +932,31 @@ "internalType": "address" } ] + }, + { + "type": "error", + "name": "VaultPaused", + "inputs": [] + }, + { + "type": "error", + "name": "ZeroAddress", + "inputs": [] + }, + { + "type": "error", + "name": "ZeroAmount", + "inputs": [] + }, + { + "type": "error", + "name": "ZeroWeight", + "inputs": [ + { + "name": "asset", + "type": "address", + "internalType": "address" + } + ] } ] diff --git a/core/HoneyFactory.json b/core/HoneyFactory.json index 722414d..5a26958 100644 --- a/core/HoneyFactory.json +++ b/core/HoneyFactory.json @@ -1,257 +1,36 @@ [ - { - "type": "constructor", - "inputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "UPGRADE_INTERFACE_VERSION", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "string", - "internalType": "string" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "beacon", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "createVault", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract ERC4626" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "feeReceiver", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getMintRate", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "getRedeemRate", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "honey", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract Honey" - } - ], - "stateMutability": "view" - }, { "type": "function", - "name": "initialize", + "name": "liquidate", "inputs": [ { - "name": "_governance", + "name": "badCollateral", "type": "address", "internalType": "address" }, { - "name": "_honey", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "mint", - "inputs": [ - { - "name": "asset", + "name": "goodCollateral", "type": "address", "internalType": "address" }, { - "name": "amount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "receiver", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", + "name": "goodAmount", "type": "uint256", "internalType": "uint256" } ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "numRegisteredAssets", - "inputs": [], "outputs": [ { - "name": "", + "name": "badAmount", "type": "uint256", "internalType": "uint256" } ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "owner", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "pause", - "inputs": [], - "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", - "name": "paused", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bool", - "internalType": "bool" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "predictVaultAddress", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "previewHoneyToRedeem", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "exactAmount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "previewMint", + "name": "mint", "inputs": [ { "name": "asset", @@ -262,167 +41,25 @@ "name": "amount", "type": "uint256", "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "honeyAmount", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "previewRedeem", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "honeyAmount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "previewRequiredCollateral", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" }, { - "name": "exactHoneyAmount", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "proxiableUUID", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "bytes32", - "internalType": "bytes32" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "redeem", - "inputs": [ - { - "name": "asset", - "type": "address", - "internalType": "address" - }, - { - "name": "honeyAmount", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "receiver", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "registeredAssets", - "inputs": [ - { - "name": "", - "type": "uint256", - "internalType": "uint256" - } - ], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "renounceOwnership", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setFeeReceiver", - "inputs": [ - { - "name": "_feeReceiver", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "setMintRate", - "inputs": [ - { - "name": "asset", + "name": "receiver", "type": "address", "internalType": "address" - }, + } + ], + "outputs": [ { - "name": "mintRate", + "name": "", "type": "uint256", "internalType": "uint256" } ], - "outputs": [], "stateMutability": "nonpayable" }, { "type": "function", - "name": "setRedeemRate", + "name": "recapitalize", "inputs": [ { "name": "asset", @@ -430,7 +67,7 @@ "internalType": "address" }, { - "name": "redeemRate", + "name": "amount", "type": "uint256", "internalType": "uint256" } @@ -440,112 +77,80 @@ }, { "type": "function", - "name": "transferOwnership", - "inputs": [ - { - "name": "newOwner", - "type": "address", - "internalType": "address" - } - ], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "unpause", - "inputs": [], - "outputs": [], - "stateMutability": "nonpayable" - }, - { - "type": "function", - "name": "upgradeToAndCall", + "name": "redeem", "inputs": [ { - "name": "newImplementation", + "name": "asset", "type": "address", "internalType": "address" }, { - "name": "data", - "type": "bytes", - "internalType": "bytes" - } - ], - "outputs": [], - "stateMutability": "payable" - }, - { - "type": "function", - "name": "vaults", - "inputs": [ + "name": "honeyAmount", + "type": "uint256", + "internalType": "uint256" + }, { - "name": "asset", + "name": "receiver", "type": "address", "internalType": "address" } ], "outputs": [ { - "name": "vault", - "type": "address", - "internalType": "contract ERC4626" + "name": "", + "type": "uint256[]", + "internalType": "uint256[]" } ], - "stateMutability": "view" + "stateMutability": "nonpayable" }, { - "type": "function", - "name": "withdrawAllFee", + "type": "event", + "name": "BasketModeForced", "inputs": [ { - "name": "receiver", - "type": "address", - "internalType": "address" + "name": "forced", + "type": "bool", + "indexed": false, + "internalType": "bool" } ], - "outputs": [], - "stateMutability": "nonpayable" + "anonymous": false }, { - "type": "function", - "name": "withdrawFee", + "type": "event", + "name": "DepegOffsetsSet", "inputs": [ { "name": "asset", "type": "address", + "indexed": false, "internalType": "address" }, { - "name": "shares", + "name": "lower", "type": "uint256", + "indexed": false, "internalType": "uint256" }, { - "name": "receiver", - "type": "address", - "internalType": "address" - } - ], - "outputs": [ - { - "name": "assets", + "name": "upper", "type": "uint256", + "indexed": false, "internalType": "uint256" } ], - "stateMutability": "nonpayable" + "anonymous": false }, { "type": "event", - "name": "FeeReceiverSet", + "name": "GlobalCapSet", "inputs": [ { - "name": "feeReceiver", - "type": "address", - "indexed": true, - "internalType": "address" + "name": "globalCap", + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], "anonymous": false @@ -626,80 +231,73 @@ }, { "type": "event", - "name": "Initialized", + "name": "Liquidated", "inputs": [ { - "name": "version", - "type": "uint64", + "name": "badAsset", + "type": "address", "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, - { - "type": "event", - "name": "MintRateSet", - "inputs": [ + "internalType": "address" + }, { - "name": "asset", + "name": "goodAsset", "type": "address", - "indexed": true, + "indexed": false, "internalType": "address" }, { - "name": "rate", + "name": "amount", "type": "uint256", "indexed": false, "internalType": "uint256" + }, + { + "name": "sender", + "type": "address", + "indexed": false, + "internalType": "address" } ], "anonymous": false }, { "type": "event", - "name": "OwnershipTransferred", + "name": "LiquidationRateSet", "inputs": [ { - "name": "previousOwner", + "name": "asset", "type": "address", - "indexed": true, + "indexed": false, "internalType": "address" }, { - "name": "newOwner", - "type": "address", - "indexed": true, - "internalType": "address" + "name": "rate", + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], "anonymous": false }, { "type": "event", - "name": "Paused", + "name": "LiquidationStatusSet", "inputs": [ { - "name": "account", - "type": "address", + "name": "enabled", + "type": "bool", "indexed": false, - "internalType": "address" + "internalType": "bool" } ], "anonymous": false }, { "type": "event", - "name": "RedeemRateSet", + "name": "MaxFeedDelaySet", "inputs": [ { - "name": "asset", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "rate", + "name": "maxFeedDelay", "type": "uint256", "indexed": false, "internalType": "uint256" @@ -709,260 +307,148 @@ }, { "type": "event", - "name": "Unpaused", + "name": "MinSharesToRecapitalizeSet", "inputs": [ { - "name": "account", - "type": "address", + "name": "minShareAmount", + "type": "uint256", "indexed": false, - "internalType": "address" + "internalType": "uint256" } ], "anonymous": false }, { "type": "event", - "name": "Upgraded", + "name": "MintRateSet", "inputs": [ { - "name": "implementation", + "name": "asset", "type": "address", "indexed": true, "internalType": "address" + }, + { + "name": "rate", + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], "anonymous": false }, { "type": "event", - "name": "VaultCreated", + "name": "POLFeeCollectorFeeRateSet", "inputs": [ { - "name": "vault", - "type": "address", - "indexed": true, - "internalType": "address" - }, - { - "name": "asset", - "type": "address", - "indexed": true, - "internalType": "address" + "name": "rate", + "type": "uint256", + "indexed": false, + "internalType": "uint256" } ], "anonymous": false }, { - "type": "error", - "name": "AddressEmptyCode", - "inputs": [ - { - "name": "target", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "AssetNotRegistered", + "type": "event", + "name": "RecapitalizeBalanceThresholdSet", "inputs": [ { "name": "asset", "type": "address", + "indexed": false, "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967InvalidImplementation", - "inputs": [ - { - "name": "implementation", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "ERC1967NonPayable", - "inputs": [] - }, - { - "type": "error", - "name": "EnforcedPause", - "inputs": [] - }, - { - "type": "error", - "name": "ExpectedPause", - "inputs": [] - }, - { - "type": "error", - "name": "FailedInnerCall", - "inputs": [] - }, - { - "type": "error", - "name": "InsufficientAssets", - "inputs": [ - { - "name": "assets", - "type": "uint256", - "internalType": "uint256" }, { - "name": "shares", + "name": "target", "type": "uint256", + "indexed": false, "internalType": "uint256" } - ] - }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] + ], + "anonymous": false }, { - "type": "error", - "name": "MismatchedOwner", + "type": "event", + "name": "Recapitalized", "inputs": [ { - "name": "owner", + "name": "asset", "type": "address", + "indexed": false, "internalType": "address" }, { - "name": "expectedOwner", - "type": "address", - "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "NotFactory", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, - { - "type": "error", - "name": "OverOneHundredPercentRate", - "inputs": [ - { - "name": "rate", + "name": "amount", "type": "uint256", + "indexed": false, "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "OwnableInvalidOwner", - "inputs": [ + }, { - "name": "owner", + "name": "sender", "type": "address", + "indexed": false, "internalType": "address" } - ] + ], + "anonymous": false }, { - "type": "error", - "name": "OwnableUnauthorizedAccount", + "type": "event", + "name": "RedeemRateSet", "inputs": [ { - "name": "account", + "name": "asset", "type": "address", + "indexed": true, "internalType": "address" - } - ] - }, - { - "type": "error", - "name": "PRBMath_MulDiv18_Overflow", - "inputs": [ - { - "name": "x", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "y", - "type": "uint256", - "internalType": "uint256" - } - ] - }, - { - "type": "error", - "name": "PRBMath_MulDiv_Overflow", - "inputs": [ - { - "name": "x", - "type": "uint256", - "internalType": "uint256" - }, - { - "name": "y", - "type": "uint256", - "internalType": "uint256" }, { - "name": "denominator", + "name": "rate", "type": "uint256", + "indexed": false, "internalType": "uint256" } - ] - }, - { - "type": "error", - "name": "UUPSUnauthorizedCallContext", - "inputs": [] - }, - { - "type": "error", - "name": "UUPSUnsupportedProxiableUUID", - "inputs": [ - { - "name": "slot", - "type": "bytes32", - "internalType": "bytes32" - } - ] + ], + "anonymous": false }, { - "type": "error", - "name": "UnauthorizedCaller", + "type": "event", + "name": "ReferenceCollateralSet", "inputs": [ { - "name": "caller", + "name": "old", "type": "address", + "indexed": false, "internalType": "address" }, { - "name": "expectedCaller", + "name": "asset", "type": "address", + "indexed": false, "internalType": "address" } - ] + ], + "anonymous": false }, { - "type": "error", - "name": "VaultAlreadyRegistered", + "type": "event", + "name": "RelativeCapSet", "inputs": [ { "name": "asset", "type": "address", + "indexed": false, "internalType": "address" + }, + { + "name": "relativeCap", + "type": "uint256", + "indexed": false, + "internalType": "uint256" } - ] + ], + "anonymous": false } ] diff --git a/core/HoneyFactoryReader.json b/core/HoneyFactoryReader.json new file mode 100644 index 0000000..d9a3019 --- /dev/null +++ b/core/HoneyFactoryReader.json @@ -0,0 +1,709 @@ +[ + { + "type": "constructor", + "inputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "UPGRADE_INTERFACE_VERSION", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "honeyFactory", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract HoneyFactory" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "admin", + "type": "address", + "internalType": "address" + }, + { + "name": "honeyFactory_", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "previewHoneyToRedeem", + "inputs": [ + { + "name": "asset", + "type": "address", + "internalType": "address" + }, + { + "name": "exactAmount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "previewMint", + "inputs": [ + { + "name": "asset", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "honeyAmount", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "previewRedeem", + "inputs": [ + { + "name": "asset", + "type": "address", + "internalType": "address" + }, + { + "name": "honeyAmount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "previewRedeemBasketMode", + "inputs": [ + { + "name": "honeyAmount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "res", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "previewRequiredCollateral", + "inputs": [ + { + "name": "asset", + "type": "address", + "internalType": "address" + }, + { + "name": "exactHoneyAmount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "res", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "proxiableUUID", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "renounceRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "callerConfirmation", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "supportsInterface", + "inputs": [ + { + "name": "interfaceId", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "upgradeToAndCall", + "inputs": [ + { + "name": "newImplementation", + "type": "address", + "internalType": "address" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "event", + "name": "Initialized", + "inputs": [ + { + "name": "version", + "type": "uint64", + "indexed": false, + "internalType": "uint64" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleAdminChanged", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "previousAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newAdminRole", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleGranted", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RoleRevoked", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Upgraded", + "inputs": [ + { + "name": "implementation", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "error", + "name": "AccessControlBadConfirmation", + "inputs": [] + }, + { + "type": "error", + "name": "AccessControlUnauthorizedAccount", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "neededRole", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "AddressEmptyCode", + "inputs": [ + { + "name": "target", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "AmountOutOfRange", + "inputs": [] + }, + { + "type": "error", + "name": "AssetIsBadCollateral", + "inputs": [ + { + "name": "asset", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "AssetIsNotBadCollateral", + "inputs": [ + { + "name": "asset", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "AssetNotRegistered", + "inputs": [ + { + "name": "asset", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ERC1967InvalidImplementation", + "inputs": [ + { + "name": "implementation", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "ERC1967NonPayable", + "inputs": [] + }, + { + "type": "error", + "name": "ExceedGlobalCap", + "inputs": [] + }, + { + "type": "error", + "name": "ExceedRelativeCap", + "inputs": [] + }, + { + "type": "error", + "name": "FailedCall", + "inputs": [] + }, + { + "type": "error", + "name": "InsufficientAssets", + "inputs": [ + { + "name": "assets", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "shares", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "InsufficientRecapitalizeAmount", + "inputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "InvalidInitialization", + "inputs": [] + }, + { + "type": "error", + "name": "LiquidationDisabled", + "inputs": [] + }, + { + "type": "error", + "name": "LiquidationWithReferenceCollateral", + "inputs": [] + }, + { + "type": "error", + "name": "MismatchedOwner", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "expectedOwner", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "NotFactory", + "inputs": [] + }, + { + "type": "error", + "name": "NotInitializing", + "inputs": [] + }, + { + "type": "error", + "name": "NotPegged", + "inputs": [ + { + "name": "asset", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "OverOneHundredPercentRate", + "inputs": [ + { + "name": "rate", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "RecapitalizeNotNeeded", + "inputs": [ + { + "name": "asset", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "UUPSUnauthorizedCallContext", + "inputs": [] + }, + { + "type": "error", + "name": "UUPSUnsupportedProxiableUUID", + "inputs": [ + { + "name": "slot", + "type": "bytes32", + "internalType": "bytes32" + } + ] + }, + { + "type": "error", + "name": "UnauthorizedCaller", + "inputs": [ + { + "name": "caller", + "type": "address", + "internalType": "address" + }, + { + "name": "expectedCaller", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "UnderNinetyEightPercentRate", + "inputs": [ + { + "name": "rate", + "type": "uint256", + "internalType": "uint256" + } + ] + }, + { + "type": "error", + "name": "VaultAlreadyRegistered", + "inputs": [ + { + "name": "asset", + "type": "address", + "internalType": "address" + } + ] + }, + { + "type": "error", + "name": "VaultPaused", + "inputs": [] + }, + { + "type": "error", + "name": "ZeroAddress", + "inputs": [] + }, + { + "type": "error", + "name": "ZeroAmount", + "inputs": [] + }, + { + "type": "error", + "name": "ZeroWeight", + "inputs": [ + { + "name": "asset", + "type": "address", + "internalType": "address" + } + ] + } +] diff --git a/core/BerachainRewardsVault.json b/core/RewardVault.json similarity index 73% rename from core/BerachainRewardsVault.json rename to core/RewardVault.json index 6563e39..c5cf655 100644 --- a/core/BerachainRewardsVault.json +++ b/core/RewardVault.json @@ -112,7 +112,13 @@ { "type": "function", "name": "exit", - "inputs": [], + "inputs": [ + { + "name": "recipient", + "type": "address", + "internalType": "address" + } + ], "outputs": [], "stateMutability": "nonpayable" }, @@ -148,6 +154,11 @@ "name": "account", "type": "address", "internalType": "address" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address" } ], "outputs": [ @@ -258,14 +269,27 @@ ], "stateMutability": "view" }, + { + "type": "function", + "name": "lastUpdateTime", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, { "type": "function", "name": "notifyRewardAmount", "inputs": [ { - "name": "coinbase", - "type": "address", - "internalType": "address" + "name": "pubkey", + "type": "bytes", + "internalType": "bytes" }, { "name": "reward", @@ -298,15 +322,22 @@ { "type": "function", "name": "pause", - "inputs": [ + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "periodFinish", + "inputs": [], + "outputs": [ { - "name": "_paused", - "type": "bool", - "internalType": "bool" + "name": "", + "type": "uint256", + "internalType": "uint256" } ], - "outputs": [], - "stateMutability": "nonpayable" + "stateMutability": "view" }, { "type": "function", @@ -352,6 +383,64 @@ ], "stateMutability": "view" }, + { + "type": "function", + "name": "rewardPerTokenStored", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "rewardRate", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "rewards", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "rewardsDuration", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, { "type": "function", "name": "setDistributor", @@ -430,6 +519,63 @@ ], "stateMutability": "view" }, + { + "type": "function", + "name": "undistributedRewards", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "unpause", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "updateIncentiveManager", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "address" + }, + { + "name": "newManager", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "userRewardPerTokenPaid", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, { "type": "function", "name": "whitelistIncentiveToken", @@ -443,6 +589,11 @@ "name": "minIncentiveRate", "type": "uint256", "internalType": "uint256" + }, + { + "name": "manager", + "type": "address", + "internalType": "address" } ], "outputs": [], @@ -555,6 +706,31 @@ ], "anonymous": false }, + { + "type": "event", + "name": "IncentiveManagerChanged", + "inputs": [ + { + "name": "token", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newManager", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "oldManager", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, { "type": "event", "name": "IncentiveTokenRemoved", @@ -583,20 +759,57 @@ "type": "uint256", "indexed": false, "internalType": "uint256" + }, + { + "name": "manager", + "type": "address", + "indexed": false, + "internalType": "address" } ], "anonymous": false }, { "type": "event", - "name": "IncentivesProcessed", + "name": "IncentivesProcessFailed", "inputs": [ { - "name": "coinbase", + "name": "pubkey", + "type": "bytes", + "indexed": true, + "internalType": "bytes" + }, + { + "name": "token", "type": "address", "indexed": true, "internalType": "address" }, + { + "name": "bgtEmitted", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "IncentivesProcessed", + "inputs": [ + { + "name": "pubkey", + "type": "bytes", + "indexed": true, + "internalType": "bytes" + }, { "name": "token", "type": "address", @@ -770,27 +983,42 @@ }, { "type": "error", - "name": "BlockDoesNotExist", + "name": "CannotRecoverIncentiveToken", "inputs": [] }, { "type": "error", - "name": "BlockNotInBuffer", + "name": "CannotRecoverRewardToken", "inputs": [] }, { "type": "error", - "name": "CannotRecoverRewardToken", + "name": "CannotRecoverStakingToken", "inputs": [] }, { "type": "error", - "name": "CannotRecoverStakingToken", + "name": "DepositNotMultipleOfGwei", + "inputs": [] + }, + { + "type": "error", + "name": "DepositValueTooHigh", + "inputs": [] + }, + { + "type": "error", + "name": "DonateAmountLessThanPayoutAmount", "inputs": [] }, { "type": "error", - "name": "DelegateStakedOverflow", + "name": "IncentiveRateTooHigh", + "inputs": [] + }, + { + "type": "error", + "name": "IndexOutOfRange", "inputs": [] }, { @@ -803,6 +1031,11 @@ "name": "InsufficientDelegateStake", "inputs": [] }, + { + "type": "error", + "name": "InsufficientDeposit", + "inputs": [] + }, { "type": "error", "name": "InsufficientSelfStake", @@ -815,12 +1048,27 @@ }, { "type": "error", - "name": "InvalidCommission", + "name": "InvalidActivateBoostDelay", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidBaseRate", "inputs": [] }, { "type": "error", - "name": "InvalidCuttingBoardWeights", + "name": "InvalidBoostMultiplier", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidCredentialsLength", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidDropBoostDelay", "inputs": [] }, { @@ -830,7 +1078,42 @@ }, { "type": "error", - "name": "InvalidMinter", + "name": "InvalidMinBoostedRewardRate", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidProof", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidPubKeyLength", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidRewardAllocationWeights", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidRewardConvexity", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidRewardRate", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidRewardVaultAddress", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidSignatureLength", "inputs": [] }, { @@ -838,6 +1121,11 @@ "name": "InvalidStartBlock", "inputs": [] }, + { + "type": "error", + "name": "InvalidateDefaultRewardAllocation", + "inputs": [] + }, { "type": "error", "name": "InvariantCheckFailed", @@ -845,17 +1133,17 @@ }, { "type": "error", - "name": "MaxNumWeightsPerCuttingBoardIsZero", + "name": "MaxNumWeightsPerRewardAllocationIsZero", "inputs": [] }, { "type": "error", - "name": "NoWhitelistedTokens", + "name": "MinIncentiveRateIsZero", "inputs": [] }, { "type": "error", - "name": "NotActionableBlock", + "name": "NotAContract", "inputs": [] }, { @@ -888,6 +1176,11 @@ "name": "NotEnoughBalance", "inputs": [] }, + { + "type": "error", + "name": "NotEnoughBoostedBalance", + "inputs": [] + }, { "type": "error", "name": "NotEnoughTime", @@ -895,12 +1188,12 @@ }, { "type": "error", - "name": "NotFeeCollector", + "name": "NotFactoryVault", "inputs": [] }, { "type": "error", - "name": "NotFriendOfTheChef", + "name": "NotFeeCollector", "inputs": [] }, { @@ -910,12 +1203,17 @@ }, { "type": "error", - "name": "NotOperator", + "name": "NotIncentiveManager", "inputs": [] }, { "type": "error", - "name": "NotProver", + "name": "NotNewOperator", + "inputs": [] + }, + { + "type": "error", + "name": "NotOperator", "inputs": [] }, { @@ -925,27 +1223,27 @@ }, { "type": "error", - "name": "NotValidatorOrOperator", + "name": "NotWhitelistedVault", "inputs": [] }, { "type": "error", - "name": "PayoutAmountIsZero", + "name": "OperatorAlreadySet", "inputs": [] }, { "type": "error", - "name": "PayoutTokenIsZero", + "name": "PayoutAmountIsZero", "inputs": [] }, { "type": "error", - "name": "QueuedCuttingBoardNotFound", + "name": "RewardAllocationAlreadyQueued", "inputs": [] }, { "type": "error", - "name": "QueuedCuttingBoardNotReady", + "name": "RewardAllocationBlockDelayTooLarge", "inputs": [] }, { @@ -955,7 +1253,7 @@ }, { "type": "error", - "name": "RewardCycleStarted", + "name": "RewardsDurationIsZero", "inputs": [] }, { @@ -963,6 +1261,11 @@ "name": "StakeAmountIsZero", "inputs": [] }, + { + "type": "error", + "name": "TimestampAlreadyProcessed", + "inputs": [] + }, { "type": "error", "name": "TokenAlreadyWhitelistedOrLimitReached", @@ -983,17 +1286,6 @@ "name": "TotalSupplyOverflow", "inputs": [] }, - { - "type": "error", - "name": "Unauthorized", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ] - }, { "type": "error", "name": "VaultAlreadyExists", @@ -1008,5 +1300,15 @@ "type": "error", "name": "ZeroAddress", "inputs": [] + }, + { + "type": "error", + "name": "ZeroOperatorOnFirstDeposit", + "inputs": [] + }, + { + "type": "error", + "name": "ZeroPercentageWeight", + "inputs": [] } ] diff --git a/core/BerachainRewardsVaultFactory.json b/core/RewardVaultFactory.json similarity index 61% rename from core/BerachainRewardsVaultFactory.json rename to core/RewardVaultFactory.json index e54f3d5..4bb7a34 100644 --- a/core/BerachainRewardsVaultFactory.json +++ b/core/RewardVaultFactory.json @@ -1,4 +1,17 @@ [ + { + "type": "function", + "name": "VAULT_MANAGER_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, { "type": "function", "name": "allVaultsLength", @@ -14,7 +27,7 @@ }, { "type": "function", - "name": "createRewardsVault", + "name": "createRewardVault", "inputs": [ { "name": "stakingToken", @@ -52,7 +65,7 @@ }, { "type": "function", - "name": "predictRewardsVaultAddress", + "name": "predictRewardVaultAddress", "inputs": [ { "name": "stakingToken", @@ -69,6 +82,38 @@ ], "stateMutability": "view" }, + { + "type": "function", + "name": "setRewardVaultImplementation", + "inputs": [ + { + "name": "_vaultImpl", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "UpdateRewardVaultImplementation", + "inputs": [ + { + "name": "oldVaultImpl", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "newVaultImpl", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, { "type": "event", "name": "VaultCreated", @@ -100,27 +145,42 @@ }, { "type": "error", - "name": "BlockDoesNotExist", + "name": "CannotRecoverIncentiveToken", "inputs": [] }, { "type": "error", - "name": "BlockNotInBuffer", + "name": "CannotRecoverRewardToken", "inputs": [] }, { "type": "error", - "name": "CannotRecoverRewardToken", + "name": "CannotRecoverStakingToken", "inputs": [] }, { "type": "error", - "name": "CannotRecoverStakingToken", + "name": "DepositNotMultipleOfGwei", + "inputs": [] + }, + { + "type": "error", + "name": "DepositValueTooHigh", + "inputs": [] + }, + { + "type": "error", + "name": "DonateAmountLessThanPayoutAmount", + "inputs": [] + }, + { + "type": "error", + "name": "IncentiveRateTooHigh", "inputs": [] }, { "type": "error", - "name": "DelegateStakedOverflow", + "name": "IndexOutOfRange", "inputs": [] }, { @@ -133,6 +193,11 @@ "name": "InsufficientDelegateStake", "inputs": [] }, + { + "type": "error", + "name": "InsufficientDeposit", + "inputs": [] + }, { "type": "error", "name": "InsufficientSelfStake", @@ -145,12 +210,27 @@ }, { "type": "error", - "name": "InvalidCommission", + "name": "InvalidActivateBoostDelay", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidBaseRate", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidBoostMultiplier", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidCredentialsLength", "inputs": [] }, { "type": "error", - "name": "InvalidCuttingBoardWeights", + "name": "InvalidDropBoostDelay", "inputs": [] }, { @@ -160,7 +240,42 @@ }, { "type": "error", - "name": "InvalidMinter", + "name": "InvalidMinBoostedRewardRate", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidProof", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidPubKeyLength", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidRewardAllocationWeights", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidRewardConvexity", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidRewardRate", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidRewardVaultAddress", + "inputs": [] + }, + { + "type": "error", + "name": "InvalidSignatureLength", "inputs": [] }, { @@ -168,6 +283,11 @@ "name": "InvalidStartBlock", "inputs": [] }, + { + "type": "error", + "name": "InvalidateDefaultRewardAllocation", + "inputs": [] + }, { "type": "error", "name": "InvariantCheckFailed", @@ -175,17 +295,17 @@ }, { "type": "error", - "name": "MaxNumWeightsPerCuttingBoardIsZero", + "name": "MaxNumWeightsPerRewardAllocationIsZero", "inputs": [] }, { "type": "error", - "name": "NoWhitelistedTokens", + "name": "MinIncentiveRateIsZero", "inputs": [] }, { "type": "error", - "name": "NotActionableBlock", + "name": "NotAContract", "inputs": [] }, { @@ -218,6 +338,11 @@ "name": "NotEnoughBalance", "inputs": [] }, + { + "type": "error", + "name": "NotEnoughBoostedBalance", + "inputs": [] + }, { "type": "error", "name": "NotEnoughTime", @@ -225,12 +350,12 @@ }, { "type": "error", - "name": "NotFeeCollector", + "name": "NotFactoryVault", "inputs": [] }, { "type": "error", - "name": "NotFriendOfTheChef", + "name": "NotFeeCollector", "inputs": [] }, { @@ -240,12 +365,17 @@ }, { "type": "error", - "name": "NotOperator", + "name": "NotIncentiveManager", "inputs": [] }, { "type": "error", - "name": "NotProver", + "name": "NotNewOperator", + "inputs": [] + }, + { + "type": "error", + "name": "NotOperator", "inputs": [] }, { @@ -255,27 +385,27 @@ }, { "type": "error", - "name": "NotValidatorOrOperator", + "name": "NotWhitelistedVault", "inputs": [] }, { "type": "error", - "name": "PayoutAmountIsZero", + "name": "OperatorAlreadySet", "inputs": [] }, { "type": "error", - "name": "PayoutTokenIsZero", + "name": "PayoutAmountIsZero", "inputs": [] }, { "type": "error", - "name": "QueuedCuttingBoardNotFound", + "name": "RewardAllocationAlreadyQueued", "inputs": [] }, { "type": "error", - "name": "QueuedCuttingBoardNotReady", + "name": "RewardAllocationBlockDelayTooLarge", "inputs": [] }, { @@ -285,7 +415,7 @@ }, { "type": "error", - "name": "RewardCycleStarted", + "name": "RewardsDurationIsZero", "inputs": [] }, { @@ -293,6 +423,11 @@ "name": "StakeAmountIsZero", "inputs": [] }, + { + "type": "error", + "name": "TimestampAlreadyProcessed", + "inputs": [] + }, { "type": "error", "name": "TokenAlreadyWhitelistedOrLimitReached", @@ -313,17 +448,6 @@ "name": "TotalSupplyOverflow", "inputs": [] }, - { - "type": "error", - "name": "Unauthorized", - "inputs": [ - { - "name": "", - "type": "address", - "internalType": "address" - } - ] - }, { "type": "error", "name": "VaultAlreadyExists", @@ -338,5 +462,15 @@ "type": "error", "name": "ZeroAddress", "inputs": [] + }, + { + "type": "error", + "name": "ZeroOperatorOnFirstDeposit", + "inputs": [] + }, + { + "type": "error", + "name": "ZeroPercentageWeight", + "inputs": [] } ] diff --git a/core/StakingRewards.json b/core/StakingRewards.json index c3041e1..a6a1bd0 100644 --- a/core/StakingRewards.json +++ b/core/StakingRewards.json @@ -1,30 +1,4 @@ [ - { - "type": "function", - "name": "REWARD_TOKEN", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IERC20" - } - ], - "stateMutability": "view" - }, - { - "type": "function", - "name": "STAKE_TOKEN", - "inputs": [], - "outputs": [ - { - "name": "", - "type": "address", - "internalType": "contract IERC20" - } - ], - "stateMutability": "view" - }, { "type": "function", "name": "balanceOf", @@ -231,19 +205,6 @@ ], "stateMutability": "view" }, - { - "type": "event", - "name": "Initialized", - "inputs": [ - { - "name": "version", - "type": "uint64", - "indexed": false, - "internalType": "uint64" - } - ], - "anonymous": false - }, { "type": "event", "name": "RewardAdded", @@ -343,16 +304,6 @@ "name": "InsufficientStake", "inputs": [] }, - { - "type": "error", - "name": "InvalidInitialization", - "inputs": [] - }, - { - "type": "error", - "name": "NotInitializing", - "inputs": [] - }, { "type": "error", "name": "RewardCycleNotEnded", From 29090a204413b813f3e96cafc7c5d81dfdbfac3a Mon Sep 17 00:00:00 2001 From: Larry the Cucumber Date: Wed, 4 Dec 2024 14:03:29 -0500 Subject: [PATCH 3/3] add bex contracts --- bex/IAuthentication.abi.json | 21 + bex/IAuthorizer.abi.json | 31 + bex/IAuthorizerAdaptor.abi.json | 71 + bex/IAuthorizerAdaptorEntrypoint.abi.json | 84 + bex/IBalancerMinter.abi.json | 303 ++++ bex/IBalancerQueries.abi.json | 285 +++ bex/IBalancerRelayer.abi.json | 79 + bex/IBalancerToken.abi.json | 371 ++++ bex/IBasePool.abi.json | 257 +++ bex/IBasePoolController.abi.json | 15 + bex/IBasePoolFactory.abi.json | 60 + ...mposableStablePoolFactoryCreateV6.abi.json | 66 + bex/IComposableStablePoolRates.abi.json | 33 + bex/IExternalWeightedMath.abi.json | 674 +++++++ bex/IFeeDistributor.abi.json | 362 ++++ bex/IFlashLoanRecipient.abi.json | 30 + bex/IGeneralPool.abi.json | 338 ++++ bex/ILinearPool.abi.json | 371 ++++ bex/IManagedPool.abi.json | 912 ++++++++++ bex/IMinimalSwapInfoPool.abi.json | 333 ++++ bex/IProtocolFeePercentagesProvider.abi.json | 192 ++ bex/IProtocolFeeSplitter.abi.json | 307 ++++ bex/IProtocolFeesCollector.abi.json | 148 ++ bex/IProtocolFeesWithdrawer.abi.json | 290 +++ bex/IRateProvider.abi.json | 15 + bex/IRateProviderPool.abi.json | 15 + bex/ITimelockAuthorizer.abi.json | 1552 +++++++++++++++++ bex/IVault.abi.json | 1149 ++++++++++++ 28 files changed, 8364 insertions(+) create mode 100644 bex/IAuthentication.abi.json create mode 100644 bex/IAuthorizer.abi.json create mode 100644 bex/IAuthorizerAdaptor.abi.json create mode 100644 bex/IAuthorizerAdaptorEntrypoint.abi.json create mode 100644 bex/IBalancerMinter.abi.json create mode 100644 bex/IBalancerQueries.abi.json create mode 100644 bex/IBalancerRelayer.abi.json create mode 100644 bex/IBalancerToken.abi.json create mode 100644 bex/IBasePool.abi.json create mode 100644 bex/IBasePoolController.abi.json create mode 100644 bex/IBasePoolFactory.abi.json create mode 100644 bex/IComposableStablePoolFactoryCreateV6.abi.json create mode 100644 bex/IComposableStablePoolRates.abi.json create mode 100644 bex/IExternalWeightedMath.abi.json create mode 100644 bex/IFeeDistributor.abi.json create mode 100644 bex/IFlashLoanRecipient.abi.json create mode 100644 bex/IGeneralPool.abi.json create mode 100644 bex/ILinearPool.abi.json create mode 100644 bex/IManagedPool.abi.json create mode 100644 bex/IMinimalSwapInfoPool.abi.json create mode 100644 bex/IProtocolFeePercentagesProvider.abi.json create mode 100644 bex/IProtocolFeeSplitter.abi.json create mode 100644 bex/IProtocolFeesCollector.abi.json create mode 100644 bex/IProtocolFeesWithdrawer.abi.json create mode 100644 bex/IRateProvider.abi.json create mode 100644 bex/IRateProviderPool.abi.json create mode 100644 bex/ITimelockAuthorizer.abi.json create mode 100644 bex/IVault.abi.json diff --git a/bex/IAuthentication.abi.json b/bex/IAuthentication.abi.json new file mode 100644 index 0000000..52ce9c2 --- /dev/null +++ b/bex/IAuthentication.abi.json @@ -0,0 +1,21 @@ +[ + { + "type": "function", + "name": "getActionId", + "inputs": [ + { + "name": "selector", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + } +] \ No newline at end of file diff --git a/bex/IAuthorizer.abi.json b/bex/IAuthorizer.abi.json new file mode 100644 index 0000000..e56b217 --- /dev/null +++ b/bex/IAuthorizer.abi.json @@ -0,0 +1,31 @@ +[ + { + "type": "function", + "name": "canPerform", + "inputs": [ + { + "name": "actionId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "where", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + } +] \ No newline at end of file diff --git a/bex/IAuthorizerAdaptor.abi.json b/bex/IAuthorizerAdaptor.abi.json new file mode 100644 index 0000000..bdbe832 --- /dev/null +++ b/bex/IAuthorizerAdaptor.abi.json @@ -0,0 +1,71 @@ +[ + { + "type": "function", + "name": "getActionId", + "inputs": [ + { + "name": "selector", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getAuthorizer", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IAuthorizer" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getVault", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IVault" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "performAction", + "inputs": [ + { + "name": "target", + "type": "address", + "internalType": "address" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "stateMutability": "payable" + } +] \ No newline at end of file diff --git a/bex/IAuthorizerAdaptorEntrypoint.abi.json b/bex/IAuthorizerAdaptorEntrypoint.abi.json new file mode 100644 index 0000000..57c6084 --- /dev/null +++ b/bex/IAuthorizerAdaptorEntrypoint.abi.json @@ -0,0 +1,84 @@ +[ + { + "type": "function", + "name": "getActionId", + "inputs": [ + { + "name": "selector", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getAuthorizer", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IAuthorizer" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getAuthorizerAdaptor", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IAuthorizerAdaptor" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getVault", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IVault" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "performAction", + "inputs": [ + { + "name": "target", + "type": "address", + "internalType": "address" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes", + "internalType": "bytes" + } + ], + "stateMutability": "payable" + } +] \ No newline at end of file diff --git a/bex/IBalancerMinter.abi.json b/bex/IBalancerMinter.abi.json new file mode 100644 index 0000000..4fb7cc9 --- /dev/null +++ b/bex/IBalancerMinter.abi.json @@ -0,0 +1,303 @@ +[ + { + "type": "function", + "name": "allowed_to_mint_for", + "inputs": [ + { + "name": "minter", + "type": "address", + "internalType": "address" + }, + { + "name": "user", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getBalancerToken", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IERC20" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getMinterApproval", + "inputs": [ + { + "name": "minter", + "type": "address", + "internalType": "address" + }, + { + "name": "user", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "mint", + "inputs": [ + { + "name": "gauge", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "mintFor", + "inputs": [ + { + "name": "gauge", + "type": "address", + "internalType": "address" + }, + { + "name": "user", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "mintMany", + "inputs": [ + { + "name": "gauges", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "mintManyFor", + "inputs": [ + { + "name": "gauges", + "type": "address[]", + "internalType": "address[]" + }, + { + "name": "user", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "mint_for", + "inputs": [ + { + "name": "gauge", + "type": "address", + "internalType": "address" + }, + { + "name": "user", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "mint_many", + "inputs": [ + { + "name": "gauges", + "type": "address[8]", + "internalType": "address[8]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "minted", + "inputs": [ + { + "name": "user", + "type": "address", + "internalType": "address" + }, + { + "name": "gauge", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "setMinterApproval", + "inputs": [ + { + "name": "minter", + "type": "address", + "internalType": "address" + }, + { + "name": "approval", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setMinterApprovalWithSignature", + "inputs": [ + { + "name": "minter", + "type": "address", + "internalType": "address" + }, + { + "name": "approval", + "type": "bool", + "internalType": "bool" + }, + { + "name": "user", + "type": "address", + "internalType": "address" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "v", + "type": "uint8", + "internalType": "uint8" + }, + { + "name": "r", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "s", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "toggle_approve_mint", + "inputs": [ + { + "name": "minter", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "Minted", + "inputs": [ + { + "name": "recipient", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "gauge", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "minted", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + } +] \ No newline at end of file diff --git a/bex/IBalancerQueries.abi.json b/bex/IBalancerQueries.abi.json new file mode 100644 index 0000000..82396f4 --- /dev/null +++ b/bex/IBalancerQueries.abi.json @@ -0,0 +1,285 @@ +[ + { + "type": "function", + "name": "queryBatchSwap", + "inputs": [ + { + "name": "kind", + "type": "uint8", + "internalType": "enum IVault.SwapKind" + }, + { + "name": "swaps", + "type": "tuple[]", + "internalType": "struct IVault.BatchSwapStep[]", + "components": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "assetInIndex", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "assetOutIndex", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "assets", + "type": "address[]", + "internalType": "contract IAsset[]" + }, + { + "name": "funds", + "type": "tuple", + "internalType": "struct IVault.FundManagement", + "components": [ + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "fromInternalBalance", + "type": "bool", + "internalType": "bool" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address payable" + }, + { + "name": "toInternalBalance", + "type": "bool", + "internalType": "bool" + } + ] + } + ], + "outputs": [ + { + "name": "assetDeltas", + "type": "int256[]", + "internalType": "int256[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "queryExit", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "request", + "type": "tuple", + "internalType": "struct IVault.ExitPoolRequest", + "components": [ + { + "name": "assets", + "type": "address[]", + "internalType": "contract IAsset[]" + }, + { + "name": "minAmountsOut", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "toInternalBalance", + "type": "bool", + "internalType": "bool" + } + ] + } + ], + "outputs": [ + { + "name": "bptIn", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "amountsOut", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "queryJoin", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "request", + "type": "tuple", + "internalType": "struct IVault.JoinPoolRequest", + "components": [ + { + "name": "assets", + "type": "address[]", + "internalType": "contract IAsset[]" + }, + { + "name": "maxAmountsIn", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "fromInternalBalance", + "type": "bool", + "internalType": "bool" + } + ] + } + ], + "outputs": [ + { + "name": "bptOut", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "amountsIn", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "querySwap", + "inputs": [ + { + "name": "singleSwap", + "type": "tuple", + "internalType": "struct IVault.SingleSwap", + "components": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "kind", + "type": "uint8", + "internalType": "enum IVault.SwapKind" + }, + { + "name": "assetIn", + "type": "address", + "internalType": "contract IAsset" + }, + { + "name": "assetOut", + "type": "address", + "internalType": "contract IAsset" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "funds", + "type": "tuple", + "internalType": "struct IVault.FundManagement", + "components": [ + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "fromInternalBalance", + "type": "bool", + "internalType": "bool" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address payable" + }, + { + "name": "toInternalBalance", + "type": "bool", + "internalType": "bool" + } + ] + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + } +] \ No newline at end of file diff --git a/bex/IBalancerRelayer.abi.json b/bex/IBalancerRelayer.abi.json new file mode 100644 index 0000000..3f277f6 --- /dev/null +++ b/bex/IBalancerRelayer.abi.json @@ -0,0 +1,79 @@ +[ + { + "type": "function", + "name": "getLibrary", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getQueryLibrary", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getVault", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IVault" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "multicall", + "inputs": [ + { + "name": "data", + "type": "bytes[]", + "internalType": "bytes[]" + } + ], + "outputs": [ + { + "name": "results", + "type": "bytes[]", + "internalType": "bytes[]" + } + ], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "vaultActionsQueryMulticall", + "inputs": [ + { + "name": "data", + "type": "bytes[]", + "internalType": "bytes[]" + } + ], + "outputs": [ + { + "name": "results", + "type": "bytes[]", + "internalType": "bytes[]" + } + ], + "stateMutability": "nonpayable" + } +] \ No newline at end of file diff --git a/bex/IBalancerToken.abi.json b/bex/IBalancerToken.abi.json new file mode 100644 index 0000000..322e3f0 --- /dev/null +++ b/bex/IBalancerToken.abi.json @@ -0,0 +1,371 @@ +[ + { + "type": "function", + "name": "DEFAULT_ADMIN_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "MINTER_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "SNAPSHOT_ROLE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "allowance", + "inputs": [ + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "spender", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "approve", + "inputs": [ + { + "name": "spender", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "balanceOf", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleAdmin", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMember", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoleMemberCount", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "mint", + "inputs": [ + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokeRole", + "inputs": [ + { + "name": "role", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "snapshot", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "totalSupply", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "transfer", + "inputs": [ + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "transferFrom", + "inputs": [ + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "Approval", + "inputs": [ + { + "name": "owner", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "spender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Transfer", + "inputs": [ + { + "name": "from", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "value", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + } +] \ No newline at end of file diff --git a/bex/IBasePool.abi.json b/bex/IBasePool.abi.json new file mode 100644 index 0000000..2452b5d --- /dev/null +++ b/bex/IBasePool.abi.json @@ -0,0 +1,257 @@ +[ + { + "type": "function", + "name": "getPoolId", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getScalingFactors", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getSwapFeePercentage", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "onExitPool", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "balances", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "lastChangeBlock", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "protocolSwapFeePercentage", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "amountsOut", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "dueProtocolFeeAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "onJoinPool", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "balances", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "lastChangeBlock", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "protocolSwapFeePercentage", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "amountsIn", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "dueProtocolFeeAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "queryExit", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "balances", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "lastChangeBlock", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "protocolSwapFeePercentage", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "bptIn", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "amountsOut", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "queryJoin", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "balances", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "lastChangeBlock", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "protocolSwapFeePercentage", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "bptOut", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "amountsIn", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "nonpayable" + } +] \ No newline at end of file diff --git a/bex/IBasePoolController.abi.json b/bex/IBasePoolController.abi.json new file mode 100644 index 0000000..52f4877 --- /dev/null +++ b/bex/IBasePoolController.abi.json @@ -0,0 +1,15 @@ +[ + { + "type": "function", + "name": "initialize", + "inputs": [ + { + "name": "poolAddress", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + } +] \ No newline at end of file diff --git a/bex/IBasePoolFactory.abi.json b/bex/IBasePoolFactory.abi.json new file mode 100644 index 0000000..8e085c5 --- /dev/null +++ b/bex/IBasePoolFactory.abi.json @@ -0,0 +1,60 @@ +[ + { + "type": "function", + "name": "disable", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getActionId", + "inputs": [ + { + "name": "selector", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isDisabled", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isPoolFromFactory", + "inputs": [ + { + "name": "pool", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + } +] \ No newline at end of file diff --git a/bex/IComposableStablePoolFactoryCreateV6.abi.json b/bex/IComposableStablePoolFactoryCreateV6.abi.json new file mode 100644 index 0000000..b426441 --- /dev/null +++ b/bex/IComposableStablePoolFactoryCreateV6.abi.json @@ -0,0 +1,66 @@ +[ + { + "type": "function", + "name": "create", + "inputs": [ + { + "name": "name", + "type": "string", + "internalType": "string" + }, + { + "name": "symbol", + "type": "string", + "internalType": "string" + }, + { + "name": "tokens", + "type": "address[]", + "internalType": "contract IERC20[]" + }, + { + "name": "amplificationParameter", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "rateProviders", + "type": "address[]", + "internalType": "contract IRateProvider[]" + }, + { + "name": "tokenRateCacheDurations", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "exemptFromYieldProtocolFeeFlag", + "type": "bool", + "internalType": "bool" + }, + { + "name": "swapFeePercentage", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "owner", + "type": "address", + "internalType": "address" + }, + { + "name": "salt", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "nonpayable" + } +] \ No newline at end of file diff --git a/bex/IComposableStablePoolRates.abi.json b/bex/IComposableStablePoolRates.abi.json new file mode 100644 index 0000000..2e88d9a --- /dev/null +++ b/bex/IComposableStablePoolRates.abi.json @@ -0,0 +1,33 @@ +[ + { + "type": "function", + "name": "setTokenRateCacheDuration", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "duration", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "updateTokenRateCache", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + } +] \ No newline at end of file diff --git a/bex/IExternalWeightedMath.abi.json b/bex/IExternalWeightedMath.abi.json new file mode 100644 index 0000000..b52af0c --- /dev/null +++ b/bex/IExternalWeightedMath.abi.json @@ -0,0 +1,674 @@ +[ + { + "type": "function", + "name": "calcAllTokensInGivenExactBptOut", + "inputs": [ + { + "name": "balances", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "bptAmountOut", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "totalBPT", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "calcBptInGivenExactTokenOut", + "inputs": [ + { + "name": "balance", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "normalizedWeight", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "bptTotalSupply", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapFeePercentage", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "calcBptInGivenExactTokensOut", + "inputs": [ + { + "name": "balances", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "normalizedWeights", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "amountsOut", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "bptTotalSupply", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapFeePercentage", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "calcBptOutAddToken", + "inputs": [ + { + "name": "totalSupply", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "normalizedWeight", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "calcBptOutGivenExactTokenIn", + "inputs": [ + { + "name": "balance", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "normalizedWeight", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "amountIn", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "bptTotalSupply", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapFeePercentage", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "calcBptOutGivenExactTokensIn", + "inputs": [ + { + "name": "balances", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "normalizedWeights", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "amountsIn", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "bptTotalSupply", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapFeePercentage", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "calcInGivenOut", + "inputs": [ + { + "name": "balanceIn", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "weightIn", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "balanceOut", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "weightOut", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "amountOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "calcOutGivenIn", + "inputs": [ + { + "name": "balanceIn", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "weightIn", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "balanceOut", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "weightOut", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "amountIn", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "calcTokenInGivenExactBptOut", + "inputs": [ + { + "name": "balance", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "normalizedWeight", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "bptAmountOut", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "bptTotalSupply", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapFeePercentage", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "calcTokenOutGivenExactBptIn", + "inputs": [ + { + "name": "balance", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "normalizedWeight", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "bptAmountIn", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "bptTotalSupply", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapFeePercentage", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "calcTokensOutGivenExactBptIn", + "inputs": [ + { + "name": "balances", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "bptAmountIn", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "totalBPT", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "calculateInvariant", + "inputs": [ + { + "name": "normalizedWeights", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "balances", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "exitBPTInForExactTokensOut", + "inputs": [ + { + "name": "balances", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "normalizedWeights", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "scalingFactors", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "totalSupply", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapFeePercentage", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "exitExactBPTInForTokenOut", + "inputs": [ + { + "name": "balances", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "normalizedWeights", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "totalSupply", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapFeePercentage", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "exitExactBPTInForTokensOut", + "inputs": [ + { + "name": "balances", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "totalSupply", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "bptAmountIn", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "amountsOut", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "joinAllTokensInForExactBPTOut", + "inputs": [ + { + "name": "balances", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "totalSupply", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "bptAmountOut", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "amountsIn", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "joinExactTokensInForBPTOut", + "inputs": [ + { + "name": "balances", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "normalizedWeights", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "scalingFactors", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "totalSupply", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapFeePercentage", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "pure" + }, + { + "type": "function", + "name": "joinTokenInForExactBPTOut", + "inputs": [ + { + "name": "balances", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "normalizedWeights", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "totalSupply", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "swapFeePercentage", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "pure" + } +] \ No newline at end of file diff --git a/bex/IFeeDistributor.abi.json b/bex/IFeeDistributor.abi.json new file mode 100644 index 0000000..d77eefc --- /dev/null +++ b/bex/IFeeDistributor.abi.json @@ -0,0 +1,362 @@ +[ + { + "type": "function", + "name": "checkpoint", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "checkpointToken", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "checkpointTokens", + "inputs": [ + { + "name": "tokens", + "type": "address[]", + "internalType": "contract IERC20[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "checkpointUser", + "inputs": [ + { + "name": "user", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "claimToken", + "inputs": [ + { + "name": "user", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "claimTokens", + "inputs": [ + { + "name": "user", + "type": "address", + "internalType": "address" + }, + { + "name": "tokens", + "type": "address[]", + "internalType": "contract IERC20[]" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "depositToken", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "depositTokens", + "inputs": [ + { + "name": "tokens", + "type": "address[]", + "internalType": "contract IERC20[]" + }, + { + "name": "amounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getTimeCursor", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getTokenLastBalance", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getTokenTimeCursor", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getTokensDistributedInWeek", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "timestamp", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getTotalSupplyAtTimestamp", + "inputs": [ + { + "name": "timestamp", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getUserBalanceAtTimestamp", + "inputs": [ + { + "name": "user", + "type": "address", + "internalType": "address" + }, + { + "name": "timestamp", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getUserTimeCursor", + "inputs": [ + { + "name": "user", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getUserTokenTimeCursor", + "inputs": [ + { + "name": "user", + "type": "address", + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getVotingEscrow", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IVotingEscrow" + } + ], + "stateMutability": "view" + }, + { + "type": "event", + "name": "TokenCheckpointed", + "inputs": [ + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "lastCheckpointTimestamp", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokensClaimed", + "inputs": [ + { + "name": "user", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "userTokenTimeCursor", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + } +] \ No newline at end of file diff --git a/bex/IFlashLoanRecipient.abi.json b/bex/IFlashLoanRecipient.abi.json new file mode 100644 index 0000000..6bf2a64 --- /dev/null +++ b/bex/IFlashLoanRecipient.abi.json @@ -0,0 +1,30 @@ +[ + { + "type": "function", + "name": "receiveFlashLoan", + "inputs": [ + { + "name": "tokens", + "type": "address[]", + "internalType": "contract IERC20[]" + }, + { + "name": "amounts", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "feeAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + } +] \ No newline at end of file diff --git a/bex/IGeneralPool.abi.json b/bex/IGeneralPool.abi.json new file mode 100644 index 0000000..31bc2f6 --- /dev/null +++ b/bex/IGeneralPool.abi.json @@ -0,0 +1,338 @@ +[ + { + "type": "function", + "name": "getPoolId", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getScalingFactors", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getSwapFeePercentage", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "onExitPool", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "balances", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "lastChangeBlock", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "protocolSwapFeePercentage", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "amountsOut", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "dueProtocolFeeAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "onJoinPool", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "balances", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "lastChangeBlock", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "protocolSwapFeePercentage", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "amountsIn", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "dueProtocolFeeAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "onSwap", + "inputs": [ + { + "name": "swapRequest", + "type": "tuple", + "internalType": "struct IPoolSwapStructs.SwapRequest", + "components": [ + { + "name": "kind", + "type": "uint8", + "internalType": "enum IVault.SwapKind" + }, + { + "name": "tokenIn", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "lastChangeBlock", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "from", + "type": "address", + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "balances", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "indexIn", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "indexOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "queryExit", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "balances", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "lastChangeBlock", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "protocolSwapFeePercentage", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "bptIn", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "amountsOut", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "queryJoin", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "balances", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "lastChangeBlock", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "protocolSwapFeePercentage", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "bptOut", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "amountsIn", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "nonpayable" + } +] \ No newline at end of file diff --git a/bex/ILinearPool.abi.json b/bex/ILinearPool.abi.json new file mode 100644 index 0000000..142380b --- /dev/null +++ b/bex/ILinearPool.abi.json @@ -0,0 +1,371 @@ +[ + { + "type": "function", + "name": "getBptIndex", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getMainIndex", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getMainToken", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IERC20" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getPoolId", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getScalingFactors", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getSwapFeePercentage", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getTargets", + "inputs": [], + "outputs": [ + { + "name": "lowerTarget", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "upperTarget", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getWrappedIndex", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getWrappedToken", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IERC20" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "onExitPool", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "balances", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "lastChangeBlock", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "protocolSwapFeePercentage", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "amountsOut", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "dueProtocolFeeAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "onJoinPool", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "balances", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "lastChangeBlock", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "protocolSwapFeePercentage", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "amountsIn", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "dueProtocolFeeAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "queryExit", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "balances", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "lastChangeBlock", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "protocolSwapFeePercentage", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "bptIn", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "amountsOut", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "queryJoin", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "balances", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "lastChangeBlock", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "protocolSwapFeePercentage", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "bptOut", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "amountsIn", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setSwapFeePercentage", + "inputs": [ + { + "name": "swapFeePercentage", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setTargets", + "inputs": [ + { + "name": "newLowerTarget", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "newUpperTarget", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + } +] \ No newline at end of file diff --git a/bex/IManagedPool.abi.json b/bex/IManagedPool.abi.json new file mode 100644 index 0000000..2eb06a9 --- /dev/null +++ b/bex/IManagedPool.abi.json @@ -0,0 +1,912 @@ +[ + { + "type": "function", + "name": "addAllowedAddress", + "inputs": [ + { + "name": "member", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "addToken", + "inputs": [ + { + "name": "tokenToAdd", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "assetManager", + "type": "address", + "internalType": "address" + }, + { + "name": "tokenToAddNormalizedWeight", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "mintAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "collectAumManagementFees", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getActualSupply", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getCircuitBreakerState", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + } + ], + "outputs": [ + { + "name": "bptPrice", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "referenceWeight", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "lowerBound", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "upperBound", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "lowerBptPriceBound", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "upperBptPriceBound", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getGradualSwapFeeUpdateParams", + "inputs": [], + "outputs": [ + { + "name": "startTime", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "endTime", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "startSwapFeePercentage", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "endSwapFeePercentage", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getGradualWeightUpdateParams", + "inputs": [], + "outputs": [ + { + "name": "startTime", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "endTime", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "startWeights", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "endWeights", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getJoinExitEnabled", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getManagementAumFeeParams", + "inputs": [], + "outputs": [ + { + "name": "aumFeePercentage", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "lastCollectionTimestamp", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getMustAllowlistLPs", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getNormalizedWeights", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getPoolId", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getScalingFactors", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getSwapEnabled", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getSwapFeePercentage", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isAddressOnAllowlist", + "inputs": [ + { + "name": "member", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "onExitPool", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "balances", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "lastChangeBlock", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "protocolSwapFeePercentage", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "amountsOut", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "dueProtocolFeeAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "onJoinPool", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "balances", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "lastChangeBlock", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "protocolSwapFeePercentage", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "amountsIn", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "dueProtocolFeeAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "queryExit", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "balances", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "lastChangeBlock", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "protocolSwapFeePercentage", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "bptIn", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "amountsOut", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "queryJoin", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "balances", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "lastChangeBlock", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "protocolSwapFeePercentage", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "bptOut", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "amountsIn", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "removeAllowedAddress", + "inputs": [ + { + "name": "member", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "removeToken", + "inputs": [ + { + "name": "tokenToRemove", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "burnAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "sender", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setCircuitBreakers", + "inputs": [ + { + "name": "tokens", + "type": "address[]", + "internalType": "contract IERC20[]" + }, + { + "name": "bptPrices", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "lowerBoundPercentages", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "upperBoundPercentages", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setJoinExitEnabled", + "inputs": [ + { + "name": "joinExitEnabled", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setManagementAumFeePercentage", + "inputs": [ + { + "name": "managementAumFeePercentage", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setMustAllowlistLPs", + "inputs": [ + { + "name": "mustAllowlistLPs", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setSwapEnabled", + "inputs": [ + { + "name": "swapEnabled", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "updateSwapFeeGradually", + "inputs": [ + { + "name": "startTime", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "endTime", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "startSwapFeePercentage", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "endSwapFeePercentage", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "updateWeightsGradually", + "inputs": [ + { + "name": "startTime", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "endTime", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "tokens", + "type": "address[]", + "internalType": "contract IERC20[]" + }, + { + "name": "endWeights", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "AllowlistAddressAdded", + "inputs": [ + { + "name": "member", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "AllowlistAddressRemoved", + "inputs": [ + { + "name": "member", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "CircuitBreakerSet", + "inputs": [ + { + "name": "token", + "type": "address", + "indexed": true, + "internalType": "contract IERC20" + }, + { + "name": "bptPrice", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "lowerBoundPercentage", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "upperBoundPercentage", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "GradualSwapFeeUpdateScheduled", + "inputs": [ + { + "name": "startTime", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "endTime", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "startSwapFeePercentage", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "endSwapFeePercentage", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "GradualWeightUpdateScheduled", + "inputs": [ + { + "name": "startTime", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "endTime", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "startWeights", + "type": "uint256[]", + "indexed": false, + "internalType": "uint256[]" + }, + { + "name": "endWeights", + "type": "uint256[]", + "indexed": false, + "internalType": "uint256[]" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "JoinExitEnabledSet", + "inputs": [ + { + "name": "joinExitEnabled", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ManagementAumFeeCollected", + "inputs": [ + { + "name": "bptAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ManagementAumFeePercentageChanged", + "inputs": [ + { + "name": "managementAumFeePercentage", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "MustAllowlistLPsSet", + "inputs": [ + { + "name": "mustAllowlistLPs", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "SwapEnabledSet", + "inputs": [ + { + "name": "swapEnabled", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenAdded", + "inputs": [ + { + "name": "token", + "type": "address", + "indexed": true, + "internalType": "contract IERC20" + }, + { + "name": "normalizedWeight", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenRemoved", + "inputs": [ + { + "name": "token", + "type": "address", + "indexed": true, + "internalType": "contract IERC20" + } + ], + "anonymous": false + } +] \ No newline at end of file diff --git a/bex/IMinimalSwapInfoPool.abi.json b/bex/IMinimalSwapInfoPool.abi.json new file mode 100644 index 0000000..0d9d9c1 --- /dev/null +++ b/bex/IMinimalSwapInfoPool.abi.json @@ -0,0 +1,333 @@ +[ + { + "type": "function", + "name": "getPoolId", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getScalingFactors", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getSwapFeePercentage", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "onExitPool", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "balances", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "lastChangeBlock", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "protocolSwapFeePercentage", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "amountsOut", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "dueProtocolFeeAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "onJoinPool", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "balances", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "lastChangeBlock", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "protocolSwapFeePercentage", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "amountsIn", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "dueProtocolFeeAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "onSwap", + "inputs": [ + { + "name": "swapRequest", + "type": "tuple", + "internalType": "struct IPoolSwapStructs.SwapRequest", + "components": [ + { + "name": "kind", + "type": "uint8", + "internalType": "enum IVault.SwapKind" + }, + { + "name": "tokenIn", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "tokenOut", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "lastChangeBlock", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "from", + "type": "address", + "internalType": "address" + }, + { + "name": "to", + "type": "address", + "internalType": "address" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "currentBalanceTokenIn", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "currentBalanceTokenOut", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "queryExit", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "balances", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "lastChangeBlock", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "protocolSwapFeePercentage", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "bptIn", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "amountsOut", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "queryJoin", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "balances", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "lastChangeBlock", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "protocolSwapFeePercentage", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [ + { + "name": "bptOut", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "amountsIn", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "nonpayable" + } +] \ No newline at end of file diff --git a/bex/IProtocolFeePercentagesProvider.abi.json b/bex/IProtocolFeePercentagesProvider.abi.json new file mode 100644 index 0000000..94cd877 --- /dev/null +++ b/bex/IProtocolFeePercentagesProvider.abi.json @@ -0,0 +1,192 @@ +[ + { + "type": "function", + "name": "getFeeTypeMaximumPercentage", + "inputs": [ + { + "name": "feeType", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getFeeTypeName", + "inputs": [ + { + "name": "feeType", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "string", + "internalType": "string" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getFeeTypePercentage", + "inputs": [ + { + "name": "feeType", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isValidFeeType", + "inputs": [ + { + "name": "feeType", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isValidFeeTypePercentage", + "inputs": [ + { + "name": "feeType", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "value", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "registerFeeType", + "inputs": [ + { + "name": "feeType", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "name", + "type": "string", + "internalType": "string" + }, + { + "name": "maximumValue", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "initialValue", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setFeeTypePercentage", + "inputs": [ + { + "name": "feeType", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "newValue", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "ProtocolFeePercentageChanged", + "inputs": [ + { + "name": "feeType", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "percentage", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ProtocolFeeTypeRegistered", + "inputs": [ + { + "name": "feeType", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "name", + "type": "string", + "indexed": false, + "internalType": "string" + }, + { + "name": "maximumPercentage", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + } +] \ No newline at end of file diff --git a/bex/IProtocolFeeSplitter.abi.json b/bex/IProtocolFeeSplitter.abi.json new file mode 100644 index 0000000..d36d1b6 --- /dev/null +++ b/bex/IProtocolFeeSplitter.abi.json @@ -0,0 +1,307 @@ +[ + { + "type": "function", + "name": "clearRevenueSharePercentage", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "collectFees", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "beneficiaryAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "daoAmount", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getAmounts", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "beneficiaryAmount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "daoAmount", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getDaoFundsRecipient", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getDefaultRevenueSharePercentage", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getProtocolFeesWithdrawer", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IProtocolFeesWithdrawer" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRevenueShareSettings", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "revenueSharePercentageOverride", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "beneficiary", + "type": "address", + "internalType": "address" + }, + { + "name": "overrideSet", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "setDaoFundsRecipient", + "inputs": [ + { + "name": "newDaoFundsRecipient", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setDefaultRevenueSharePercentage", + "inputs": [ + { + "name": "defaultRevenueSharePercentage", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setPoolBeneficiary", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "newBeneficiary", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setRevenueSharePercentage", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "revenueSharePercentage", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "DAOFundsRecipientChanged", + "inputs": [ + { + "name": "newDaoFundsRecipient", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "DefaultRevenueSharePercentageChanged", + "inputs": [ + { + "name": "revenueSharePercentage", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "FeesCollected", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "beneficiary", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "poolEarned", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "daoFundsRecipient", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "daoEarned", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PoolBeneficiaryChanged", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newBeneficiary", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PoolRevenueShareChanged", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "revenueSharePercentage", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PoolRevenueShareCleared", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + } + ], + "anonymous": false + } +] \ No newline at end of file diff --git a/bex/IProtocolFeesCollector.abi.json b/bex/IProtocolFeesCollector.abi.json new file mode 100644 index 0000000..29e297b --- /dev/null +++ b/bex/IProtocolFeesCollector.abi.json @@ -0,0 +1,148 @@ +[ + { + "type": "function", + "name": "getAuthorizer", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IAuthorizer" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getCollectedFeeAmounts", + "inputs": [ + { + "name": "tokens", + "type": "address[]", + "internalType": "contract IERC20[]" + } + ], + "outputs": [ + { + "name": "feeAmounts", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getFlashLoanFeePercentage", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getSwapFeePercentage", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "setFlashLoanFeePercentage", + "inputs": [ + { + "name": "newFlashLoanFeePercentage", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setSwapFeePercentage", + "inputs": [ + { + "name": "newSwapFeePercentage", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "vault", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IVault" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "withdrawCollectedFees", + "inputs": [ + { + "name": "tokens", + "type": "address[]", + "internalType": "contract IERC20[]" + }, + { + "name": "amounts", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "FlashLoanFeePercentageChanged", + "inputs": [ + { + "name": "newFlashLoanFeePercentage", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "SwapFeePercentageChanged", + "inputs": [ + { + "name": "newSwapFeePercentage", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + } +] \ No newline at end of file diff --git a/bex/IProtocolFeesWithdrawer.abi.json b/bex/IProtocolFeesWithdrawer.abi.json new file mode 100644 index 0000000..c964b43 --- /dev/null +++ b/bex/IProtocolFeesWithdrawer.abi.json @@ -0,0 +1,290 @@ +[ + { + "type": "function", + "name": "allowlistToken", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "denylistToken", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "distributeAndWithdrawCollectedFees", + "inputs": [ + { + "name": "tokens", + "type": "address[]", + "internalType": "contract IERC20[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "feeReceiver", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getDenylistedToken", + "inputs": [ + { + "name": "index", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IERC20" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getDenylistedTokensLength", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getProtocolFeesCollector", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IProtocolFeesCollector" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isWithdrawableToken", + "inputs": [ + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isWithdrawableTokens", + "inputs": [ + { + "name": "tokens", + "type": "address[]", + "internalType": "contract IERC20[]" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "polFeeCollector", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "polFeeCollectorPercentage", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "setFeeReceiver", + "inputs": [ + { + "name": "_feeReceiver", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setPOLFeeCollector", + "inputs": [ + { + "name": "_polFeeCollector", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setPOLFeeCollectorPercentage", + "inputs": [ + { + "name": "_polFeeCollectorPercentage", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "withdrawCollectedFees", + "inputs": [ + { + "name": "tokens", + "type": "address[]", + "internalType": "contract IERC20[]" + }, + { + "name": "amounts", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "FeeReceiverChanged", + "inputs": [ + { + "name": "newFeeReceiver", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "POLFeeCollectorChanged", + "inputs": [ + { + "name": "newPOLFeeCollector", + "type": "address", + "indexed": false, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "POLFeeCollectorPercentageChanged", + "inputs": [ + { + "name": "newPolFeeCollectorPercentage", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenAllowlisted", + "inputs": [ + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokenDenylisted", + "inputs": [ + { + "name": "token", + "type": "address", + "indexed": false, + "internalType": "contract IERC20" + } + ], + "anonymous": false + } +] \ No newline at end of file diff --git a/bex/IRateProvider.abi.json b/bex/IRateProvider.abi.json new file mode 100644 index 0000000..d183219 --- /dev/null +++ b/bex/IRateProvider.abi.json @@ -0,0 +1,15 @@ +[ + { + "type": "function", + "name": "getRate", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + } +] \ No newline at end of file diff --git a/bex/IRateProviderPool.abi.json b/bex/IRateProviderPool.abi.json new file mode 100644 index 0000000..a802699 --- /dev/null +++ b/bex/IRateProviderPool.abi.json @@ -0,0 +1,15 @@ +[ + { + "type": "function", + "name": "getRateProviders", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address[]", + "internalType": "contract IRateProvider[]" + } + ], + "stateMutability": "view" + } +] \ No newline at end of file diff --git a/bex/ITimelockAuthorizer.abi.json b/bex/ITimelockAuthorizer.abi.json new file mode 100644 index 0000000..9df58f3 --- /dev/null +++ b/bex/ITimelockAuthorizer.abi.json @@ -0,0 +1,1552 @@ +[ + { + "type": "function", + "name": "EVERYWHERE", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "GLOBAL_CANCELER_SCHEDULED_EXECUTION_ID", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "MAX_DELAY", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "MINIMUM_CHANGE_DELAY_EXECUTION_DELAY", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "addCanceler", + "inputs": [ + { + "name": "scheduledExecutionId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "addGranter", + "inputs": [ + { + "name": "actionId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "where", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "addRevoker", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "where", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "canExecute", + "inputs": [ + { + "name": "scheduledExecutionId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "cancel", + "inputs": [ + { + "name": "scheduledExecutionId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "claimRoot", + "inputs": [], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "execute", + "inputs": [ + { + "name": "scheduledExecutionId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "result", + "type": "bytes", + "internalType": "bytes" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getActionIdDelay", + "inputs": [ + { + "name": "actionId", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getActionIdGrantDelay", + "inputs": [ + { + "name": "actionId", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getActionIdRevokeDelay", + "inputs": [ + { + "name": "actionId", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getPendingRoot", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRoot", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getRootTransferDelay", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getScheduledExecution", + "inputs": [ + { + "name": "scheduledExecutionId", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "tuple", + "internalType": "struct ITimelockAuthorizer.ScheduledExecution", + "components": [ + { + "name": "where", + "type": "address", + "internalType": "address" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "executed", + "type": "bool", + "internalType": "bool" + }, + { + "name": "canceled", + "type": "bool", + "internalType": "bool" + }, + { + "name": "protected", + "type": "bool", + "internalType": "bool" + }, + { + "name": "executableAt", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "scheduledBy", + "type": "address", + "internalType": "address" + }, + { + "name": "scheduledAt", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "executedBy", + "type": "address", + "internalType": "address" + }, + { + "name": "executedAt", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "canceledBy", + "type": "address", + "internalType": "address" + }, + { + "name": "canceledAt", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getScheduledExecutions", + "inputs": [ + { + "name": "skip", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "maxSize", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "reverseOrder", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [ + { + "name": "items", + "type": "tuple[]", + "internalType": "struct ITimelockAuthorizer.ScheduledExecution[]", + "components": [ + { + "name": "where", + "type": "address", + "internalType": "address" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "executed", + "type": "bool", + "internalType": "bool" + }, + { + "name": "canceled", + "type": "bool", + "internalType": "bool" + }, + { + "name": "protected", + "type": "bool", + "internalType": "bool" + }, + { + "name": "executableAt", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "scheduledBy", + "type": "address", + "internalType": "address" + }, + { + "name": "scheduledAt", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "executedBy", + "type": "address", + "internalType": "address" + }, + { + "name": "executedAt", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "canceledBy", + "type": "address", + "internalType": "address" + }, + { + "name": "canceledAt", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getScheduledExecutionsCount", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getTimelockExecutionHelper", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getVault", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "grantPermission", + "inputs": [ + { + "name": "actionId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "where", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "hasPermission", + "inputs": [ + { + "name": "actionId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "where", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isCanceler", + "inputs": [ + { + "name": "scheduledExecutionId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isExecutor", + "inputs": [ + { + "name": "scheduledExecutionId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isGranter", + "inputs": [ + { + "name": "actionId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "where", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isPendingRoot", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isPermissionGrantedOnTarget", + "inputs": [ + { + "name": "actionId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "where", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isRevoker", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "where", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "isRoot", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "removeCanceler", + "inputs": [ + { + "name": "scheduledExecutionId", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "removeGranter", + "inputs": [ + { + "name": "actionId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "where", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "removeRevoker", + "inputs": [ + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "where", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "renouncePermission", + "inputs": [ + { + "name": "actionId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "where", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "revokePermission", + "inputs": [ + { + "name": "actionId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "where", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "schedule", + "inputs": [ + { + "name": "where", + "type": "address", + "internalType": "address" + }, + { + "name": "data", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "executors", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "scheduleDelayChange", + "inputs": [ + { + "name": "actionId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "newDelay", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "executors", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "scheduleGrantDelayChange", + "inputs": [ + { + "name": "actionId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "newDelay", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "executors", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "scheduleGrantPermission", + "inputs": [ + { + "name": "actionId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "where", + "type": "address", + "internalType": "address" + }, + { + "name": "executors", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "scheduleRevokeDelayChange", + "inputs": [ + { + "name": "actionId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "newDelay", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "executors", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "scheduleRevokePermission", + "inputs": [ + { + "name": "actionId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "internalType": "address" + }, + { + "name": "where", + "type": "address", + "internalType": "address" + }, + { + "name": "executors", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "scheduleRootChange", + "inputs": [ + { + "name": "newRoot", + "type": "address", + "internalType": "address" + }, + { + "name": "executors", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setDelay", + "inputs": [ + { + "name": "actionId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "delay", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setGrantDelay", + "inputs": [ + { + "name": "actionId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "delay", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setPendingRoot", + "inputs": [ + { + "name": "pendingRoot", + "type": "address", + "internalType": "address" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setRevokeDelay", + "inputs": [ + { + "name": "actionId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "delay", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "event", + "name": "ActionDelaySet", + "inputs": [ + { + "name": "actionId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "delay", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "CancelerAdded", + "inputs": [ + { + "name": "scheduledExecutionId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "canceler", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "CancelerRemoved", + "inputs": [ + { + "name": "scheduledExecutionId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "canceler", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "DelayChangeScheduled", + "inputs": [ + { + "name": "actionId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newDelay", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "scheduledExecutionId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ExecutionCanceled", + "inputs": [ + { + "name": "scheduledExecutionId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ExecutionExecuted", + "inputs": [ + { + "name": "scheduledExecutionId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ExecutionScheduled", + "inputs": [ + { + "name": "actionId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "scheduledExecutionId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ExecutorAdded", + "inputs": [ + { + "name": "scheduledExecutionId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "executor", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "GrantDelayChangeScheduled", + "inputs": [ + { + "name": "actionId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newDelay", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "scheduledExecutionId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "GrantDelaySet", + "inputs": [ + { + "name": "actionId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "delay", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "GrantPermissionScheduled", + "inputs": [ + { + "name": "actionId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "where", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "scheduledExecutionId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "GranterAdded", + "inputs": [ + { + "name": "actionId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "where", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "GranterRemoved", + "inputs": [ + { + "name": "actionId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "where", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PendingRootSet", + "inputs": [ + { + "name": "pendingRoot", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PermissionGranted", + "inputs": [ + { + "name": "actionId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "where", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PermissionRevoked", + "inputs": [ + { + "name": "actionId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "where", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RevokeDelayChangeScheduled", + "inputs": [ + { + "name": "actionId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "newDelay", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + }, + { + "name": "scheduledExecutionId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RevokeDelaySet", + "inputs": [ + { + "name": "actionId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "delay", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RevokePermissionScheduled", + "inputs": [ + { + "name": "actionId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "where", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "scheduledExecutionId", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RevokerAdded", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "where", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RevokerRemoved", + "inputs": [ + { + "name": "account", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "where", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RootChangeScheduled", + "inputs": [ + { + "name": "newRoot", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "scheduledExecutionId", + "type": "uint256", + "indexed": true, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RootSet", + "inputs": [ + { + "name": "root", + "type": "address", + "indexed": true, + "internalType": "address" + } + ], + "anonymous": false + } +] \ No newline at end of file diff --git a/bex/IVault.abi.json b/bex/IVault.abi.json new file mode 100644 index 0000000..e5e9e6a --- /dev/null +++ b/bex/IVault.abi.json @@ -0,0 +1,1149 @@ +[ + { + "type": "function", + "name": "WETH", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IWETH" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "batchSwap", + "inputs": [ + { + "name": "kind", + "type": "uint8", + "internalType": "enum IVault.SwapKind" + }, + { + "name": "swaps", + "type": "tuple[]", + "internalType": "struct IVault.BatchSwapStep[]", + "components": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "assetInIndex", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "assetOutIndex", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "assets", + "type": "address[]", + "internalType": "contract IAsset[]" + }, + { + "name": "funds", + "type": "tuple", + "internalType": "struct IVault.FundManagement", + "components": [ + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "fromInternalBalance", + "type": "bool", + "internalType": "bool" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address payable" + }, + { + "name": "toInternalBalance", + "type": "bool", + "internalType": "bool" + } + ] + }, + { + "name": "limits", + "type": "int256[]", + "internalType": "int256[]" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "int256[]", + "internalType": "int256[]" + } + ], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "deregisterTokens", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "tokens", + "type": "address[]", + "internalType": "contract IERC20[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "exitPool", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address payable" + }, + { + "name": "request", + "type": "tuple", + "internalType": "struct IVault.ExitPoolRequest", + "components": [ + { + "name": "assets", + "type": "address[]", + "internalType": "contract IAsset[]" + }, + { + "name": "minAmountsOut", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "toInternalBalance", + "type": "bool", + "internalType": "bool" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "flashLoan", + "inputs": [ + { + "name": "recipient", + "type": "address", + "internalType": "contract IFlashLoanRecipient" + }, + { + "name": "tokens", + "type": "address[]", + "internalType": "contract IERC20[]" + }, + { + "name": "amounts", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "getActionId", + "inputs": [ + { + "name": "selector", + "type": "bytes4", + "internalType": "bytes4" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getAuthorizer", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IAuthorizer" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getDomainSeparator", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getInternalBalance", + "inputs": [ + { + "name": "user", + "type": "address", + "internalType": "address" + }, + { + "name": "tokens", + "type": "address[]", + "internalType": "contract IERC20[]" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256[]", + "internalType": "uint256[]" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getNextNonce", + "inputs": [ + { + "name": "user", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getPausedState", + "inputs": [], + "outputs": [ + { + "name": "paused", + "type": "bool", + "internalType": "bool" + }, + { + "name": "pauseWindowEndTime", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "bufferPeriodEndTime", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getPool", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "address" + }, + { + "name": "", + "type": "uint8", + "internalType": "enum IVault.PoolSpecialization" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getPoolTokenInfo", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + } + ], + "outputs": [ + { + "name": "cash", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "managed", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "lastChangeBlock", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "assetManager", + "type": "address", + "internalType": "address" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getPoolTokens", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "outputs": [ + { + "name": "tokens", + "type": "address[]", + "internalType": "contract IERC20[]" + }, + { + "name": "balances", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "lastChangeBlock", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "getProtocolFeesCollector", + "inputs": [], + "outputs": [ + { + "name": "", + "type": "address", + "internalType": "contract IProtocolFeesCollector" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "hasApprovedRelayer", + "inputs": [ + { + "name": "user", + "type": "address", + "internalType": "address" + }, + { + "name": "relayer", + "type": "address", + "internalType": "address" + } + ], + "outputs": [ + { + "name": "", + "type": "bool", + "internalType": "bool" + } + ], + "stateMutability": "view" + }, + { + "type": "function", + "name": "joinPool", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address" + }, + { + "name": "request", + "type": "tuple", + "internalType": "struct IVault.JoinPoolRequest", + "components": [ + { + "name": "assets", + "type": "address[]", + "internalType": "contract IAsset[]" + }, + { + "name": "maxAmountsIn", + "type": "uint256[]", + "internalType": "uint256[]" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + }, + { + "name": "fromInternalBalance", + "type": "bool", + "internalType": "bool" + } + ] + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "managePoolBalance", + "inputs": [ + { + "name": "ops", + "type": "tuple[]", + "internalType": "struct IVault.PoolBalanceOp[]", + "components": [ + { + "name": "kind", + "type": "uint8", + "internalType": "enum IVault.PoolBalanceOpKind" + }, + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "token", + "type": "address", + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + } + ] + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "manageUserBalance", + "inputs": [ + { + "name": "ops", + "type": "tuple[]", + "internalType": "struct IVault.UserBalanceOp[]", + "components": [ + { + "name": "kind", + "type": "uint8", + "internalType": "enum IVault.UserBalanceOpKind" + }, + { + "name": "asset", + "type": "address", + "internalType": "contract IAsset" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address payable" + } + ] + } + ], + "outputs": [], + "stateMutability": "payable" + }, + { + "type": "function", + "name": "queryBatchSwap", + "inputs": [ + { + "name": "kind", + "type": "uint8", + "internalType": "enum IVault.SwapKind" + }, + { + "name": "swaps", + "type": "tuple[]", + "internalType": "struct IVault.BatchSwapStep[]", + "components": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "assetInIndex", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "assetOutIndex", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "assets", + "type": "address[]", + "internalType": "contract IAsset[]" + }, + { + "name": "funds", + "type": "tuple", + "internalType": "struct IVault.FundManagement", + "components": [ + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "fromInternalBalance", + "type": "bool", + "internalType": "bool" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address payable" + }, + { + "name": "toInternalBalance", + "type": "bool", + "internalType": "bool" + } + ] + } + ], + "outputs": [ + { + "name": "assetDeltas", + "type": "int256[]", + "internalType": "int256[]" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "registerPool", + "inputs": [ + { + "name": "specialization", + "type": "uint8", + "internalType": "enum IVault.PoolSpecialization" + } + ], + "outputs": [ + { + "name": "", + "type": "bytes32", + "internalType": "bytes32" + } + ], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "registerTokens", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "tokens", + "type": "address[]", + "internalType": "contract IERC20[]" + }, + { + "name": "assetManagers", + "type": "address[]", + "internalType": "address[]" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setAuthorizer", + "inputs": [ + { + "name": "newAuthorizer", + "type": "address", + "internalType": "contract IAuthorizer" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setPaused", + "inputs": [ + { + "name": "paused", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "setRelayerApproval", + "inputs": [ + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "relayer", + "type": "address", + "internalType": "address" + }, + { + "name": "approved", + "type": "bool", + "internalType": "bool" + } + ], + "outputs": [], + "stateMutability": "nonpayable" + }, + { + "type": "function", + "name": "swap", + "inputs": [ + { + "name": "singleSwap", + "type": "tuple", + "internalType": "struct IVault.SingleSwap", + "components": [ + { + "name": "poolId", + "type": "bytes32", + "internalType": "bytes32" + }, + { + "name": "kind", + "type": "uint8", + "internalType": "enum IVault.SwapKind" + }, + { + "name": "assetIn", + "type": "address", + "internalType": "contract IAsset" + }, + { + "name": "assetOut", + "type": "address", + "internalType": "contract IAsset" + }, + { + "name": "amount", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "userData", + "type": "bytes", + "internalType": "bytes" + } + ] + }, + { + "name": "funds", + "type": "tuple", + "internalType": "struct IVault.FundManagement", + "components": [ + { + "name": "sender", + "type": "address", + "internalType": "address" + }, + { + "name": "fromInternalBalance", + "type": "bool", + "internalType": "bool" + }, + { + "name": "recipient", + "type": "address", + "internalType": "address payable" + }, + { + "name": "toInternalBalance", + "type": "bool", + "internalType": "bool" + } + ] + }, + { + "name": "limit", + "type": "uint256", + "internalType": "uint256" + }, + { + "name": "deadline", + "type": "uint256", + "internalType": "uint256" + } + ], + "outputs": [ + { + "name": "", + "type": "uint256", + "internalType": "uint256" + } + ], + "stateMutability": "payable" + }, + { + "type": "event", + "name": "AuthorizerChanged", + "inputs": [ + { + "name": "newAuthorizer", + "type": "address", + "indexed": true, + "internalType": "contract IAuthorizer" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ExternalBalanceTransfer", + "inputs": [ + { + "name": "token", + "type": "address", + "indexed": true, + "internalType": "contract IERC20" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "recipient", + "type": "address", + "indexed": false, + "internalType": "address" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "FlashLoan", + "inputs": [ + { + "name": "recipient", + "type": "address", + "indexed": true, + "internalType": "contract IFlashLoanRecipient" + }, + { + "name": "token", + "type": "address", + "indexed": true, + "internalType": "contract IERC20" + }, + { + "name": "amount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "feeAmount", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "InternalBalanceChanged", + "inputs": [ + { + "name": "user", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": true, + "internalType": "contract IERC20" + }, + { + "name": "delta", + "type": "int256", + "indexed": false, + "internalType": "int256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PausedStateChanged", + "inputs": [ + { + "name": "paused", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PoolBalanceChanged", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "liquidityProvider", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "tokens", + "type": "address[]", + "indexed": false, + "internalType": "contract IERC20[]" + }, + { + "name": "deltas", + "type": "int256[]", + "indexed": false, + "internalType": "int256[]" + }, + { + "name": "protocolFeeAmounts", + "type": "uint256[]", + "indexed": false, + "internalType": "uint256[]" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PoolBalanceManaged", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "assetManager", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "token", + "type": "address", + "indexed": true, + "internalType": "contract IERC20" + }, + { + "name": "cashDelta", + "type": "int256", + "indexed": false, + "internalType": "int256" + }, + { + "name": "managedDelta", + "type": "int256", + "indexed": false, + "internalType": "int256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "PoolRegistered", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "poolAddress", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "specialization", + "type": "uint8", + "indexed": false, + "internalType": "enum IVault.PoolSpecialization" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "RelayerApprovalChanged", + "inputs": [ + { + "name": "relayer", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "sender", + "type": "address", + "indexed": true, + "internalType": "address" + }, + { + "name": "approved", + "type": "bool", + "indexed": false, + "internalType": "bool" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Swap", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "tokenIn", + "type": "address", + "indexed": true, + "internalType": "contract IERC20" + }, + { + "name": "tokenOut", + "type": "address", + "indexed": true, + "internalType": "contract IERC20" + }, + { + "name": "amountIn", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + }, + { + "name": "amountOut", + "type": "uint256", + "indexed": false, + "internalType": "uint256" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokensDeregistered", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "tokens", + "type": "address[]", + "indexed": false, + "internalType": "contract IERC20[]" + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "TokensRegistered", + "inputs": [ + { + "name": "poolId", + "type": "bytes32", + "indexed": true, + "internalType": "bytes32" + }, + { + "name": "tokens", + "type": "address[]", + "indexed": false, + "internalType": "contract IERC20[]" + }, + { + "name": "assetManagers", + "type": "address[]", + "indexed": false, + "internalType": "address[]" + } + ], + "anonymous": false + } +] \ No newline at end of file