From 48c18ce8bc10225345e5964aa9e796f838f1df69 Mon Sep 17 00:00:00 2001 From: William Poulin Date: Tue, 2 Jan 2024 17:39:24 -0500 Subject: [PATCH] fix build --- src/apps/camelot/contracts/viem/index.ts | 2 - src/apps/gearbox/gearbox.module.ts | 2 - .../penguin/contracts/abis/penguin-vault.json | 1567 ++++++++++++++++ .../contracts/viem.contract-factory.ts | 4 + .../penguin/contracts/viem/PenguinVault.ts | 1581 +++++++++++++++++ src/apps/penguin/contracts/viem/index.ts | 2 + 6 files changed, 3154 insertions(+), 4 deletions(-) create mode 100644 src/apps/penguin/contracts/abis/penguin-vault.json create mode 100644 src/apps/penguin/contracts/viem/PenguinVault.ts diff --git a/src/apps/camelot/contracts/viem/index.ts b/src/apps/camelot/contracts/viem/index.ts index e14f17f75..db18462ab 100644 --- a/src/apps/camelot/contracts/viem/index.ts +++ b/src/apps/camelot/contracts/viem/index.ts @@ -9,7 +9,6 @@ export type { CamelotNftPool } from './CamelotNftPool'; export type { CamelotNitroFactory } from './CamelotNitroFactory'; export type { CamelotNitroPool } from './CamelotNitroPool'; export type { CamelotPair } from './CamelotPair'; -export type { CamelotXGrail } from './CamelotXGrail'; export { CamelotDividend__factory } from './CamelotDividend'; export { CamelotFactory__factory } from './CamelotFactory'; @@ -18,4 +17,3 @@ export { CamelotNftPool__factory } from './CamelotNftPool'; export { CamelotNitroFactory__factory } from './CamelotNitroFactory'; export { CamelotNitroPool__factory } from './CamelotNitroPool'; export { CamelotPair__factory } from './CamelotPair'; -export { CamelotXGrail__factory } from './CamelotXGrail'; diff --git a/src/apps/gearbox/gearbox.module.ts b/src/apps/gearbox/gearbox.module.ts index 331126264..4768068a3 100644 --- a/src/apps/gearbox/gearbox.module.ts +++ b/src/apps/gearbox/gearbox.module.ts @@ -6,7 +6,6 @@ import { GearboxViemContractFactory } from './contracts'; import { EthereumGearboxCreditAccountsContractPositionFetcher } from './ethereum/gearbox.credit-accounts.contract-position-fetcher'; import { EthereumGearboxLendingV2TokenFetcher } from './ethereum/gearbox.lending-v2.token-fetcher'; import { EthereumGearboxLendingV3TokenFetcher } from './ethereum/gearbox.lending-v3.token-fetcher'; -import { EthereumGearboxPhantomTokenFetcher } from './ethereum/gearbox.phantom.token-fetcher'; import { EthereumGearboxRewardsPositionFetcher } from './ethereum/gearbox.rewards.contract-position-fetcher'; import { EthereumGearboxRewardsMerkleCache } from './ethereum/gearbox.rewards.merkle-cache'; @@ -17,7 +16,6 @@ import { EthereumGearboxRewardsMerkleCache } from './ethereum/gearbox.rewards.me EthereumGearboxCreditAccountsContractPositionFetcher, EthereumGearboxLendingV2TokenFetcher, EthereumGearboxLendingV3TokenFetcher, - EthereumGearboxPhantomTokenFetcher, EthereumGearboxRewardsPositionFetcher, ], }) diff --git a/src/apps/penguin/contracts/abis/penguin-vault.json b/src/apps/penguin/contracts/abis/penguin-vault.json new file mode 100644 index 000000000..7da2ee4bb --- /dev/null +++ b/src/apps/penguin/contracts/abis/penguin-vault.json @@ -0,0 +1,1567 @@ +[ + { + "type": "constructor", + "stateMutability": "nonpayable", + "inputs": [ + { + "type": "string", + "name": "_name", + "internalType": "string" + }, + { + "type": "address[8]", + "name": "_initAddressArray", + "internalType": "address[8]" + }, + { + "type": "uint256", + "name": "_pid", + "internalType": "uint256" + }, + { + "type": "uint256", + "name": "_minTokensToReinvest", + "internalType": "uint256" + }, + { + "type": "uint256[4]", + "name": "_initFeeStructure", + "internalType": "uint256[4]" + }, + { + "type": "address[]", + "name": "_pathRewardToToken0", + "internalType": "address[]" + }, + { + "type": "address[]", + "name": "_pathRewardToToken1", + "internalType": "address[]" + }, + { + "type": "address", + "name": "_pefiGlobalVariables", + "internalType": "address" + }, + { + "type": "bool", + "name": "_USE_GLOBAL_PEFI_VARIABLES", + "internalType": "bool" + } + ] + }, + { + "type": "event", + "name": "Approval", + "inputs": [ + { + "type": "address", + "name": "owner", + "internalType": "address", + "indexed": true + }, + { + "type": "address", + "name": "spender", + "internalType": "address", + "indexed": true + }, + { + "type": "uint256", + "name": "value", + "internalType": "uint256", + "indexed": false + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "ClaimedxPEFI", + "inputs": [ + { + "type": "address", + "name": "account", + "internalType": "address", + "indexed": true + }, + { + "type": "uint256", + "name": "amount", + "internalType": "uint256", + "indexed": false + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Deposit", + "inputs": [ + { + "type": "address", + "name": "account", + "internalType": "address", + "indexed": true + }, + { + "type": "uint256", + "name": "amount", + "internalType": "uint256", + "indexed": false + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "DepositsEnabled", + "inputs": [ + { + "type": "bool", + "name": "newValue", + "internalType": "bool", + "indexed": false + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "FeeStructureUpdated", + "inputs": [ + { + "type": "uint256", + "name": "newPOOL_CREATOR_FEE_BIPS", + "internalType": "uint256", + "indexed": false + }, + { + "type": "uint256", + "name": "newNEST_FEE_BIPS", + "internalType": "uint256", + "indexed": false + }, + { + "type": "uint256", + "name": "newDEV_FEE_BIPS", + "internalType": "uint256", + "indexed": false + }, + { + "type": "uint256", + "name": "newALTERNATE_FEE_BIPS", + "internalType": "uint256", + "indexed": false + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "NestStakingBipsChanged", + "inputs": [ + { + "type": "uint256", + "name": "oldNEST_STAKING_BIPS", + "internalType": "uint256", + "indexed": false + }, + { + "type": "uint256", + "name": "newNEST_STAKING_BIPS", + "internalType": "uint256", + "indexed": false + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "OwnershipTransferred", + "inputs": [ + { + "type": "address", + "name": "previousOwner", + "internalType": "address", + "indexed": true + }, + { + "type": "address", + "name": "newOwner", + "internalType": "address", + "indexed": true + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Recovered", + "inputs": [ + { + "type": "address", + "name": "token", + "internalType": "address", + "indexed": false + }, + { + "type": "uint256", + "name": "amount", + "internalType": "uint256", + "indexed": false + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Reinvest", + "inputs": [ + { + "type": "uint256", + "name": "newTotalDeposits", + "internalType": "uint256", + "indexed": false + }, + { + "type": "uint256", + "name": "newTotalSupply", + "internalType": "uint256", + "indexed": false + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "StakedPEFI", + "inputs": [ + { + "type": "uint256", + "name": "amountPefiSentToNest", + "internalType": "uint256", + "indexed": false + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Transfer", + "inputs": [ + { + "type": "address", + "name": "from", + "internalType": "address", + "indexed": true + }, + { + "type": "address", + "name": "to", + "internalType": "address", + "indexed": true + }, + { + "type": "uint256", + "name": "value", + "internalType": "uint256", + "indexed": false + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "UpdateAlternateAddress", + "inputs": [ + { + "type": "address", + "name": "oldValue", + "internalType": "address", + "indexed": false + }, + { + "type": "address", + "name": "newValue", + "internalType": "address", + "indexed": false + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "UpdateDevAddress", + "inputs": [ + { + "type": "address", + "name": "oldValue", + "internalType": "address", + "indexed": false + }, + { + "type": "address", + "name": "newValue", + "internalType": "address", + "indexed": false + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "UpdateMaxTokensToDepositWithoutReinvest", + "inputs": [ + { + "type": "uint256", + "name": "oldValue", + "internalType": "uint256", + "indexed": false + }, + { + "type": "uint256", + "name": "newValue", + "internalType": "uint256", + "indexed": false + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "UpdateMinTokensToReinvest", + "inputs": [ + { + "type": "uint256", + "name": "oldValue", + "internalType": "uint256", + "indexed": false + }, + { + "type": "uint256", + "name": "newValue", + "internalType": "uint256", + "indexed": false + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "UpdateNestAddress", + "inputs": [ + { + "type": "address", + "name": "oldValue", + "internalType": "address", + "indexed": false + }, + { + "type": "address", + "name": "newValue", + "internalType": "address", + "indexed": false + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "UpdatePoolCreatorAddress", + "inputs": [ + { + "type": "address", + "name": "oldValue", + "internalType": "address", + "indexed": false + }, + { + "type": "address", + "name": "newValue", + "internalType": "address", + "indexed": false + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "UseGlobalVariablesUpdated", + "inputs": [ + { + "type": "bool", + "name": "newValue", + "internalType": "bool", + "indexed": false + } + ], + "anonymous": false + }, + { + "type": "event", + "name": "Withdraw", + "inputs": [ + { + "type": "address", + "name": "account", + "internalType": "address", + "indexed": true + }, + { + "type": "uint256", + "name": "amount", + "internalType": "uint256", + "indexed": false + } + ], + "anonymous": false + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], + "name": "ALTERNATE_FEE_BIPS", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], + "name": "ALTERNATE_FEE_BIPS_LOCAL", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "bool", + "name": "", + "internalType": "bool" + } + ], + "name": "DEPOSITS_ENABLED", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], + "name": "DEV_FEE_BIPS", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], + "name": "DEV_FEE_BIPS_LOCAL", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "bytes32", + "name": "", + "internalType": "bytes32" + } + ], + "name": "DOMAIN_TYPEHASH", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], + "name": "MAX_TOKENS_TO_DEPOSIT_WITHOUT_REINVEST", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], + "name": "MAX_TOTAL_FEE", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], + "name": "MIN_TOKENS_TO_REINVEST", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], + "name": "NEST_FEE_BIPS", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], + "name": "NEST_FEE_BIPS_LOCAL", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], + "name": "NEST_STAKING_BIPS", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "bytes32", + "name": "", + "internalType": "bytes32" + } + ], + "name": "PERMIT_TYPEHASH", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], + "name": "PID", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], + "name": "POOL_CREATOR_FEE_BIPS", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], + "name": "POOL_CREATOR_FEE_BIPS_LOCAL", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "bool", + "name": "", + "internalType": "bool" + } + ], + "name": "USE_GLOBAL_PEFI_VARIABLES", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "bytes32", + "name": "", + "internalType": "bytes32" + } + ], + "name": "VERSION_HASH", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], + "name": "allowance", + "inputs": [ + { + "type": "address", + "name": "account", + "internalType": "address" + }, + { + "type": "address", + "name": "spender", + "internalType": "address" + } + ] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "address", + "name": "", + "internalType": "address" + } + ], + "name": "alternateAddress", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "address", + "name": "", + "internalType": "address" + } + ], + "name": "alternateAddressLocal", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [ + { + "type": "bool", + "name": "", + "internalType": "bool" + } + ], + "name": "approve", + "inputs": [ + { + "type": "address", + "name": "spender", + "internalType": "address" + }, + { + "type": "uint256", + "name": "amount", + "internalType": "uint256" + } + ] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], + "name": "balanceOf", + "inputs": [ + { + "type": "address", + "name": "account", + "internalType": "address" + } + ] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], + "name": "checkReward", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "claimXPEFI", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "uint8", + "name": "", + "internalType": "uint8" + } + ], + "name": "decimals", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "deposit", + "inputs": [ + { + "type": "uint256", + "name": "amount", + "internalType": "uint256" + } + ] + }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "depositFor", + "inputs": [ + { + "type": "address", + "name": "account", + "internalType": "address" + }, + { + "type": "uint256", + "name": "amount", + "internalType": "uint256" + } + ] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "address", + "name": "", + "internalType": "contract IERC20" + } + ], + "name": "depositToken", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "depositWithPermit", + "inputs": [ + { + "type": "uint256", + "name": "amount", + "internalType": "uint256" + }, + { + "type": "uint256", + "name": "deadline", + "internalType": "uint256" + }, + { + "type": "uint8", + "name": "v", + "internalType": "uint8" + }, + { + "type": "bytes32", + "name": "r", + "internalType": "bytes32" + }, + { + "type": "bytes32", + "name": "s", + "internalType": "bytes32" + } + ] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "address", + "name": "", + "internalType": "address" + } + ], + "name": "devAddress", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "address", + "name": "", + "internalType": "address" + } + ], + "name": "devAddressLocal", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], + "name": "estimateDeployedBalance", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], + "name": "estimateReinvestReward", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], + "name": "getDepositTokensForShares", + "inputs": [ + { + "type": "uint256", + "name": "amount", + "internalType": "uint256" + } + ] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "bytes32", + "name": "", + "internalType": "bytes32" + } + ], + "name": "getDomainSeparator", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], + "name": "getSharesForDepositTokens", + "inputs": [ + { + "type": "uint256", + "name": "amount", + "internalType": "uint256" + } + ] + }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "impromptuTokenAggregation", + "inputs": [ + { + "type": "uint256", + "name": "minReturnAmountAccepted", + "internalType": "uint256" + }, + { + "type": "bool", + "name": "disableDeposits", + "internalType": "bool" + } + ] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "string", + "name": "", + "internalType": "string" + } + ], + "name": "name", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "address", + "name": "", + "internalType": "address" + } + ], + "name": "nestAddress", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "address", + "name": "", + "internalType": "address" + } + ], + "name": "nestAddressLocal", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], + "name": "nonces", + "inputs": [ + { + "type": "address", + "name": "", + "internalType": "address" + } + ] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "address", + "name": "", + "internalType": "address" + } + ], + "name": "owner", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "address", + "name": "", + "internalType": "contract PenguinStrategyGlobalVariables" + } + ], + "name": "pefiGlobalVariableContract", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], + "name": "pendingXPefi", + "inputs": [ + { + "type": "address", + "name": "user", + "internalType": "address" + } + ] + }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "permit", + "inputs": [ + { + "type": "address", + "name": "owner", + "internalType": "address" + }, + { + "type": "address", + "name": "spender", + "internalType": "address" + }, + { + "type": "uint256", + "name": "value", + "internalType": "uint256" + }, + { + "type": "uint256", + "name": "deadline", + "internalType": "uint256" + }, + { + "type": "uint8", + "name": "v", + "internalType": "uint8" + }, + { + "type": "bytes32", + "name": "r", + "internalType": "bytes32" + }, + { + "type": "bytes32", + "name": "s", + "internalType": "bytes32" + } + ] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "address", + "name": "", + "internalType": "address" + } + ], + "name": "poolCreatorAddress", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "recoverAVAX", + "inputs": [ + { + "type": "uint256", + "name": "amount", + "internalType": "uint256" + } + ] + }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "recoverERC20", + "inputs": [ + { + "type": "address", + "name": "tokenAddress", + "internalType": "address" + }, + { + "type": "uint256", + "name": "tokenAmount", + "internalType": "uint256" + } + ] + }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "reinvest", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "renounceOwnership", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "revokeAllowance", + "inputs": [ + { + "type": "address", + "name": "token", + "internalType": "address" + }, + { + "type": "address", + "name": "spender", + "internalType": "address" + } + ] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "address", + "name": "", + "internalType": "contract IERC20" + } + ], + "name": "rewardToken", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "address", + "name": "", + "internalType": "contract IRouter" + } + ], + "name": "router", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "setAllowances", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "address", + "name": "", + "internalType": "address" + } + ], + "name": "stakingContract", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "string", + "name": "", + "internalType": "string" + } + ], + "name": "symbol", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "address", + "name": "", + "internalType": "address" + } + ], + "name": "token0", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "address", + "name": "", + "internalType": "address" + } + ], + "name": "token1", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], + "name": "totalDeposits", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], + "name": "totalSupply", + "inputs": [] + }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [ + { + "type": "bool", + "name": "", + "internalType": "bool" + } + ], + "name": "transfer", + "inputs": [ + { + "type": "address", + "name": "dst", + "internalType": "address" + }, + { + "type": "uint256", + "name": "amount", + "internalType": "uint256" + } + ] + }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [ + { + "type": "bool", + "name": "", + "internalType": "bool" + } + ], + "name": "transferFrom", + "inputs": [ + { + "type": "address", + "name": "src", + "internalType": "address" + }, + { + "type": "address", + "name": "dst", + "internalType": "address" + }, + { + "type": "uint256", + "name": "amount", + "internalType": "uint256" + } + ] + }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "transferOwnership", + "inputs": [ + { + "type": "address", + "name": "newOwner", + "internalType": "address" + } + ] + }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "updateAlternateAddress", + "inputs": [ + { + "type": "address", + "name": "newValue", + "internalType": "address" + } + ] + }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "updateDepositsEnabled", + "inputs": [ + { + "type": "bool", + "name": "newValue", + "internalType": "bool" + } + ] + }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "updateDevAddress", + "inputs": [ + { + "type": "address", + "name": "newValue", + "internalType": "address" + } + ] + }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "updateFeeStructure", + "inputs": [ + { + "type": "uint256", + "name": "newPOOL_CREATOR_FEE_BIPS", + "internalType": "uint256" + }, + { + "type": "uint256", + "name": "newNEST_FEE_BIPS", + "internalType": "uint256" + }, + { + "type": "uint256", + "name": "newDEV_FEE_BIPS", + "internalType": "uint256" + }, + { + "type": "uint256", + "name": "newALTERNATE_FEE_BIPS", + "internalType": "uint256" + } + ] + }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "updateMaxTokensToDepositWithoutReinvest", + "inputs": [ + { + "type": "uint256", + "name": "newValue", + "internalType": "uint256" + } + ] + }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "updateMinTokensToReinvest", + "inputs": [ + { + "type": "uint256", + "name": "newValue", + "internalType": "uint256" + } + ] + }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "updateNestAddress", + "inputs": [ + { + "type": "address", + "name": "newValue", + "internalType": "address" + } + ] + }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "updateNestStakingBips", + "inputs": [ + { + "type": "uint256", + "name": "newNEST_STAKING_BIPS", + "internalType": "uint256" + } + ] + }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "updatePoolCreatorAddress", + "inputs": [ + { + "type": "address", + "name": "newValue", + "internalType": "address" + } + ] + }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "updateUseGlobalVariables", + "inputs": [ + { + "type": "bool", + "name": "newValue", + "internalType": "bool" + } + ] + }, + { + "type": "function", + "stateMutability": "nonpayable", + "outputs": [], + "name": "withdraw", + "inputs": [ + { + "type": "uint256", + "name": "amount", + "internalType": "uint256" + } + ] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], + "name": "xPefiDebt", + "inputs": [ + { + "type": "address", + "name": "", + "internalType": "address" + } + ] + }, + { + "type": "function", + "stateMutability": "view", + "outputs": [ + { + "type": "uint256", + "name": "", + "internalType": "uint256" + } + ], + "name": "xPefiPerShare", + "inputs": [] + } +] diff --git a/src/apps/penguin/contracts/viem.contract-factory.ts b/src/apps/penguin/contracts/viem.contract-factory.ts index 467bca902..1a93bafef 100644 --- a/src/apps/penguin/contracts/viem.contract-factory.ts +++ b/src/apps/penguin/contracts/viem.contract-factory.ts @@ -9,6 +9,7 @@ import { PenguinExtraRewarder__factory, PenguinIPefi__factory, PenguinRewarderRate__factory, + PenguinVault__factory, PenguinXPefi__factory, } from './viem'; @@ -33,6 +34,9 @@ export class PenguinViemContractFactory { penguinRewarderRate({ address, network }: ContractOpts) { return PenguinRewarderRate__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); } + penguinVault({ address, network }: ContractOpts) { + return PenguinVault__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); + } penguinXPefi({ address, network }: ContractOpts) { return PenguinXPefi__factory.connect(address, this.appToolkit.getViemNetworkProvider(network)); } diff --git a/src/apps/penguin/contracts/viem/PenguinVault.ts b/src/apps/penguin/contracts/viem/PenguinVault.ts new file mode 100644 index 000000000..f2df4b78a --- /dev/null +++ b/src/apps/penguin/contracts/viem/PenguinVault.ts @@ -0,0 +1,1581 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import { getContract, GetContractReturnType, PublicClient } from 'viem'; + +export const penguinVaultAbi = [ + { + type: 'constructor', + stateMutability: 'nonpayable', + inputs: [ + { + type: 'string', + name: '_name', + internalType: 'string', + }, + { + type: 'address[8]', + name: '_initAddressArray', + internalType: 'address[8]', + }, + { + type: 'uint256', + name: '_pid', + internalType: 'uint256', + }, + { + type: 'uint256', + name: '_minTokensToReinvest', + internalType: 'uint256', + }, + { + type: 'uint256[4]', + name: '_initFeeStructure', + internalType: 'uint256[4]', + }, + { + type: 'address[]', + name: '_pathRewardToToken0', + internalType: 'address[]', + }, + { + type: 'address[]', + name: '_pathRewardToToken1', + internalType: 'address[]', + }, + { + type: 'address', + name: '_pefiGlobalVariables', + internalType: 'address', + }, + { + type: 'bool', + name: '_USE_GLOBAL_PEFI_VARIABLES', + internalType: 'bool', + }, + ], + }, + { + type: 'event', + name: 'Approval', + inputs: [ + { + type: 'address', + name: 'owner', + internalType: 'address', + indexed: true, + }, + { + type: 'address', + name: 'spender', + internalType: 'address', + indexed: true, + }, + { + type: 'uint256', + name: 'value', + internalType: 'uint256', + indexed: false, + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'ClaimedxPEFI', + inputs: [ + { + type: 'address', + name: 'account', + internalType: 'address', + indexed: true, + }, + { + type: 'uint256', + name: 'amount', + internalType: 'uint256', + indexed: false, + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'Deposit', + inputs: [ + { + type: 'address', + name: 'account', + internalType: 'address', + indexed: true, + }, + { + type: 'uint256', + name: 'amount', + internalType: 'uint256', + indexed: false, + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'DepositsEnabled', + inputs: [ + { + type: 'bool', + name: 'newValue', + internalType: 'bool', + indexed: false, + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'FeeStructureUpdated', + inputs: [ + { + type: 'uint256', + name: 'newPOOL_CREATOR_FEE_BIPS', + internalType: 'uint256', + indexed: false, + }, + { + type: 'uint256', + name: 'newNEST_FEE_BIPS', + internalType: 'uint256', + indexed: false, + }, + { + type: 'uint256', + name: 'newDEV_FEE_BIPS', + internalType: 'uint256', + indexed: false, + }, + { + type: 'uint256', + name: 'newALTERNATE_FEE_BIPS', + internalType: 'uint256', + indexed: false, + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'NestStakingBipsChanged', + inputs: [ + { + type: 'uint256', + name: 'oldNEST_STAKING_BIPS', + internalType: 'uint256', + indexed: false, + }, + { + type: 'uint256', + name: 'newNEST_STAKING_BIPS', + internalType: 'uint256', + indexed: false, + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'OwnershipTransferred', + inputs: [ + { + type: 'address', + name: 'previousOwner', + internalType: 'address', + indexed: true, + }, + { + type: 'address', + name: 'newOwner', + internalType: 'address', + indexed: true, + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'Recovered', + inputs: [ + { + type: 'address', + name: 'token', + internalType: 'address', + indexed: false, + }, + { + type: 'uint256', + name: 'amount', + internalType: 'uint256', + indexed: false, + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'Reinvest', + inputs: [ + { + type: 'uint256', + name: 'newTotalDeposits', + internalType: 'uint256', + indexed: false, + }, + { + type: 'uint256', + name: 'newTotalSupply', + internalType: 'uint256', + indexed: false, + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'StakedPEFI', + inputs: [ + { + type: 'uint256', + name: 'amountPefiSentToNest', + internalType: 'uint256', + indexed: false, + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'Transfer', + inputs: [ + { + type: 'address', + name: 'from', + internalType: 'address', + indexed: true, + }, + { + type: 'address', + name: 'to', + internalType: 'address', + indexed: true, + }, + { + type: 'uint256', + name: 'value', + internalType: 'uint256', + indexed: false, + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'UpdateAlternateAddress', + inputs: [ + { + type: 'address', + name: 'oldValue', + internalType: 'address', + indexed: false, + }, + { + type: 'address', + name: 'newValue', + internalType: 'address', + indexed: false, + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'UpdateDevAddress', + inputs: [ + { + type: 'address', + name: 'oldValue', + internalType: 'address', + indexed: false, + }, + { + type: 'address', + name: 'newValue', + internalType: 'address', + indexed: false, + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'UpdateMaxTokensToDepositWithoutReinvest', + inputs: [ + { + type: 'uint256', + name: 'oldValue', + internalType: 'uint256', + indexed: false, + }, + { + type: 'uint256', + name: 'newValue', + internalType: 'uint256', + indexed: false, + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'UpdateMinTokensToReinvest', + inputs: [ + { + type: 'uint256', + name: 'oldValue', + internalType: 'uint256', + indexed: false, + }, + { + type: 'uint256', + name: 'newValue', + internalType: 'uint256', + indexed: false, + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'UpdateNestAddress', + inputs: [ + { + type: 'address', + name: 'oldValue', + internalType: 'address', + indexed: false, + }, + { + type: 'address', + name: 'newValue', + internalType: 'address', + indexed: false, + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'UpdatePoolCreatorAddress', + inputs: [ + { + type: 'address', + name: 'oldValue', + internalType: 'address', + indexed: false, + }, + { + type: 'address', + name: 'newValue', + internalType: 'address', + indexed: false, + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'UseGlobalVariablesUpdated', + inputs: [ + { + type: 'bool', + name: 'newValue', + internalType: 'bool', + indexed: false, + }, + ], + anonymous: false, + }, + { + type: 'event', + name: 'Withdraw', + inputs: [ + { + type: 'address', + name: 'account', + internalType: 'address', + indexed: true, + }, + { + type: 'uint256', + name: 'amount', + internalType: 'uint256', + indexed: false, + }, + ], + anonymous: false, + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'uint256', + name: '', + internalType: 'uint256', + }, + ], + name: 'ALTERNATE_FEE_BIPS', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'uint256', + name: '', + internalType: 'uint256', + }, + ], + name: 'ALTERNATE_FEE_BIPS_LOCAL', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'bool', + name: '', + internalType: 'bool', + }, + ], + name: 'DEPOSITS_ENABLED', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'uint256', + name: '', + internalType: 'uint256', + }, + ], + name: 'DEV_FEE_BIPS', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'uint256', + name: '', + internalType: 'uint256', + }, + ], + name: 'DEV_FEE_BIPS_LOCAL', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'bytes32', + name: '', + internalType: 'bytes32', + }, + ], + name: 'DOMAIN_TYPEHASH', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'uint256', + name: '', + internalType: 'uint256', + }, + ], + name: 'MAX_TOKENS_TO_DEPOSIT_WITHOUT_REINVEST', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'uint256', + name: '', + internalType: 'uint256', + }, + ], + name: 'MAX_TOTAL_FEE', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'uint256', + name: '', + internalType: 'uint256', + }, + ], + name: 'MIN_TOKENS_TO_REINVEST', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'uint256', + name: '', + internalType: 'uint256', + }, + ], + name: 'NEST_FEE_BIPS', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'uint256', + name: '', + internalType: 'uint256', + }, + ], + name: 'NEST_FEE_BIPS_LOCAL', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'uint256', + name: '', + internalType: 'uint256', + }, + ], + name: 'NEST_STAKING_BIPS', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'bytes32', + name: '', + internalType: 'bytes32', + }, + ], + name: 'PERMIT_TYPEHASH', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'uint256', + name: '', + internalType: 'uint256', + }, + ], + name: 'PID', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'uint256', + name: '', + internalType: 'uint256', + }, + ], + name: 'POOL_CREATOR_FEE_BIPS', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'uint256', + name: '', + internalType: 'uint256', + }, + ], + name: 'POOL_CREATOR_FEE_BIPS_LOCAL', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'bool', + name: '', + internalType: 'bool', + }, + ], + name: 'USE_GLOBAL_PEFI_VARIABLES', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'bytes32', + name: '', + internalType: 'bytes32', + }, + ], + name: 'VERSION_HASH', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'uint256', + name: '', + internalType: 'uint256', + }, + ], + name: 'allowance', + inputs: [ + { + type: 'address', + name: 'account', + internalType: 'address', + }, + { + type: 'address', + name: 'spender', + internalType: 'address', + }, + ], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'address', + name: '', + internalType: 'address', + }, + ], + name: 'alternateAddress', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'address', + name: '', + internalType: 'address', + }, + ], + name: 'alternateAddressLocal', + inputs: [], + }, + { + type: 'function', + stateMutability: 'nonpayable', + outputs: [ + { + type: 'bool', + name: '', + internalType: 'bool', + }, + ], + name: 'approve', + inputs: [ + { + type: 'address', + name: 'spender', + internalType: 'address', + }, + { + type: 'uint256', + name: 'amount', + internalType: 'uint256', + }, + ], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'uint256', + name: '', + internalType: 'uint256', + }, + ], + name: 'balanceOf', + inputs: [ + { + type: 'address', + name: 'account', + internalType: 'address', + }, + ], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'uint256', + name: '', + internalType: 'uint256', + }, + ], + name: 'checkReward', + inputs: [], + }, + { + type: 'function', + stateMutability: 'nonpayable', + outputs: [], + name: 'claimXPEFI', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'uint8', + name: '', + internalType: 'uint8', + }, + ], + name: 'decimals', + inputs: [], + }, + { + type: 'function', + stateMutability: 'nonpayable', + outputs: [], + name: 'deposit', + inputs: [ + { + type: 'uint256', + name: 'amount', + internalType: 'uint256', + }, + ], + }, + { + type: 'function', + stateMutability: 'nonpayable', + outputs: [], + name: 'depositFor', + inputs: [ + { + type: 'address', + name: 'account', + internalType: 'address', + }, + { + type: 'uint256', + name: 'amount', + internalType: 'uint256', + }, + ], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'address', + name: '', + internalType: 'contract IERC20', + }, + ], + name: 'depositToken', + inputs: [], + }, + { + type: 'function', + stateMutability: 'nonpayable', + outputs: [], + name: 'depositWithPermit', + inputs: [ + { + type: 'uint256', + name: 'amount', + internalType: 'uint256', + }, + { + type: 'uint256', + name: 'deadline', + internalType: 'uint256', + }, + { + type: 'uint8', + name: 'v', + internalType: 'uint8', + }, + { + type: 'bytes32', + name: 'r', + internalType: 'bytes32', + }, + { + type: 'bytes32', + name: 's', + internalType: 'bytes32', + }, + ], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'address', + name: '', + internalType: 'address', + }, + ], + name: 'devAddress', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'address', + name: '', + internalType: 'address', + }, + ], + name: 'devAddressLocal', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'uint256', + name: '', + internalType: 'uint256', + }, + ], + name: 'estimateDeployedBalance', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'uint256', + name: '', + internalType: 'uint256', + }, + ], + name: 'estimateReinvestReward', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'uint256', + name: '', + internalType: 'uint256', + }, + ], + name: 'getDepositTokensForShares', + inputs: [ + { + type: 'uint256', + name: 'amount', + internalType: 'uint256', + }, + ], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'bytes32', + name: '', + internalType: 'bytes32', + }, + ], + name: 'getDomainSeparator', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'uint256', + name: '', + internalType: 'uint256', + }, + ], + name: 'getSharesForDepositTokens', + inputs: [ + { + type: 'uint256', + name: 'amount', + internalType: 'uint256', + }, + ], + }, + { + type: 'function', + stateMutability: 'nonpayable', + outputs: [], + name: 'impromptuTokenAggregation', + inputs: [ + { + type: 'uint256', + name: 'minReturnAmountAccepted', + internalType: 'uint256', + }, + { + type: 'bool', + name: 'disableDeposits', + internalType: 'bool', + }, + ], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'string', + name: '', + internalType: 'string', + }, + ], + name: 'name', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'address', + name: '', + internalType: 'address', + }, + ], + name: 'nestAddress', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'address', + name: '', + internalType: 'address', + }, + ], + name: 'nestAddressLocal', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'uint256', + name: '', + internalType: 'uint256', + }, + ], + name: 'nonces', + inputs: [ + { + type: 'address', + name: '', + internalType: 'address', + }, + ], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'address', + name: '', + internalType: 'address', + }, + ], + name: 'owner', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'address', + name: '', + internalType: 'contract PenguinStrategyGlobalVariables', + }, + ], + name: 'pefiGlobalVariableContract', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'uint256', + name: '', + internalType: 'uint256', + }, + ], + name: 'pendingXPefi', + inputs: [ + { + type: 'address', + name: 'user', + internalType: 'address', + }, + ], + }, + { + type: 'function', + stateMutability: 'nonpayable', + outputs: [], + name: 'permit', + inputs: [ + { + type: 'address', + name: 'owner', + internalType: 'address', + }, + { + type: 'address', + name: 'spender', + internalType: 'address', + }, + { + type: 'uint256', + name: 'value', + internalType: 'uint256', + }, + { + type: 'uint256', + name: 'deadline', + internalType: 'uint256', + }, + { + type: 'uint8', + name: 'v', + internalType: 'uint8', + }, + { + type: 'bytes32', + name: 'r', + internalType: 'bytes32', + }, + { + type: 'bytes32', + name: 's', + internalType: 'bytes32', + }, + ], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'address', + name: '', + internalType: 'address', + }, + ], + name: 'poolCreatorAddress', + inputs: [], + }, + { + type: 'function', + stateMutability: 'nonpayable', + outputs: [], + name: 'recoverAVAX', + inputs: [ + { + type: 'uint256', + name: 'amount', + internalType: 'uint256', + }, + ], + }, + { + type: 'function', + stateMutability: 'nonpayable', + outputs: [], + name: 'recoverERC20', + inputs: [ + { + type: 'address', + name: 'tokenAddress', + internalType: 'address', + }, + { + type: 'uint256', + name: 'tokenAmount', + internalType: 'uint256', + }, + ], + }, + { + type: 'function', + stateMutability: 'nonpayable', + outputs: [], + name: 'reinvest', + inputs: [], + }, + { + type: 'function', + stateMutability: 'nonpayable', + outputs: [], + name: 'renounceOwnership', + inputs: [], + }, + { + type: 'function', + stateMutability: 'nonpayable', + outputs: [], + name: 'revokeAllowance', + inputs: [ + { + type: 'address', + name: 'token', + internalType: 'address', + }, + { + type: 'address', + name: 'spender', + internalType: 'address', + }, + ], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'address', + name: '', + internalType: 'contract IERC20', + }, + ], + name: 'rewardToken', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'address', + name: '', + internalType: 'contract IRouter', + }, + ], + name: 'router', + inputs: [], + }, + { + type: 'function', + stateMutability: 'nonpayable', + outputs: [], + name: 'setAllowances', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'address', + name: '', + internalType: 'address', + }, + ], + name: 'stakingContract', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'string', + name: '', + internalType: 'string', + }, + ], + name: 'symbol', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'address', + name: '', + internalType: 'address', + }, + ], + name: 'token0', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'address', + name: '', + internalType: 'address', + }, + ], + name: 'token1', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'uint256', + name: '', + internalType: 'uint256', + }, + ], + name: 'totalDeposits', + inputs: [], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'uint256', + name: '', + internalType: 'uint256', + }, + ], + name: 'totalSupply', + inputs: [], + }, + { + type: 'function', + stateMutability: 'nonpayable', + outputs: [ + { + type: 'bool', + name: '', + internalType: 'bool', + }, + ], + name: 'transfer', + inputs: [ + { + type: 'address', + name: 'dst', + internalType: 'address', + }, + { + type: 'uint256', + name: 'amount', + internalType: 'uint256', + }, + ], + }, + { + type: 'function', + stateMutability: 'nonpayable', + outputs: [ + { + type: 'bool', + name: '', + internalType: 'bool', + }, + ], + name: 'transferFrom', + inputs: [ + { + type: 'address', + name: 'src', + internalType: 'address', + }, + { + type: 'address', + name: 'dst', + internalType: 'address', + }, + { + type: 'uint256', + name: 'amount', + internalType: 'uint256', + }, + ], + }, + { + type: 'function', + stateMutability: 'nonpayable', + outputs: [], + name: 'transferOwnership', + inputs: [ + { + type: 'address', + name: 'newOwner', + internalType: 'address', + }, + ], + }, + { + type: 'function', + stateMutability: 'nonpayable', + outputs: [], + name: 'updateAlternateAddress', + inputs: [ + { + type: 'address', + name: 'newValue', + internalType: 'address', + }, + ], + }, + { + type: 'function', + stateMutability: 'nonpayable', + outputs: [], + name: 'updateDepositsEnabled', + inputs: [ + { + type: 'bool', + name: 'newValue', + internalType: 'bool', + }, + ], + }, + { + type: 'function', + stateMutability: 'nonpayable', + outputs: [], + name: 'updateDevAddress', + inputs: [ + { + type: 'address', + name: 'newValue', + internalType: 'address', + }, + ], + }, + { + type: 'function', + stateMutability: 'nonpayable', + outputs: [], + name: 'updateFeeStructure', + inputs: [ + { + type: 'uint256', + name: 'newPOOL_CREATOR_FEE_BIPS', + internalType: 'uint256', + }, + { + type: 'uint256', + name: 'newNEST_FEE_BIPS', + internalType: 'uint256', + }, + { + type: 'uint256', + name: 'newDEV_FEE_BIPS', + internalType: 'uint256', + }, + { + type: 'uint256', + name: 'newALTERNATE_FEE_BIPS', + internalType: 'uint256', + }, + ], + }, + { + type: 'function', + stateMutability: 'nonpayable', + outputs: [], + name: 'updateMaxTokensToDepositWithoutReinvest', + inputs: [ + { + type: 'uint256', + name: 'newValue', + internalType: 'uint256', + }, + ], + }, + { + type: 'function', + stateMutability: 'nonpayable', + outputs: [], + name: 'updateMinTokensToReinvest', + inputs: [ + { + type: 'uint256', + name: 'newValue', + internalType: 'uint256', + }, + ], + }, + { + type: 'function', + stateMutability: 'nonpayable', + outputs: [], + name: 'updateNestAddress', + inputs: [ + { + type: 'address', + name: 'newValue', + internalType: 'address', + }, + ], + }, + { + type: 'function', + stateMutability: 'nonpayable', + outputs: [], + name: 'updateNestStakingBips', + inputs: [ + { + type: 'uint256', + name: 'newNEST_STAKING_BIPS', + internalType: 'uint256', + }, + ], + }, + { + type: 'function', + stateMutability: 'nonpayable', + outputs: [], + name: 'updatePoolCreatorAddress', + inputs: [ + { + type: 'address', + name: 'newValue', + internalType: 'address', + }, + ], + }, + { + type: 'function', + stateMutability: 'nonpayable', + outputs: [], + name: 'updateUseGlobalVariables', + inputs: [ + { + type: 'bool', + name: 'newValue', + internalType: 'bool', + }, + ], + }, + { + type: 'function', + stateMutability: 'nonpayable', + outputs: [], + name: 'withdraw', + inputs: [ + { + type: 'uint256', + name: 'amount', + internalType: 'uint256', + }, + ], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'uint256', + name: '', + internalType: 'uint256', + }, + ], + name: 'xPefiDebt', + inputs: [ + { + type: 'address', + name: '', + internalType: 'address', + }, + ], + }, + { + type: 'function', + stateMutability: 'view', + outputs: [ + { + type: 'uint256', + name: '', + internalType: 'uint256', + }, + ], + name: 'xPefiPerShare', + inputs: [], + }, +] as const; + +export type PenguinVault = typeof penguinVaultAbi; +export type PenguinVaultContract = GetContractReturnType; + +export class PenguinVault__factory { + static connect(address: string, client: PublicClient) { + return getContract({ address, abi: penguinVaultAbi, publicClient: client }); + } +} diff --git a/src/apps/penguin/contracts/viem/index.ts b/src/apps/penguin/contracts/viem/index.ts index 762892eab..1af9114cb 100644 --- a/src/apps/penguin/contracts/viem/index.ts +++ b/src/apps/penguin/contracts/viem/index.ts @@ -7,6 +7,7 @@ export type { PenguinChef } from './PenguinChef'; export type { PenguinExtraRewarder } from './PenguinExtraRewarder'; export type { PenguinIPefi } from './PenguinIPefi'; export type { PenguinRewarderRate } from './PenguinRewarderRate'; +export type { PenguinVault } from './PenguinVault'; export type { PenguinXPefi } from './PenguinXPefi'; export { PenguinChefV2__factory } from './PenguinChefV2'; @@ -14,4 +15,5 @@ export { PenguinChef__factory } from './PenguinChef'; export { PenguinExtraRewarder__factory } from './PenguinExtraRewarder'; export { PenguinIPefi__factory } from './PenguinIPefi'; export { PenguinRewarderRate__factory } from './PenguinRewarderRate'; +export { PenguinVault__factory } from './PenguinVault'; export { PenguinXPefi__factory } from './PenguinXPefi';