diff --git a/subgraphs/karak/abis/Prices/EigenpieMLRT.json b/subgraphs/karak/abis/Prices/EigenpieMLRT.json new file mode 100644 index 0000000000..03463c03a9 --- /dev/null +++ b/subgraphs/karak/abis/Prices/EigenpieMLRT.json @@ -0,0 +1,349 @@ +[ + { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, + { "inputs": [], "name": "CallerNotEigenpieConfigAdmin", "type": "error" }, + { "inputs": [], "name": "CallerNotEigenpieConfigBurner", "type": "error" }, + { "inputs": [], "name": "CallerNotEigenpieConfigManager", "type": "error" }, + { "inputs": [], "name": "CallerNotEigenpieConfigMinter", "type": "error" }, + { + "inputs": [], + "name": "CallerNotEigenpieConfigPriceProvider", + "type": "error" + }, + { "inputs": [], "name": "ZeroAddressNotAllowed", "type": "error" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newExchangeRate", + "type": "uint256" + } + ], + "name": "LSTExchangeRateUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "eigenpieConfig", + "type": "address" + } + ], + "name": "UpdatedEigenpieConfig", + "type": "event" + }, + { + "inputs": [ + { "internalType": "address", "name": "owner", "type": "address" }, + { "internalType": "address", "name": "spender", "type": "address" } + ], + "name": "allowance", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "spender", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "approve", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "balanceOf", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "account", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "burnFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "spender", "type": "address" }, + { + "internalType": "uint256", + "name": "subtractedValue", + "type": "uint256" + } + ], + "name": "decreaseAllowance", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "eigenpieConfig", + "outputs": [ + { + "internalType": "contract IEigenpieConfig", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "exchangeRateToLST", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "exchangeRateToNative", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "spender", "type": "address" }, + { "internalType": "uint256", "name": "addedValue", "type": "uint256" } + ], + "name": "increaseAllowance", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "asset", "type": "address" }, + { + "internalType": "address", + "name": "eigenpieConfigAddr", + "type": "address" + }, + { "internalType": "string", "name": "name", "type": "string" }, + { "internalType": "string", "name": "symbol", "type": "string" } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "transfer", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "from", "type": "address" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "transferFrom", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "underlyingAsset", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "eigenpieConfigAddr", + "type": "address" + } + ], + "name": "updateEigenpieConfig", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_newRate", "type": "uint256" } + ], + "name": "updateExchangeRateToLST", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/subgraphs/karak/abis/Prices/PendlePT.json b/subgraphs/karak/abis/Prices/PendlePT.json new file mode 100644 index 0000000000..b3871ccbcb --- /dev/null +++ b/subgraphs/karak/abis/Prices/PendlePT.json @@ -0,0 +1,280 @@ +[ + { + "inputs": [ + { "internalType": "address", "name": "_SY", "type": "address" }, + { "internalType": "string", "name": "_name", "type": "string" }, + { "internalType": "string", "name": "_symbol", "type": "string" }, + { "internalType": "uint8", "name": "__decimals", "type": "uint8" }, + { "internalType": "uint256", "name": "_expiry", "type": "uint256" } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { "inputs": [], "name": "InvalidShortString", "type": "error" }, + { "inputs": [], "name": "OnlyYCFactory", "type": "error" }, + { "inputs": [], "name": "OnlyYT", "type": "error" }, + { + "inputs": [{ "internalType": "string", "name": "str", "type": "string" }], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "SY", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "YT", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "owner", "type": "address" }, + { "internalType": "address", "name": "spender", "type": "address" } + ], + "name": "allowance", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "spender", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "approve", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "balanceOf", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "user", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "burnByYT", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { "internalType": "bytes1", "name": "fields", "type": "bytes1" }, + { "internalType": "string", "name": "name", "type": "string" }, + { "internalType": "string", "name": "version", "type": "string" }, + { "internalType": "uint256", "name": "chainId", "type": "uint256" }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { "internalType": "bytes32", "name": "salt", "type": "bytes32" }, + { "internalType": "uint256[]", "name": "extensions", "type": "uint256[]" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "expiry", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "factory", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "_YT", "type": "address" }], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "isExpired", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "user", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "mintByYT", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "owner", "type": "address" } + ], + "name": "nonces", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "owner", "type": "address" }, + { "internalType": "address", "name": "spender", "type": "address" }, + { "internalType": "uint256", "name": "value", "type": "uint256" }, + { "internalType": "uint256", "name": "deadline", "type": "uint256" }, + { "internalType": "uint8", "name": "v", "type": "uint8" }, + { "internalType": "bytes32", "name": "r", "type": "bytes32" }, + { "internalType": "bytes32", "name": "s", "type": "bytes32" } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "transfer", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "from", "type": "address" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "transferFrom", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/subgraphs/karak/abis/Prices/PendleSY.json b/subgraphs/karak/abis/Prices/PendleSY.json new file mode 100644 index 0000000000..e64c52ec6d --- /dev/null +++ b/subgraphs/karak/abis/Prices/PendleSY.json @@ -0,0 +1,690 @@ +[ + { + "inputs": [ + { "internalType": "address", "name": "_weETH", "type": "address" }, + { "internalType": "address", "name": "_referee", "type": "address" } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { "inputs": [], "name": "InvalidShortString", "type": "error" }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "actualSharesOut", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "requiredSharesOut", + "type": "uint256" + } + ], + "name": "SYInsufficientSharesOut", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "actualTokenOut", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "requiredTokenOut", + "type": "uint256" + } + ], + "name": "SYInsufficientTokenOut", + "type": "error" + }, + { + "inputs": [ + { "internalType": "address", "name": "token", "type": "address" } + ], + "name": "SYInvalidTokenIn", + "type": "error" + }, + { + "inputs": [ + { "internalType": "address", "name": "token", "type": "address" } + ], + "name": "SYInvalidTokenOut", + "type": "error" + }, + { "inputs": [], "name": "SYZeroDeposit", "type": "error" }, + { "inputs": [], "name": "SYZeroRedeem", "type": "error" }, + { + "inputs": [{ "internalType": "string", "name": "str", "type": "string" }], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "address[]", + "name": "rewardTokens", + "type": "address[]" + }, + { + "indexed": false, + "internalType": "uint256[]", + "name": "rewardAmounts", + "type": "uint256[]" + } + ], + "name": "ClaimRewards", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "tokenIn", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountDeposited", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountSyOut", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [], + "name": "EIP712DomainChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint8", + "name": "version", + "type": "uint8" + } + ], + "name": "Initialized", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Paused", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "tokenOut", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountSyToRedeem", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amountTokenOut", + "type": "uint256" + } + ], + "name": "Redeem", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unpaused", + "type": "event" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "accruedRewards", + "outputs": [ + { + "internalType": "uint256[]", + "name": "rewardAmounts", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "owner", "type": "address" }, + { "internalType": "address", "name": "spender", "type": "address" } + ], + "name": "allowance", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "spender", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "approve", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "assetInfo", + "outputs": [ + { + "internalType": "enum IStandardizedYield.AssetType", + "name": "", + "type": "uint8" + }, + { "internalType": "address", "name": "", "type": "address" }, + { "internalType": "uint8", "name": "", "type": "uint8" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "balanceOf", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "claimOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "claimRewards", + "outputs": [ + { + "internalType": "uint256[]", + "name": "rewardAmounts", + "type": "uint256[]" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "receiver", "type": "address" }, + { "internalType": "address", "name": "tokenIn", "type": "address" }, + { + "internalType": "uint256", + "name": "amountTokenToDeposit", + "type": "uint256" + }, + { "internalType": "uint256", "name": "minSharesOut", "type": "uint256" } + ], + "name": "deposit", + "outputs": [ + { + "internalType": "uint256", + "name": "amountSharesOut", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "eETH", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { "internalType": "bytes1", "name": "fields", "type": "bytes1" }, + { "internalType": "string", "name": "name", "type": "string" }, + { "internalType": "string", "name": "version", "type": "string" }, + { "internalType": "uint256", "name": "chainId", "type": "uint256" }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { "internalType": "bytes32", "name": "salt", "type": "bytes32" }, + { "internalType": "uint256[]", "name": "extensions", "type": "uint256[]" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "exchangeRate", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getRewardTokens", + "outputs": [ + { + "internalType": "address[]", + "name": "rewardTokens", + "type": "address[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTokensIn", + "outputs": [ + { "internalType": "address[]", "name": "res", "type": "address[]" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "getTokensOut", + "outputs": [ + { "internalType": "address[]", "name": "res", "type": "address[]" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "token", "type": "address" } + ], + "name": "isValidTokenIn", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "token", "type": "address" } + ], + "name": "isValidTokenOut", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "liquidityPool", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "owner", "type": "address" } + ], + "name": "nonces", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingOwner", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "owner", "type": "address" }, + { "internalType": "address", "name": "spender", "type": "address" }, + { "internalType": "uint256", "name": "value", "type": "uint256" }, + { "internalType": "uint256", "name": "deadline", "type": "uint256" }, + { "internalType": "uint8", "name": "v", "type": "uint8" }, + { "internalType": "bytes32", "name": "r", "type": "bytes32" }, + { "internalType": "bytes32", "name": "s", "type": "bytes32" } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "tokenIn", "type": "address" }, + { + "internalType": "uint256", + "name": "amountTokenToDeposit", + "type": "uint256" + } + ], + "name": "previewDeposit", + "outputs": [ + { + "internalType": "uint256", + "name": "amountSharesOut", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "tokenOut", "type": "address" }, + { + "internalType": "uint256", + "name": "amountSharesToRedeem", + "type": "uint256" + } + ], + "name": "previewRedeem", + "outputs": [ + { "internalType": "uint256", "name": "amountTokenOut", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "receiver", "type": "address" }, + { + "internalType": "uint256", + "name": "amountSharesToRedeem", + "type": "uint256" + }, + { "internalType": "address", "name": "tokenOut", "type": "address" }, + { "internalType": "uint256", "name": "minTokenOut", "type": "uint256" }, + { + "internalType": "bool", + "name": "burnFromInternalBalance", + "type": "bool" + } + ], + "name": "redeem", + "outputs": [ + { "internalType": "uint256", "name": "amountTokenOut", "type": "uint256" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "referee", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "rewardIndexesCurrent", + "outputs": [ + { "internalType": "uint256[]", "name": "indexes", "type": "uint256[]" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "rewardIndexesStored", + "outputs": [ + { "internalType": "uint256[]", "name": "indexes", "type": "uint256[]" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "transfer", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "from", "type": "address" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "transferFrom", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "newOwner", "type": "address" }, + { "internalType": "bool", "name": "direct", "type": "bool" }, + { "internalType": "bool", "name": "renounce", "type": "bool" } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "weETH", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "yieldToken", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { "stateMutability": "payable", "type": "receive" } +] diff --git a/subgraphs/karak/abis/Prices/SFRAX.json b/subgraphs/karak/abis/Prices/SFRAX.json new file mode 100644 index 0000000000..b7e97dd119 --- /dev/null +++ b/subgraphs/karak/abis/Prices/SFRAX.json @@ -0,0 +1,730 @@ +[ + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "_underlying", + "type": "address" + }, + { "internalType": "string", "name": "_name", "type": "string" }, + { "internalType": "string", "name": "_symbol", "type": "string" }, + { + "internalType": "uint32", + "name": "_rewardsCycleLength", + "type": "uint32" + }, + { + "internalType": "uint256", + "name": "_maxDistributionPerSecondPerAsset", + "type": "uint256" + }, + { + "internalType": "address", + "name": "_timelockAddress", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "pendingTimelockAddress", + "type": "address" + }, + { "internalType": "address", "name": "actualAddress", "type": "address" } + ], + "name": "AddressIsNotPendingTimelock", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "timelockAddress", + "type": "address" + }, + { "internalType": "address", "name": "actualAddress", "type": "address" } + ], + "name": "AddressIsNotTimelock", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "Deposit", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "rewardsToDistribute", + "type": "uint256" + } + ], + "name": "DistributeRewards", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint256", + "name": "oldMax", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newMax", + "type": "uint256" + } + ], + "name": "SetMaxDistributionPerSecondPerAsset", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "uint40", + "name": "cycleEnd", + "type": "uint40" + }, + { + "indexed": false, + "internalType": "uint40", + "name": "lastSync", + "type": "uint40" + }, + { + "indexed": false, + "internalType": "uint216", + "name": "rewardCycleAmount", + "type": "uint216" + } + ], + "name": "SyncRewards", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousTimelock", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newTimelock", + "type": "address" + } + ], + "name": "TimelockTransferStarted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousTimelock", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newTimelock", + "type": "address" + } + ], + "name": "TimelockTransferred", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "caller", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "receiver", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "assets", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "shares", + "type": "uint256" + } + ], + "name": "Withdraw", + "type": "event" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PRECISION", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "REWARDS_CYCLE_LENGTH", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "UNDERLYING_PRECISION", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "acceptTransferTimelock", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "", "type": "address" }, + { "internalType": "address", "name": "", "type": "address" } + ], + "name": "allowance", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "spender", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "approve", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "asset", + "outputs": [ + { "internalType": "contract ERC20", "name": "", "type": "address" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "balanceOf", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { "internalType": "uint40", "name": "cycleEnd", "type": "uint40" }, + { "internalType": "uint40", "name": "lastSync", "type": "uint40" }, + { + "internalType": "uint216", + "name": "rewardCycleAmount", + "type": "uint216" + } + ], + "internalType": "struct LinearRewardsErc4626.RewardsCycleData", + "name": "_rewardsCycleData", + "type": "tuple" + }, + { "internalType": "uint256", "name": "_deltaTime", "type": "uint256" } + ], + "name": "calculateRewardsToDistribute", + "outputs": [ + { + "internalType": "uint256", + "name": "_rewardToDistribute", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "shares", "type": "uint256" } + ], + "name": "convertToAssets", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "assets", "type": "uint256" } + ], + "name": "convertToShares", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_assets", "type": "uint256" }, + { "internalType": "address", "name": "_receiver", "type": "address" } + ], + "name": "deposit", + "outputs": [ + { "internalType": "uint256", "name": "_shares", "type": "uint256" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_assets", "type": "uint256" }, + { "internalType": "address", "name": "_receiver", "type": "address" }, + { "internalType": "uint256", "name": "_deadline", "type": "uint256" }, + { "internalType": "bool", "name": "_approveMax", "type": "bool" }, + { "internalType": "uint8", "name": "_v", "type": "uint8" }, + { "internalType": "bytes32", "name": "_r", "type": "bytes32" }, + { "internalType": "bytes32", "name": "_s", "type": "bytes32" } + ], + "name": "depositWithSignature", + "outputs": [ + { "internalType": "uint256", "name": "_shares", "type": "uint256" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "lastRewardsDistribution", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "maxDeposit", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxDistributionPerSecondPerAsset", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "maxMint", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "owner", "type": "address" } + ], + "name": "maxRedeem", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "owner", "type": "address" } + ], + "name": "maxWithdraw", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_shares", "type": "uint256" }, + { "internalType": "address", "name": "_receiver", "type": "address" } + ], + "name": "mint", + "outputs": [ + { "internalType": "uint256", "name": "_assets", "type": "uint256" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [{ "internalType": "address", "name": "", "type": "address" }], + "name": "nonces", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pendingTimelockAddress", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "owner", "type": "address" }, + { "internalType": "address", "name": "spender", "type": "address" }, + { "internalType": "uint256", "name": "value", "type": "uint256" }, + { "internalType": "uint256", "name": "deadline", "type": "uint256" }, + { "internalType": "uint8", "name": "v", "type": "uint8" }, + { "internalType": "bytes32", "name": "r", "type": "bytes32" }, + { "internalType": "bytes32", "name": "s", "type": "bytes32" } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "assets", "type": "uint256" } + ], + "name": "previewDeposit", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "previewDistributeRewards", + "outputs": [ + { + "internalType": "uint256", + "name": "_rewardToDistribute", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "shares", "type": "uint256" } + ], + "name": "previewMint", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "shares", "type": "uint256" } + ], + "name": "previewRedeem", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "previewSyncRewards", + "outputs": [ + { + "components": [ + { "internalType": "uint40", "name": "cycleEnd", "type": "uint40" }, + { "internalType": "uint40", "name": "lastSync", "type": "uint40" }, + { + "internalType": "uint216", + "name": "rewardCycleAmount", + "type": "uint216" + } + ], + "internalType": "struct LinearRewardsErc4626.RewardsCycleData", + "name": "_newRewardsCycleData", + "type": "tuple" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "assets", "type": "uint256" } + ], + "name": "previewWithdraw", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pricePerShare", + "outputs": [ + { "internalType": "uint256", "name": "_pricePerShare", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_shares", "type": "uint256" }, + { "internalType": "address", "name": "_receiver", "type": "address" }, + { "internalType": "address", "name": "_owner", "type": "address" } + ], + "name": "redeem", + "outputs": [ + { "internalType": "uint256", "name": "_assets", "type": "uint256" } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceTimelock", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "rewardsCycleData", + "outputs": [ + { "internalType": "uint40", "name": "cycleEnd", "type": "uint40" }, + { "internalType": "uint40", "name": "lastSync", "type": "uint40" }, + { + "internalType": "uint216", + "name": "rewardCycleAmount", + "type": "uint216" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_maxDistributionPerSecondPerAsset", + "type": "uint256" + } + ], + "name": "setMaxDistributionPerSecondPerAsset", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "storedTotalAssets", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "syncRewardsAndDistribution", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "timelockAddress", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalAssets", + "outputs": [ + { "internalType": "uint256", "name": "_totalAssets", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "transfer", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "from", "type": "address" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "transferFrom", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_newTimelock", "type": "address" } + ], + "name": "transferTimelock", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_assets", "type": "uint256" }, + { "internalType": "address", "name": "_receiver", "type": "address" }, + { "internalType": "address", "name": "_owner", "type": "address" } + ], + "name": "withdraw", + "outputs": [ + { "internalType": "uint256", "name": "_shares", "type": "uint256" } + ], + "stateMutability": "nonpayable", + "type": "function" + } +] diff --git a/subgraphs/karak/abis/Prices/WBETH.json b/subgraphs/karak/abis/Prices/WBETH.json new file mode 100644 index 0000000000..888bb50f5c --- /dev/null +++ b/subgraphs/karak/abis/Prices/WBETH.json @@ -0,0 +1,1072 @@ +[ + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "authorizer", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + } + ], + "name": "AuthorizationCanceled", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "authorizer", + "type": "address" + }, + { + "indexed": true, + "internalType": "bytes32", + "name": "nonce", + "type": "bytes32" + } + ], + "name": "AuthorizationUsed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "Blacklisted", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newBlacklister", + "type": "address" + } + ], + "name": "BlacklisterChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "burner", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Burn", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "ethAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "wBETHAmount", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "referral", + "type": "address" + } + ], + "name": "DepositEth", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousReceiver", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newReceiver", + "type": "address" + } + ], + "name": "EthReceiverUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oracle", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newExchangeRate", + "type": "uint256" + } + ], + "name": "ExchangeRateUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newMasterMinter", + "type": "address" + } + ], + "name": "MasterMinterChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minter", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "amount", + "type": "uint256" + } + ], + "name": "Mint", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "minter", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "minterAllowedAmount", + "type": "uint256" + } + ], + "name": "MinterConfigured", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldMinter", + "type": "address" + } + ], + "name": "MinterRemoved", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "ethReceiver", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "ethAmount", + "type": "uint256" + } + ], + "name": "MovedToStakingAddress", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "unwrapAddress", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "ethAmount", + "type": "uint256" + } + ], + "name": "MovedToUnwrapAddress", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "previousOperator", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newOperator", + "type": "address" + } + ], + "name": "OperatorUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newOracle", + "type": "address" + } + ], + "name": "OracleUpdated", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "previousOwner", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "OwnershipTransferred", + "type": "event" + }, + { "anonymous": false, "inputs": [], "name": "Pause", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newAddress", + "type": "address" + } + ], + "name": "PauserChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "user", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "wbethAmount", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "ethAmount", + "type": "uint256" + } + ], + "name": "RequestWithdrawEth", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "newRescuer", + "type": "address" + } + ], + "name": "RescuerChanged", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "supplier", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "ethAmount", + "type": "uint256" + } + ], + "name": "SuppliedEth", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "_account", + "type": "address" + } + ], + "name": "UnBlacklisted", + "type": "event" + }, + { "anonymous": false, "inputs": [], "name": "Unpause", "type": "event" }, + { + "inputs": [], + "name": "CANCEL_AUTHORIZATION_TYPEHASH", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "PERMIT_TYPEHASH", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "RECEIVE_WITH_AUTHORIZATION_TYPEHASH", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "TRANSFER_WITH_AUTHORIZATION_TYPEHASH", + "outputs": [{ "internalType": "bytes32", "name": "", "type": "bytes32" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_EXCHANGE_RATE_UNIT", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "_UNWRAP_ETH_ADDRESS", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "owner", "type": "address" }, + { "internalType": "address", "name": "spender", "type": "address" } + ], + "name": "allowance", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "spender", "type": "address" }, + { "internalType": "uint256", "name": "value", "type": "uint256" } + ], + "name": "approve", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "authorizer", "type": "address" }, + { "internalType": "bytes32", "name": "nonce", "type": "bytes32" } + ], + "name": "authorizationState", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "balanceOf", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_account", "type": "address" } + ], + "name": "blacklist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "blacklister", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "_amount", "type": "uint256" } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "authorizer", "type": "address" }, + { "internalType": "bytes32", "name": "nonce", "type": "bytes32" }, + { "internalType": "uint8", "name": "v", "type": "uint8" }, + { "internalType": "bytes32", "name": "r", "type": "bytes32" }, + { "internalType": "bytes32", "name": "s", "type": "bytes32" } + ], + "name": "cancelAuthorization", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "minter", "type": "address" }, + { + "internalType": "uint256", + "name": "minterAllowedAmount", + "type": "uint256" + } + ], + "name": "configureMinter", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "currency", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "decimals", + "outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "spender", "type": "address" }, + { "internalType": "uint256", "name": "decrement", "type": "uint256" } + ], + "name": "decreaseAllowance", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "referral", "type": "address" } + ], + "name": "deposit", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "ethReceiver", + "outputs": [ + { "internalType": "address", "name": "_ethReceiver", "type": "address" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "exchangeRate", + "outputs": [ + { "internalType": "uint256", "name": "_exchangeRate", "type": "uint256" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "spender", "type": "address" }, + { "internalType": "uint256", "name": "increment", "type": "uint256" } + ], + "name": "increaseAllowance", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "string", "name": "tokenName", "type": "string" }, + { "internalType": "string", "name": "tokenSymbol", "type": "string" }, + { "internalType": "string", "name": "tokenCurrency", "type": "string" }, + { "internalType": "uint8", "name": "tokenDecimals", "type": "uint8" }, + { + "internalType": "address", + "name": "newMasterMinter", + "type": "address" + }, + { "internalType": "address", "name": "newPauser", "type": "address" }, + { + "internalType": "address", + "name": "newBlacklister", + "type": "address" + }, + { "internalType": "address", "name": "newOwner", "type": "address" } + ], + "name": "initialize", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "string", "name": "newName", "type": "string" } + ], + "name": "initializeV2", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "lostAndFound", "type": "address" } + ], + "name": "initializeV2_1", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_account", "type": "address" } + ], + "name": "isBlacklisted", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "account", "type": "address" } + ], + "name": "isMinter", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "masterMinter", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_to", "type": "address" }, + { "internalType": "uint256", "name": "_amount", "type": "uint256" } + ], + "name": "mint", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "mint", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "minter", "type": "address" } + ], + "name": "minterAllowance", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "moveToStakingAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "moveToUnwrapAddress", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "owner", "type": "address" } + ], + "name": "nonces", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "operator", + "outputs": [ + { "internalType": "address", "name": "_operator", "type": "address" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "oracle", + "outputs": [ + { "internalType": "address", "name": "_oracle", "type": "address" } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "paused", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "pauser", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "owner", "type": "address" }, + { "internalType": "address", "name": "spender", "type": "address" }, + { "internalType": "uint256", "name": "value", "type": "uint256" }, + { "internalType": "uint256", "name": "deadline", "type": "uint256" }, + { "internalType": "uint8", "name": "v", "type": "uint8" }, + { "internalType": "bytes32", "name": "r", "type": "bytes32" }, + { "internalType": "bytes32", "name": "s", "type": "bytes32" } + ], + "name": "permit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "from", "type": "address" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "value", "type": "uint256" }, + { "internalType": "uint256", "name": "validAfter", "type": "uint256" }, + { "internalType": "uint256", "name": "validBefore", "type": "uint256" }, + { "internalType": "bytes32", "name": "nonce", "type": "bytes32" }, + { "internalType": "uint8", "name": "v", "type": "uint8" }, + { "internalType": "bytes32", "name": "r", "type": "bytes32" }, + { "internalType": "bytes32", "name": "s", "type": "bytes32" } + ], + "name": "receiveWithAuthorization", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "minter", "type": "address" } + ], + "name": "removeMinter", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "uint256", "name": "wbethAmount", "type": "uint256" } + ], + "name": "requestWithdrawEth", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "contract IERC20", + "name": "tokenContract", + "type": "address" + }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "amount", "type": "uint256" } + ], + "name": "rescueERC20", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "rescuer", + "outputs": [{ "internalType": "address", "name": "", "type": "address" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "supplyEth", + "outputs": [], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "symbol", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "totalSupply", + "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "value", "type": "uint256" } + ], + "name": "transfer", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "from", "type": "address" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "value", "type": "uint256" } + ], + "name": "transferFrom", + "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "newOwner", "type": "address" } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "from", "type": "address" }, + { "internalType": "address", "name": "to", "type": "address" }, + { "internalType": "uint256", "name": "value", "type": "uint256" }, + { "internalType": "uint256", "name": "validAfter", "type": "uint256" }, + { "internalType": "uint256", "name": "validBefore", "type": "uint256" }, + { "internalType": "bytes32", "name": "nonce", "type": "bytes32" }, + { "internalType": "uint8", "name": "v", "type": "uint8" }, + { "internalType": "bytes32", "name": "r", "type": "bytes32" }, + { "internalType": "bytes32", "name": "s", "type": "bytes32" } + ], + "name": "transferWithAuthorization", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_account", "type": "address" } + ], + "name": "unBlacklist", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "unpause", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newBlacklister", + "type": "address" + } + ], + "name": "updateBlacklister", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "newEthReceiver", "type": "address" } + ], + "name": "updateEthReceiver", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "newExchangeRate", + "type": "uint256" + } + ], + "name": "updateExchangeRate", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_newMasterMinter", + "type": "address" + } + ], + "name": "updateMasterMinter", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "newOperator", "type": "address" } + ], + "name": "updateOperator", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "newOracle", "type": "address" } + ], + "name": "updateOracle", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "_newPauser", "type": "address" } + ], + "name": "updatePauser", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { "internalType": "address", "name": "newRescuer", "type": "address" } + ], + "name": "updateRescuer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "version", + "outputs": [{ "internalType": "string", "name": "", "type": "string" }], + "stateMutability": "view", + "type": "function" + }, + { "stateMutability": "payable", "type": "receive" } +] diff --git a/subgraphs/karak/protocols/karak/config/templates/karak.template.yaml b/subgraphs/karak/protocols/karak/config/templates/karak.template.yaml index 3f1a1e246f..7db700540c 100644 --- a/subgraphs/karak/protocols/karak/config/templates/karak.template.yaml +++ b/subgraphs/karak/protocols/karak/config/templates/karak.template.yaml @@ -76,6 +76,17 @@ dataSources: file: ./abis/Prices/Uniswap/Factory.json - name: UniswapPair file: ./abis/Prices/Uniswap/Pair.json + # Pendle Contracts + - name: PendlePT + file: ./abis/Prices/PendlePT.json + - name: PendleSY + file: ./abis/Prices/PendleSY.json + - name: SFRAX + file: ./abis/Prices/SFRAX.json + - name: WBETH + file: ./abis/Prices/WBETH.json + - name: EigenpieMLRT + file: ./abis/Prices/EigenpieMLRT.json eventHandlers: - event: NewVault(indexed address) handler: handleNewVault @@ -147,6 +158,17 @@ dataSources: file: ./abis/Prices/Uniswap/Factory.json - name: UniswapPair file: ./abis/Prices/Uniswap/Pair.json + # Pendle Contracts + - name: PendlePT + file: ./abis/Prices/PendlePT.json + - name: PendleSY + file: ./abis/Prices/PendleSY.json + - name: SFRAX + file: ./abis/Prices/SFRAX.json + - name: WBETH + file: ./abis/Prices/WBETH.json + - name: EigenpieMLRT + file: ./abis/Prices/EigenpieMLRT.json eventHandlers: - event: StartedWithdrawal(indexed address,indexed address,indexed address,address,uint256) handler: handleStartedWithdrawal @@ -217,6 +239,17 @@ templates: file: ./abis/Prices/Uniswap/Factory.json - name: UniswapPair file: ./abis/Prices/Uniswap/Pair.json + # Pendle Contracts + - name: PendlePT + file: ./abis/Prices/PendlePT.json + - name: PendleSY + file: ./abis/Prices/PendleSY.json + - name: SFRAX + file: ./abis/Prices/SFRAX.json + - name: WBETH + file: ./abis/Prices/WBETH.json + - name: EigenpieMLRT + file: ./abis/Prices/EigenpieMLRT.json eventHandlers: - event: Deposit(indexed address,indexed address,uint256,uint256) handler: handleDeposit diff --git a/subgraphs/karak/src/mappings/handlers.ts b/subgraphs/karak/src/mappings/handlers.ts index 00b865f39a..73633e8fbe 100644 --- a/subgraphs/karak/src/mappings/handlers.ts +++ b/subgraphs/karak/src/mappings/handlers.ts @@ -1,8 +1,15 @@ -import { Address, BigDecimal, BigInt, log } from "@graphprotocol/graph-ts"; +import { + Address, + BigDecimal, + BigInt, + dataSource, + log, +} from "@graphprotocol/graph-ts"; import { Versions } from "../versions"; import { NetworkConfigs } from "../../configurations/configure"; import { getUsdPrice, getUsdPricePerToken } from "../prices"; +import { getUpdatedPricedToken } from "./helpers"; import { SDK } from "../sdk/protocols/generic"; import { ProtocolConfig, TokenPricer } from "../sdk/protocols/config"; @@ -27,16 +34,60 @@ const conf = new ProtocolConfig( class Pricer implements TokenPricer { getTokenPrice(token: Token): BigDecimal { - const pricedToken = Address.fromBytes(token.id); + const pricedToken = getUpdatedPricedToken( + dataSource.network(), + Address.fromBytes(token.id) + ); + const pricedTokenAddr = pricedToken.addr; + const pricedTokenMultiplier = pricedToken.multiplier; + const pricedTokenChanged = pricedToken.changed; - return getUsdPricePerToken(pricedToken).usdPrice; + const returnedPrice = getUsdPricePerToken(pricedTokenAddr).usdPrice.times( + pricedTokenMultiplier + ); + if (pricedTokenChanged) { + log.debug( + "[getTokenPrice] inputToken: {} pricedToken: {} multiplier: {} returnedPrice: {}", + [ + token.id.toHexString(), + pricedTokenAddr.toHexString(), + pricedTokenMultiplier.toString(), + returnedPrice.toString(), + ] + ); + } + + return returnedPrice; } getAmountValueUSD(token: Token, amount: BigInt): BigDecimal { - const pricedToken = Address.fromBytes(token.id); const _amount = bigIntToBigDecimal(amount, token.decimals); - return getUsdPrice(pricedToken, _amount); + const pricedToken = getUpdatedPricedToken( + dataSource.network(), + Address.fromBytes(token.id) + ); + const pricedTokenAddr = pricedToken.addr; + const pricedTokenMultiplier = pricedToken.multiplier; + const pricedTokenChanged = pricedToken.changed; + + const returnedPrice = getUsdPrice(pricedTokenAddr, _amount).times( + pricedTokenMultiplier + ); + if (pricedTokenChanged) { + log.debug( + "[getAmountValueUSD] inputToken: {} pricedToken: {} multiplier: {} amount: {} returnedPrice: {}", + [ + token.id.toHexString(), + pricedTokenAddr.toHexString(), + pricedTokenMultiplier.toString(), + _amount.toString(), + returnedPrice.toString(), + ] + ); + } + + return returnedPrice; } } @@ -104,7 +155,7 @@ export function handleDeposit(event: Deposit): void { const token = sdk.Tokens.getOrCreateToken(asset); const outputToken = sdk.Tokens.getOrCreateToken(event.address); - const pool = sdk.Pools.loadPool(token.id); + const pool = sdk.Pools.loadPool(outputToken.id); if (!pool.isInitialized) { pool.initialize( outputToken.name, @@ -150,7 +201,7 @@ export function handleWithdraw(event: Withdraw): void { const token = sdk.Tokens.getOrCreateToken(asset); const outputToken = sdk.Tokens.getOrCreateToken(event.address); - const pool = sdk.Pools.loadPool(token.id); + const pool = sdk.Pools.loadPool(outputToken.id); if (!pool.isInitialized) { pool.initialize( outputToken.name, diff --git a/subgraphs/karak/src/mappings/helpers.ts b/subgraphs/karak/src/mappings/helpers.ts new file mode 100644 index 0000000000..a16539353e --- /dev/null +++ b/subgraphs/karak/src/mappings/helpers.ts @@ -0,0 +1,202 @@ +import { Address, BigDecimal } from "@graphprotocol/graph-ts"; + +import { bigIntToBigDecimal } from "../prices/common/utils"; +import { WETH_ADDRESS as WETH_ADDRESS_MAINNET } from "../prices/config/mainnet"; +import { WETH_ADDRESS as WETH_ADDRESS_ARBITRUM } from "../prices/config/arbitrum"; +import { + WETH_ADDRESS as WETH_ADDRESS_BSC, + USDC_ADDRESS as USDC_ADDRESS_BSC, + BTC_ADDRESS as BTC_ADDRESS_BSC, +} from "../prices/config/bsc"; + +import { + BIGDECIMAL_ONE, + BIGINT_TEN_TO_EIGHTEENTH, + Network, +} from "../sdk/util/constants"; + +import { WBETH } from "../../generated/VaultSupervisor/WBETH"; +import { PendlePT } from "../../generated/VaultSupervisor/PendlePT"; +import { PendleSY } from "../../generated/VaultSupervisor/PendleSY"; +import { EigenpieMLRT } from "../../generated/VaultSupervisor/EigenpieMLRT"; +import { SFRAX } from "../../generated/VaultSupervisor/SFRAX"; + +export class PricedTokenParams { + addr: Address; + multiplier: BigDecimal; + changed: boolean; + + constructor(addr: Address, multiplier: BigDecimal, changed: boolean) { + this.addr = addr; + this.multiplier = multiplier; + this.changed = changed; + } +} + +export function getUpdatedPricedToken( + network: String, + tokenAddr: Address +): PricedTokenParams { + let pricedToken = tokenAddr; + let multiplier = BIGDECIMAL_ONE; + let changed = false; + + if (network == Network.MAINNET) { + // Case: inputToken is mwBETH or mswETH + if ( + [ + Address.fromString("0xe46a5e19b19711332e33f33c2db3ea143e86bc10"), + Address.fromString("0x32bd822d615a3658a68b6fdd30c2fcb2c996d678"), + ].includes(pricedToken) + ) { + const mlrtContract = EigenpieMLRT.bind(pricedToken); + const underlyingAssetCall = mlrtContract.try_underlyingAsset(); + if (!underlyingAssetCall.reverted) { + pricedToken = underlyingAssetCall.value; + changed = true; + } + } + + // Case: inputToken is wBETH + if ( + [ + Address.fromString("0xa2e3356610840701bdf5611a53974510ae27e2e1"), + ].includes(pricedToken) + ) { + const wbEthContract = WBETH.bind(pricedToken); + const exchangeRateCall = wbEthContract.try_exchangeRate(); + if (!exchangeRateCall.reverted) { + pricedToken = WETH_ADDRESS_MAINNET; + multiplier = bigIntToBigDecimal(exchangeRateCall.value); + changed = true; + } + } + + // Case: inputToken is sfrxETH or sFRAX or apxETH + if ( + [ + Address.fromString("0xac3e018457b222d93114458476f3e3416abbe38f"), + Address.fromString("0xa663b02cf0a4b149d2ad41910cb81e23e1c41c32"), + Address.fromString("0x9ba021b0a9b958b5e75ce9f6dff97c7ee52cb3e6"), + ].includes(pricedToken) + ) { + const sFraxContract = SFRAX.bind(pricedToken); + const assetCall = sFraxContract.try_asset(); + if (!assetCall.reverted) { + pricedToken = assetCall.value; + changed = true; + + const miltipleCall = sFraxContract.try_convertToAssets( + BIGINT_TEN_TO_EIGHTEENTH + ); + if (!miltipleCall.reverted) { + multiplier = bigIntToBigDecimal(miltipleCall.value); + } + } + } + if ( + [ + Address.fromString("0x04c154b66cb340f3ae24111cc767e0184ed00cc6"), + Address.fromString("0x5e8422345238f34275888049021821e8e08caa1f"), + ].includes(pricedToken) + ) { + pricedToken = WETH_ADDRESS_MAINNET; + changed = true; + } + + // Case: inputToken is Pendle PT + if ( + [ + Address.fromString("0xc69ad9bab1dee23f4605a82b3354f8e40d1e5966"), + Address.fromString("0x6ee2b5e19ecba773a352e5b21415dc419a700d1d"), + ].includes(pricedToken) + ) { + const pendlePTContract = PendlePT.bind(pricedToken); + const SYCall = pendlePTContract.try_SY(); + if (!SYCall.reverted) { + const pendleSYContract = PendleSY.bind(SYCall.value); + const assetInfoCall = pendleSYContract.try_assetInfo(); + if (!assetInfoCall.reverted) { + pricedToken = assetInfoCall.value.getValue1(); + changed = true; + } + } + } + if ( + [ + Address.fromString("0x5cb12d56f5346a016dbba8ca90635d82e6d1bcea"), + ].includes(pricedToken) + ) { + pricedToken = Address.fromString( + "0xfae103dc9cf190ed75350761e95403b7b8afa6c0" + ); + changed = true; + } + if ( + [ + Address.fromString("0xb05cabcd99cf9a73b19805edefc5f67ca5d1895e"), + ].includes(pricedToken) + ) { + pricedToken = Address.fromString( + "0xa1290d69c65a6fe4df752f95823fae25cb99e5a7" + ); + changed = true; + } + + // Case: inputToken is ezETH + if ( + [ + Address.fromString("0xbf5495efe5db9ce00f80364c8b423567e58d2110"), + ].includes(pricedToken) + ) { + pricedToken = WETH_ADDRESS_MAINNET; + changed = true; + } + } + if (network == Network.ARBITRUM_ONE) { + // Case: inputToken is weETH or ezETH or Pendle PT-eth tokens + if ( + [ + Address.fromString("0xafd22f824d51fb7eed4778d303d4388ac644b026"), + Address.fromString("0x8ea5040d423410f1fdc363379af88e1db5ea1c34"), + Address.fromString("0x35751007a407ca6feffe80b3cb397736d2cf4dbe"), + Address.fromString("0x2416092f143378750bb29b79ed961ab195cceea5"), + Address.fromString("0x1c27ad8a19ba026adabd615f6bc77158130cfbe4"), + ].includes(pricedToken) + ) { + pricedToken = WETH_ADDRESS_ARBITRUM; + changed = true; + } + } + if (network == Network.BSC) { + // Case: inputToken is slisBNB + if ( + [ + Address.fromString("0xb0b84d294e0c75a6abe60171b70edeb2efd14a1b"), + ].includes(pricedToken) + ) { + pricedToken = WETH_ADDRESS_BSC; + changed = true; + } + // Case: inputToken is lisUSD + if ( + [ + Address.fromString("0x0782b6d8c4551b9760e74c0545a9bcd90bdc41e5"), + ].includes(pricedToken) + ) { + pricedToken = USDC_ADDRESS_BSC; + changed = true; + } + // Case: inputToken is SolvBTC + if ( + [ + Address.fromString("0x4aae823a6a0b376de6a78e74ecc5b079d38cbcf7"), + ].includes(pricedToken) + ) { + pricedToken = BTC_ADDRESS_BSC; + changed = true; + } + } + + return new PricedTokenParams(pricedToken, multiplier, changed); +} diff --git a/subgraphs/karak/src/prices/config/bsc.ts b/subgraphs/karak/src/prices/config/bsc.ts index ecef0f8d3e..96ef057ad4 100644 --- a/subgraphs/karak/src/prices/config/bsc.ts +++ b/subgraphs/karak/src/prices/config/bsc.ts @@ -59,6 +59,9 @@ export const WETH_ADDRESS = Address.fromString( export const USDC_ADDRESS = Address.fromString( "0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d" ); +export const BTC_ADDRESS = Address.fromString( + "0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c" +); export class config implements Configurations { network(): string {