@pufferfinance/puffer-sdk 1.17.7 → 1.17.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/contracts/abis/mainnet/ConcreteMultiStrategyVault.cjs +1 -1
- package/dist/contracts/abis/mainnet/ConcreteMultiStrategyVault.cjs.map +1 -1
- package/dist/contracts/abis/mainnet/ConcreteMultiStrategyVault.d.ts +14 -0
- package/dist/contracts/abis/mainnet/ConcreteMultiStrategyVault.js +7 -0
- package/dist/contracts/abis/mainnet/ConcreteMultiStrategyVault.js.map +1 -1
- package/dist/contracts/handlers/concrete-vault-handler.cjs +1 -1
- package/dist/contracts/handlers/concrete-vault-handler.cjs.map +1 -1
- package/dist/contracts/handlers/concrete-vault-handler.d.ts +24 -0
- package/dist/contracts/handlers/concrete-vault-handler.js +16 -4
- package/dist/contracts/handlers/concrete-vault-handler.js.map +1 -1
- package/dist/utils/version.cjs +1 -1
- package/dist/utils/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"allowance",type:"uint256"},{internalType:"uint256",name:"needed",type:"uint256"}],name:"ERC20InsufficientAllowance",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"uint256",name:"assets",type:"uint256"},{indexed:!1,internalType:"uint256",name:"shares",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"receiver",type:"address"},{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"uint256",name:"assets",type:"uint256"},{indexed:!1,internalType:"uint256",name:"shares",type:"uint256"}],name:"Withdraw",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:"value",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:"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"}],name:"deposit",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"assets_",type:"uint256"}],name:"previewDeposit",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"assets_",type:"uint256"}],name:"previewWithdraw",outputs:[{internalType:"uint256",name:"shares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",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"},{inputs:[{internalType:"uint256",name:"assets_",type:"uint256"}],name:"withdraw",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"}];exports.ConcreteMultiStrategyVault=e;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=[{inputs:[],stateMutability:"nonpayable",type:"constructor"},{inputs:[{internalType:"address",name:"spender",type:"address"},{internalType:"uint256",name:"allowance",type:"uint256"},{internalType:"uint256",name:"needed",type:"uint256"}],name:"ERC20InsufficientAllowance",type:"error"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!0,internalType:"address",name:"spender",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Approval",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"uint256",name:"assets",type:"uint256"},{indexed:!1,internalType:"uint256",name:"shares",type:"uint256"}],name:"Deposit",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"from",type:"address"},{indexed:!0,internalType:"address",name:"to",type:"address"},{indexed:!1,internalType:"uint256",name:"value",type:"uint256"}],name:"Transfer",type:"event"},{anonymous:!1,inputs:[{indexed:!0,internalType:"address",name:"sender",type:"address"},{indexed:!0,internalType:"address",name:"receiver",type:"address"},{indexed:!0,internalType:"address",name:"owner",type:"address"},{indexed:!1,internalType:"uint256",name:"assets",type:"uint256"},{indexed:!1,internalType:"uint256",name:"shares",type:"uint256"}],name:"Withdraw",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:"value",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:"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"}],name:"deposit",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"assets_",type:"uint256"}],name:"previewDeposit",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"assets_",type:"uint256"}],name:"previewWithdraw",outputs:[{internalType:"uint256",name:"shares",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"shares_",type:"uint256"}],name:"previewRedeem",outputs:[{internalType:"uint256",name:"assets",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"totalSupply",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"view",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"},{inputs:[{internalType:"uint256",name:"assets_",type:"uint256"}],name:"withdraw",outputs:[{internalType:"uint256",name:"",type:"uint256"}],stateMutability:"nonpayable",type:"function"}];exports.ConcreteMultiStrategyVault=e;
|
|
2
2
|
//# sourceMappingURL=ConcreteMultiStrategyVault.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConcreteMultiStrategyVault.cjs","sources":["../../../../lib/contracts/abis/mainnet/ConcreteMultiStrategyVault.ts"],"sourcesContent":["export const ConcreteMultiStrategyVault = <const>[\n { inputs: [], stateMutability: 'nonpayable', type: 'constructor' },\n {\n inputs: [\n { internalType: 'address', name: 'spender', type: 'address' },\n { internalType: 'uint256', name: 'allowance', type: 'uint256' },\n { internalType: 'uint256', name: 'needed', type: 'uint256' },\n ],\n name: 'ERC20InsufficientAllowance',\n type: 'error',\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: 'address',\n name: 'owner',\n type: 'address',\n },\n {\n indexed: true,\n internalType: 'address',\n name: 'spender',\n type: 'address',\n },\n {\n indexed: false,\n internalType: 'uint256',\n name: 'value',\n type: 'uint256',\n },\n ],\n name: 'Approval',\n type: 'event',\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: 'address',\n name: 'sender',\n type: 'address',\n },\n {\n indexed: true,\n internalType: 'address',\n name: 'owner',\n type: 'address',\n },\n {\n indexed: false,\n internalType: 'uint256',\n name: 'assets',\n type: 'uint256',\n },\n {\n indexed: false,\n internalType: 'uint256',\n name: 'shares',\n type: 'uint256',\n },\n ],\n name: 'Deposit',\n type: 'event',\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: 'address',\n name: 'from',\n type: 'address',\n },\n {\n indexed: true,\n internalType: 'address',\n name: 'to',\n type: 'address',\n },\n {\n indexed: false,\n internalType: 'uint256',\n name: 'value',\n type: 'uint256',\n },\n ],\n name: 'Transfer',\n type: 'event',\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: 'address',\n name: 'sender',\n type: 'address',\n },\n {\n indexed: true,\n internalType: 'address',\n name: 'receiver',\n type: 'address',\n },\n {\n indexed: true,\n internalType: 'address',\n name: 'owner',\n type: 'address',\n },\n {\n indexed: false,\n internalType: 'uint256',\n name: 'assets',\n type: 'uint256',\n },\n {\n indexed: false,\n internalType: 'uint256',\n name: 'shares',\n type: 'uint256',\n },\n ],\n name: 'Withdraw',\n type: 'event',\n },\n {\n inputs: [\n { internalType: 'address', name: 'owner', type: 'address' },\n { internalType: 'address', name: 'spender', type: 'address' },\n ],\n name: 'allowance',\n outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n { internalType: 'address', name: 'spender', type: 'address' },\n { internalType: 'uint256', name: 'value', type: 'uint256' },\n ],\n name: 'approve',\n outputs: [{ internalType: 'bool', name: '', type: 'bool' }],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [{ internalType: 'address', name: 'account', type: 'address' }],\n name: 'balanceOf',\n outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n { internalType: 'uint256', name: 'assets_', type: 'uint256' },\n { internalType: 'address', name: 'receiver_', type: 'address' },\n ],\n name: 'deposit',\n outputs: [{ internalType: 'uint256', name: 'shares', type: 'uint256' }],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [{ internalType: 'uint256', name: 'assets_', type: 'uint256' }],\n name: 'deposit',\n outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [{ internalType: 'uint256', name: 'assets_', type: 'uint256' }],\n name: 'previewDeposit',\n outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [{ internalType: 'uint256', name: 'assets_', type: 'uint256' }],\n name: 'previewWithdraw',\n outputs: [{ internalType: 'uint256', name: 'shares', type: 'uint256' }],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [],\n name: 'totalSupply',\n outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n { internalType: 'uint256', name: 'assets_', type: 'uint256' },\n { internalType: 'address', name: 'receiver_', type: 'address' },\n { internalType: 'address', name: 'owner_', type: 'address' },\n ],\n name: 'withdraw',\n outputs: [{ internalType: 'uint256', name: 'shares', type: 'uint256' }],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [{ internalType: 'uint256', name: 'assets_', type: 'uint256' }],\n name: 'withdraw',\n outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n];\n"],"names":["ConcreteMultiStrategyVault"],"mappings":"gFAAO,MAAMA,EAAoC,CAC/C,CAAE,OAAQ,CAAA,EAAI,gBAAiB,aAAc,KAAM,aAAc,EACjE,CACE,OAAQ,CACN,CAAE,aAAc,UAAW,KAAM,UAAW,KAAM,SAAU,EAC5D,CAAE,aAAc,UAAW,KAAM,YAAa,KAAM,SAAU,EAC9D,CAAE,aAAc,UAAW,KAAM,SAAU,KAAM,SAAU,CAC7D,EACA,KAAM,6BACN,KAAM,OACR,EACA,CACE,UAAW,GACX,OAAQ,CACN,CACE,QAAS,GACT,aAAc,UACd,KAAM,QACN,KAAM,SACR,EACA,CACE,QAAS,GACT,aAAc,UACd,KAAM,UACN,KAAM,SACR,EACA,CACE,QAAS,GACT,aAAc,UACd,KAAM,QACN,KAAM,SAAA,CAEV,EACA,KAAM,WACN,KAAM,OACR,EACA,CACE,UAAW,GACX,OAAQ,CACN,CACE,QAAS,GACT,aAAc,UACd,KAAM,SACN,KAAM,SACR,EACA,CACE,QAAS,GACT,aAAc,UACd,KAAM,QACN,KAAM,SACR,EACA,CACE,QAAS,GACT,aAAc,UACd,KAAM,SACN,KAAM,SACR,EACA,CACE,QAAS,GACT,aAAc,UACd,KAAM,SACN,KAAM,SAAA,CAEV,EACA,KAAM,UACN,KAAM,OACR,EACA,CACE,UAAW,GACX,OAAQ,CACN,CACE,QAAS,GACT,aAAc,UACd,KAAM,OACN,KAAM,SACR,EACA,CACE,QAAS,GACT,aAAc,UACd,KAAM,KACN,KAAM,SACR,EACA,CACE,QAAS,GACT,aAAc,UACd,KAAM,QACN,KAAM,SAAA,CAEV,EACA,KAAM,WACN,KAAM,OAC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,KAAM,UACN,QAAS,CAAC,CAAE,aAAc,UAAW,KAAM,GAAI,KAAM,UAAW,EAChE,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CAAC,CAAE,aAAc,UAAW,KAAM,UAAW,KAAM,UAAW,EACtE,KAAM,iBACN,QAAS,CAAC,CAAE,aAAc,UAAW,KAAM,GAAI,KAAM,UAAW,EAChE,gBAAiB,OACjB,KAAM,UACR,EACA,CACE,OAAQ,CAAC,CAAE,aAAc,UAAW,KAAM,UAAW,KAAM,UAAW,EACtE,KAAM,kBACN,QAAS,CAAC,CAAE,aAAc,UAAW,KAAM,SAAU,KAAM,UAAW,EACtE,gBAAiB,OACjB,KAAM,UACR,EACA,CACE,OAAQ,CAAC,EACT,KAAM,cACN,QAAS,CAAC,CAAE,aAAc,UAAW,KAAM,GAAI,KAAM,UAAW,EAChE,gBAAiB,OACjB,KAAM,UACR,EACA,CACE,OAAQ,CACN,CAAE,aAAc,UAAW,KAAM,UAAW,KAAM,SAAU,EAC5D,CAAE,aAAc,UAAW,KAAM,YAAa,KAAM,SAAU,EAC9D,CAAE,aAAc,UAAW,KAAM,SAAU,KAAM,SAAU,CAC7D,EACA,KAAM,WACN,QAAS,CAAC,CAAE,aAAc,UAAW,KAAM,SAAU,KAAM,UAAW,EACtE,gBAAiB,aACjB,KAAM,UACR,EACA,CACE,OAAQ,CAAC,CAAE,aAAc,UAAW,KAAM,UAAW,KAAM,UAAW,EACtE,KAAM,WACN,QAAS,CAAC,CAAE,aAAc,UAAW,KAAM,GAAI,KAAM,UAAW,EAChE,gBAAiB,aACjB,KAAM,UAAA,CAEV"}
|
|
1
|
+
{"version":3,"file":"ConcreteMultiStrategyVault.cjs","sources":["../../../../lib/contracts/abis/mainnet/ConcreteMultiStrategyVault.ts"],"sourcesContent":["export const ConcreteMultiStrategyVault = <const>[\n { inputs: [], stateMutability: 'nonpayable', type: 'constructor' },\n {\n inputs: [\n { internalType: 'address', name: 'spender', type: 'address' },\n { internalType: 'uint256', name: 'allowance', type: 'uint256' },\n { internalType: 'uint256', name: 'needed', type: 'uint256' },\n ],\n name: 'ERC20InsufficientAllowance',\n type: 'error',\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: 'address',\n name: 'owner',\n type: 'address',\n },\n {\n indexed: true,\n internalType: 'address',\n name: 'spender',\n type: 'address',\n },\n {\n indexed: false,\n internalType: 'uint256',\n name: 'value',\n type: 'uint256',\n },\n ],\n name: 'Approval',\n type: 'event',\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: 'address',\n name: 'sender',\n type: 'address',\n },\n {\n indexed: true,\n internalType: 'address',\n name: 'owner',\n type: 'address',\n },\n {\n indexed: false,\n internalType: 'uint256',\n name: 'assets',\n type: 'uint256',\n },\n {\n indexed: false,\n internalType: 'uint256',\n name: 'shares',\n type: 'uint256',\n },\n ],\n name: 'Deposit',\n type: 'event',\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: 'address',\n name: 'from',\n type: 'address',\n },\n {\n indexed: true,\n internalType: 'address',\n name: 'to',\n type: 'address',\n },\n {\n indexed: false,\n internalType: 'uint256',\n name: 'value',\n type: 'uint256',\n },\n ],\n name: 'Transfer',\n type: 'event',\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: 'address',\n name: 'sender',\n type: 'address',\n },\n {\n indexed: true,\n internalType: 'address',\n name: 'receiver',\n type: 'address',\n },\n {\n indexed: true,\n internalType: 'address',\n name: 'owner',\n type: 'address',\n },\n {\n indexed: false,\n internalType: 'uint256',\n name: 'assets',\n type: 'uint256',\n },\n {\n indexed: false,\n internalType: 'uint256',\n name: 'shares',\n type: 'uint256',\n },\n ],\n name: 'Withdraw',\n type: 'event',\n },\n {\n inputs: [\n { internalType: 'address', name: 'owner', type: 'address' },\n { internalType: 'address', name: 'spender', type: 'address' },\n ],\n name: 'allowance',\n outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n { internalType: 'address', name: 'spender', type: 'address' },\n { internalType: 'uint256', name: 'value', type: 'uint256' },\n ],\n name: 'approve',\n outputs: [{ internalType: 'bool', name: '', type: 'bool' }],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [{ internalType: 'address', name: 'account', type: 'address' }],\n name: 'balanceOf',\n outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n { internalType: 'uint256', name: 'assets_', type: 'uint256' },\n { internalType: 'address', name: 'receiver_', type: 'address' },\n ],\n name: 'deposit',\n outputs: [{ internalType: 'uint256', name: 'shares', type: 'uint256' }],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [{ internalType: 'uint256', name: 'assets_', type: 'uint256' }],\n name: 'deposit',\n outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [{ internalType: 'uint256', name: 'assets_', type: 'uint256' }],\n name: 'previewDeposit',\n outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [{ internalType: 'uint256', name: 'assets_', type: 'uint256' }],\n name: 'previewWithdraw',\n outputs: [{ internalType: 'uint256', name: 'shares', type: 'uint256' }],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [{ internalType: 'uint256', name: 'shares_', type: 'uint256' }],\n name: 'previewRedeem',\n outputs: [{ internalType: 'uint256', name: 'assets', type: 'uint256' }],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [],\n name: 'totalSupply',\n outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n { internalType: 'uint256', name: 'assets_', type: 'uint256' },\n { internalType: 'address', name: 'receiver_', type: 'address' },\n { internalType: 'address', name: 'owner_', type: 'address' },\n ],\n name: 'withdraw',\n outputs: [{ internalType: 'uint256', name: 'shares', type: 'uint256' }],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [{ internalType: 'uint256', name: 'assets_', type: 'uint256' }],\n name: 'withdraw',\n outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n];\n"],"names":["ConcreteMultiStrategyVault"],"mappings":"gFAAO,MAAMA,EAAoC,CAC/C,CAAE,OAAQ,CAAA,EAAI,gBAAiB,aAAc,KAAM,aAAc,EACjE,CACE,OAAQ,CACN,CAAE,aAAc,UAAW,KAAM,UAAW,KAAM,SAAU,EAC5D,CAAE,aAAc,UAAW,KAAM,YAAa,KAAM,SAAU,EAC9D,CAAE,aAAc,UAAW,KAAM,SAAU,KAAM,SAAU,CAC7D,EACA,KAAM,6BACN,KAAM,OACR,EACA,CACE,UAAW,GACX,OAAQ,CACN,CACE,QAAS,GACT,aAAc,UACd,KAAM,QACN,KAAM,SACR,EACA,CACE,QAAS,GACT,aAAc,UACd,KAAM,UACN,KAAM,SACR,EACA,CACE,QAAS,GACT,aAAc,UACd,KAAM,QACN,KAAM,SAAA,CAEV,EACA,KAAM,WACN,KAAM,OACR,EACA,CACE,UAAW,GACX,OAAQ,CACN,CACE,QAAS,GACT,aAAc,UACd,KAAM,SACN,KAAM,SACR,EACA,CACE,QAAS,GACT,aAAc,UACd,KAAM,QACN,KAAM,SACR,EACA,CACE,QAAS,GACT,aAAc,UACd,KAAM,SACN,KAAM,SACR,EACA,CACE,QAAS,GACT,aAAc,UACd,KAAM,SACN,KAAM,SAAA,CAEV,EACA,KAAM,UACN,KAAM,OACR,EACA,CACE,UAAW,GACX,OAAQ,CACN,CACE,QAAS,GACT,aAAc,UACd,KAAM,OACN,KAAM,SACR,EACA,CACE,QAAS,GACT,aAAc,UACd,KAAM,KACN,KAAM,SACR,EACA,CACE,QAAS,GACT,aAAc,UACd,KAAM,QACN,KAAM,SAAA,CAEV,EACA,KAAM,WACN,KAAM,OACR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|
223
223
|
}];
|
|
224
224
|
readonly stateMutability: "view";
|
|
225
225
|
readonly type: "function";
|
|
226
|
+
}, {
|
|
227
|
+
readonly inputs: readonly [{
|
|
228
|
+
readonly internalType: "uint256";
|
|
229
|
+
readonly name: "shares_";
|
|
230
|
+
readonly type: "uint256";
|
|
231
|
+
}];
|
|
232
|
+
readonly name: "previewRedeem";
|
|
233
|
+
readonly outputs: readonly [{
|
|
234
|
+
readonly internalType: "uint256";
|
|
235
|
+
readonly name: "assets";
|
|
236
|
+
readonly type: "uint256";
|
|
237
|
+
}];
|
|
238
|
+
readonly stateMutability: "view";
|
|
239
|
+
readonly type: "function";
|
|
226
240
|
}, {
|
|
227
241
|
readonly inputs: readonly [];
|
|
228
242
|
readonly name: "totalSupply";
|
|
@@ -185,6 +185,13 @@ const e = [
|
|
|
185
185
|
stateMutability: "view",
|
|
186
186
|
type: "function"
|
|
187
187
|
},
|
|
188
|
+
{
|
|
189
|
+
inputs: [{ internalType: "uint256", name: "shares_", type: "uint256" }],
|
|
190
|
+
name: "previewRedeem",
|
|
191
|
+
outputs: [{ internalType: "uint256", name: "assets", type: "uint256" }],
|
|
192
|
+
stateMutability: "view",
|
|
193
|
+
type: "function"
|
|
194
|
+
},
|
|
188
195
|
{
|
|
189
196
|
inputs: [],
|
|
190
197
|
name: "totalSupply",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConcreteMultiStrategyVault.js","sources":["../../../../lib/contracts/abis/mainnet/ConcreteMultiStrategyVault.ts"],"sourcesContent":["export const ConcreteMultiStrategyVault = <const>[\n { inputs: [], stateMutability: 'nonpayable', type: 'constructor' },\n {\n inputs: [\n { internalType: 'address', name: 'spender', type: 'address' },\n { internalType: 'uint256', name: 'allowance', type: 'uint256' },\n { internalType: 'uint256', name: 'needed', type: 'uint256' },\n ],\n name: 'ERC20InsufficientAllowance',\n type: 'error',\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: 'address',\n name: 'owner',\n type: 'address',\n },\n {\n indexed: true,\n internalType: 'address',\n name: 'spender',\n type: 'address',\n },\n {\n indexed: false,\n internalType: 'uint256',\n name: 'value',\n type: 'uint256',\n },\n ],\n name: 'Approval',\n type: 'event',\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: 'address',\n name: 'sender',\n type: 'address',\n },\n {\n indexed: true,\n internalType: 'address',\n name: 'owner',\n type: 'address',\n },\n {\n indexed: false,\n internalType: 'uint256',\n name: 'assets',\n type: 'uint256',\n },\n {\n indexed: false,\n internalType: 'uint256',\n name: 'shares',\n type: 'uint256',\n },\n ],\n name: 'Deposit',\n type: 'event',\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: 'address',\n name: 'from',\n type: 'address',\n },\n {\n indexed: true,\n internalType: 'address',\n name: 'to',\n type: 'address',\n },\n {\n indexed: false,\n internalType: 'uint256',\n name: 'value',\n type: 'uint256',\n },\n ],\n name: 'Transfer',\n type: 'event',\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: 'address',\n name: 'sender',\n type: 'address',\n },\n {\n indexed: true,\n internalType: 'address',\n name: 'receiver',\n type: 'address',\n },\n {\n indexed: true,\n internalType: 'address',\n name: 'owner',\n type: 'address',\n },\n {\n indexed: false,\n internalType: 'uint256',\n name: 'assets',\n type: 'uint256',\n },\n {\n indexed: false,\n internalType: 'uint256',\n name: 'shares',\n type: 'uint256',\n },\n ],\n name: 'Withdraw',\n type: 'event',\n },\n {\n inputs: [\n { internalType: 'address', name: 'owner', type: 'address' },\n { internalType: 'address', name: 'spender', type: 'address' },\n ],\n name: 'allowance',\n outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n { internalType: 'address', name: 'spender', type: 'address' },\n { internalType: 'uint256', name: 'value', type: 'uint256' },\n ],\n name: 'approve',\n outputs: [{ internalType: 'bool', name: '', type: 'bool' }],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [{ internalType: 'address', name: 'account', type: 'address' }],\n name: 'balanceOf',\n outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n { internalType: 'uint256', name: 'assets_', type: 'uint256' },\n { internalType: 'address', name: 'receiver_', type: 'address' },\n ],\n name: 'deposit',\n outputs: [{ internalType: 'uint256', name: 'shares', type: 'uint256' }],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [{ internalType: 'uint256', name: 'assets_', type: 'uint256' }],\n name: 'deposit',\n outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [{ internalType: 'uint256', name: 'assets_', type: 'uint256' }],\n name: 'previewDeposit',\n outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [{ internalType: 'uint256', name: 'assets_', type: 'uint256' }],\n name: 'previewWithdraw',\n outputs: [{ internalType: 'uint256', name: 'shares', type: 'uint256' }],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [],\n name: 'totalSupply',\n outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n { internalType: 'uint256', name: 'assets_', type: 'uint256' },\n { internalType: 'address', name: 'receiver_', type: 'address' },\n { internalType: 'address', name: 'owner_', type: 'address' },\n ],\n name: 'withdraw',\n outputs: [{ internalType: 'uint256', name: 'shares', type: 'uint256' }],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [{ internalType: 'uint256', name: 'assets_', type: 'uint256' }],\n name: 'withdraw',\n outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n];\n"],"names":["ConcreteMultiStrategyVault"],"mappings":"AAAO,MAAMA,IAAoC;AAAA,EAC/C,EAAE,QAAQ,CAAA,GAAI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MAAM;AAAA,EACR;AAAA,EACA;AAAA,IACE,QAAQ,CAAC;AAAA,IACT,MAAM;AAAA,IACN,SAAS,CAAC,EAAE,cAAc,WAAW,MAAM,IAAI,MAAM,WAAW;AAAA,IAChE,iBAAiB;AAAA,IACjB,MAAM;AAAA,EACR;AAAA,EACA;AAAA,IACE,QAAQ;AAAA,MACN,EAAE,cAAc,WAAW,MAAM,WAAW,MAAM,UAAU;AAAA,MAC5D,EAAE,cAAc,WAAW,MAAM,aAAa,MAAM,UAAU;AAAA,MAC9D,EAAE,cAAc,WAAW,MAAM,UAAU,MAAM,UAAU;AAAA,IAC7D;AAAA,IACA,MAAM;AAAA,IACN,SAAS,CAAC,EAAE,cAAc,WAAW,MAAM,UAAU,MAAM,WAAW;AAAA,IACtE,iBAAiB;AAAA,IACjB,MAAM;AAAA,EACR;AAAA,EACA;AAAA,IACE,QAAQ,CAAC,EAAE,cAAc,WAAW,MAAM,WAAW,MAAM,WAAW;AAAA,IACtE,MAAM;AAAA,IACN,SAAS,CAAC,EAAE,cAAc,WAAW,MAAM,IAAI,MAAM,WAAW;AAAA,IAChE,iBAAiB;AAAA,IACjB,MAAM;AAAA,EAAA;AAEV;"}
|
|
1
|
+
{"version":3,"file":"ConcreteMultiStrategyVault.js","sources":["../../../../lib/contracts/abis/mainnet/ConcreteMultiStrategyVault.ts"],"sourcesContent":["export const ConcreteMultiStrategyVault = <const>[\n { inputs: [], stateMutability: 'nonpayable', type: 'constructor' },\n {\n inputs: [\n { internalType: 'address', name: 'spender', type: 'address' },\n { internalType: 'uint256', name: 'allowance', type: 'uint256' },\n { internalType: 'uint256', name: 'needed', type: 'uint256' },\n ],\n name: 'ERC20InsufficientAllowance',\n type: 'error',\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: 'address',\n name: 'owner',\n type: 'address',\n },\n {\n indexed: true,\n internalType: 'address',\n name: 'spender',\n type: 'address',\n },\n {\n indexed: false,\n internalType: 'uint256',\n name: 'value',\n type: 'uint256',\n },\n ],\n name: 'Approval',\n type: 'event',\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: 'address',\n name: 'sender',\n type: 'address',\n },\n {\n indexed: true,\n internalType: 'address',\n name: 'owner',\n type: 'address',\n },\n {\n indexed: false,\n internalType: 'uint256',\n name: 'assets',\n type: 'uint256',\n },\n {\n indexed: false,\n internalType: 'uint256',\n name: 'shares',\n type: 'uint256',\n },\n ],\n name: 'Deposit',\n type: 'event',\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: 'address',\n name: 'from',\n type: 'address',\n },\n {\n indexed: true,\n internalType: 'address',\n name: 'to',\n type: 'address',\n },\n {\n indexed: false,\n internalType: 'uint256',\n name: 'value',\n type: 'uint256',\n },\n ],\n name: 'Transfer',\n type: 'event',\n },\n {\n anonymous: false,\n inputs: [\n {\n indexed: true,\n internalType: 'address',\n name: 'sender',\n type: 'address',\n },\n {\n indexed: true,\n internalType: 'address',\n name: 'receiver',\n type: 'address',\n },\n {\n indexed: true,\n internalType: 'address',\n name: 'owner',\n type: 'address',\n },\n {\n indexed: false,\n internalType: 'uint256',\n name: 'assets',\n type: 'uint256',\n },\n {\n indexed: false,\n internalType: 'uint256',\n name: 'shares',\n type: 'uint256',\n },\n ],\n name: 'Withdraw',\n type: 'event',\n },\n {\n inputs: [\n { internalType: 'address', name: 'owner', type: 'address' },\n { internalType: 'address', name: 'spender', type: 'address' },\n ],\n name: 'allowance',\n outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n { internalType: 'address', name: 'spender', type: 'address' },\n { internalType: 'uint256', name: 'value', type: 'uint256' },\n ],\n name: 'approve',\n outputs: [{ internalType: 'bool', name: '', type: 'bool' }],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [{ internalType: 'address', name: 'account', type: 'address' }],\n name: 'balanceOf',\n outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n { internalType: 'uint256', name: 'assets_', type: 'uint256' },\n { internalType: 'address', name: 'receiver_', type: 'address' },\n ],\n name: 'deposit',\n outputs: [{ internalType: 'uint256', name: 'shares', type: 'uint256' }],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [{ internalType: 'uint256', name: 'assets_', type: 'uint256' }],\n name: 'deposit',\n outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [{ internalType: 'uint256', name: 'assets_', type: 'uint256' }],\n name: 'previewDeposit',\n outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [{ internalType: 'uint256', name: 'assets_', type: 'uint256' }],\n name: 'previewWithdraw',\n outputs: [{ internalType: 'uint256', name: 'shares', type: 'uint256' }],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [{ internalType: 'uint256', name: 'shares_', type: 'uint256' }],\n name: 'previewRedeem',\n outputs: [{ internalType: 'uint256', name: 'assets', type: 'uint256' }],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [],\n name: 'totalSupply',\n outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],\n stateMutability: 'view',\n type: 'function',\n },\n {\n inputs: [\n { internalType: 'uint256', name: 'assets_', type: 'uint256' },\n { internalType: 'address', name: 'receiver_', type: 'address' },\n { internalType: 'address', name: 'owner_', type: 'address' },\n ],\n name: 'withdraw',\n outputs: [{ internalType: 'uint256', name: 'shares', type: 'uint256' }],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n {\n inputs: [{ internalType: 'uint256', name: 'assets_', type: 'uint256' }],\n name: 'withdraw',\n outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }],\n stateMutability: 'nonpayable',\n type: 'function',\n },\n];\n"],"names":["ConcreteMultiStrategyVault"],"mappings":"AAAO,MAAMA,IAAoC;AAAA,E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AA,IACtE,iBAAiB;AAAA,IACjB,MAAM;AAAA,EACR;AAAA,EACA;AAAA,IACE,QAAQ,CAAC,EAAE,cAAc,WAAW,MAAM,WAAW,MAAM,WAAW;AAAA,IACtE,MAAM;AAAA,IACN,SAAS,CAAC,EAAE,cAAc,WAAW,MAAM,UAAU,MAAM,WAAW;AAAA,IACtE,iBAAiB;AAAA,IACjB,MAAM;AAAA,EACR;AAAA,EACA;AAAA,IACE,QAAQ,CAAC;AAAA,IACT,MAAM;AAAA,IACN,SAAS,CAAC,EAAE,cAAc,WAAW,MAAM,IAAI,MAAM,WAAW;AAAA,IAChE,iBAAiB;AAAA,IACjB,MAAM;AAAA,EACR;AAAA,EACA;AAAA,IACE,QAAQ;AAAA,MACN,EAAE,cAAc,WAAW,MAAM,WAAW,MAAM,UAAU;AAAA,MAC5D,EAAE,cAAc,WAAW,MAAM,aAAa,MAAM,UAAU;AAAA,MAC9D,EAAE,cAAc,WAAW,MAAM,UAAU,MAAM,UAAU;AAAA,IAC7D;AAAA,IACA,MAAM;AAAA,IACN,SAAS,CAAC,EAAE,cAAc,WAAW,MAAM,UAAU,MAAM,WAAW;AAAA,IACtE,iBAAiB;AAAA,IACjB,MAAM;AAAA,EACR;AAAA,EACA;AAAA,IACE,QAAQ,CAAC,EAAE,cAAc,WAAW,MAAM,WAAW,MAAM,WAAW;AAAA,IACtE,MAAM;AAAA,IACN,SAAS,CAAC,EAAE,cAAc,WAAW,MAAM,IAAI,MAAM,WAAW;AAAA,IAChE,iBAAiB;AAAA,IACjB,MAAM;AAAA,EAAA;AAEV;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var a=Object.defineProperty;var c=(
|
|
1
|
+
"use strict";var a=Object.defineProperty;var c=(r,t,e)=>t in r?a(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var n=(r,t,e)=>c(r,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../../constants-BI6T6ZbJ.cjs"),s=require("../abis/mainnet/ConcreteMultiStrategyVault.cjs"),l=require("../tokens.cjs"),h=require("../vaults-addresses.cjs"),u=require("../../getContract-CPwqa1sR.cjs");class C{constructor(t,e,i){n(this,"viemChain");n(this,"token");this.chain=t,this.walletClient=e,this.publicClient=i,this.viemChain=o.VIEM_CHAINS[t],this.token=l.Token.ctTACpufETH}withToken(t){return this.token=t,this}getContract(){const t=h.VAULTS_ADDRESSES[this.token][this.chain].ConcreteMultiStrategyVault,e=s.ConcreteMultiStrategyVault,i={public:this.publicClient,wallet:this.walletClient};return u.getContract({address:t,abi:e,client:i})}approve(t,e){return this.getContract().write.approve([t,e],{account:this.walletClient.account,chain:this.viemChain})}getAllowance(t,e){return this.getContract().read.allowance([t,e])}getBalance(t){return this.getContract().read.balanceOf([t])}getTotalSupply(){return this.getContract().read.totalSupply()}deposit(t){return this.getContract().write.deposit([t],{account:this.walletClient.account,chain:this.viemChain})}withdraw(t){return this.getContract().write.withdraw([t],{account:this.walletClient.account,chain:this.viemChain})}previewDeposit(t){return this.getContract().read.previewDeposit([t])}previewWithdraw(t){return this.getContract().read.previewWithdraw([t])}previewRedeem(t){return this.getContract().read.previewRedeem([t])}}exports.ConcreteVaultHandler=C;
|
|
2
2
|
//# sourceMappingURL=concrete-vault-handler.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"concrete-vault-handler.cjs","sources":["../../../lib/contracts/handlers/concrete-vault-handler.ts"],"sourcesContent":["import {\n WalletClient,\n PublicClient,\n getContract,\n Address,\n GetContractReturnType,\n Account,\n} from 'viem';\nimport { Chain, VIEM_CHAINS, ViemChain } from '../../chains/constants';\nimport { ConcreteMultiStrategyVault } from '../abis/mainnet/ConcreteMultiStrategyVault';\nimport { Token } from '../tokens';\nimport { VAULTS_ADDRESSES } from '../vaults-addresses';\n\ntype VaultAddresses = typeof VAULTS_ADDRESSES;\ntype PufETHVault = VaultAddresses[Token.ctTACpufETH][Chain.Mainnet];\n\n/**\n * Handler for the `ConcreteMultStrategyVault` contract for a given token (pufETH) exposing\n * methods to interact with the contract.\n */\nexport class ConcreteVaultHandler {\n private viemChain: ViemChain;\n private token: Token.ctTACpufETH;\n\n /**\n * Create the handler for processing UniFi tokens.\n *\n * @param chain Chain to use for the client.\n * @param walletClient The wallet client to use for wallet\n * interactions.\n * @param publicClient The public client to use for public\n * interactions.\n */\n constructor(\n private chain: Chain,\n private walletClient: WalletClient,\n private publicClient: PublicClient,\n ) {\n this.viemChain = VIEM_CHAINS[chain];\n this.token = Token.ctTACpufETH;\n }\n\n /**\n * Set the UniFi token to use for executing transactions on the\n * contract.\n *\n * @param token UniFi token to use for the handler.\n * @returns The handler.\n */\n public withToken(token: Token.ctTACpufETH) {\n this.token = token;\n return this;\n }\n\n /**\n * Get the contract.\n *\n * @returns The viem contract.\n */\n public getContract() {\n const address = (VAULTS_ADDRESSES[this.token][this.chain] as PufETHVault)\n .ConcreteMultiStrategyVault as Address;\n const abi = ConcreteMultiStrategyVault;\n const client = { public: this.publicClient, wallet: this.walletClient };\n\n return getContract({ address, abi, client }) as GetContractReturnType<\n typeof abi,\n typeof client,\n Address\n >;\n }\n\n /**\n * Approve a spender to spend the token.\n *\n * @param spender The spender of the token.\n * @param amount The amount to approve.\n * @returns The transaction.\n */\n public approve(spender: Address, amount: bigint) {\n return this.getContract().write.approve([spender, amount], {\n account: this.walletClient.account as Account,\n chain: this.viemChain,\n });\n }\n\n /**\n * Get the allowance of the owner for the spender.\n *\n * @param owner The owner of the allowance.\n * @param spender The spender of the allowance.\n * @returns The allowance.\n */\n public getAllowance(owner: Address, spender: Address) {\n return this.getContract().read.allowance([owner, spender]);\n }\n\n /**\n * Get the balance for the address.\n *\n * @param address The address to get the balance of.\n * @returns The balance.\n */\n public getBalance(address: Address) {\n return this.getContract().read.balanceOf([address]);\n }\n\n /**\n * Get the total supply of the token.\n *\n * @returns The total supply.\n */\n public getTotalSupply() {\n return this.getContract().read.totalSupply();\n }\n\n /**\n * Deposit an amount of the token.\n *\n * @param amount The amount to deposit.\n * @returns The transaction.\n */\n public deposit(amount: bigint) {\n return this.getContract().write.deposit([amount], {\n account: this.walletClient.account as Account,\n chain: this.viemChain,\n });\n }\n\n /**\n * Withdraw an amount of the token.\n *\n * @param amount The amount to withdraw.\n * @returns The transaction.\n */\n public withdraw(amount: bigint) {\n return this.getContract().write.withdraw([amount], {\n account: this.walletClient.account as Account,\n chain: this.viemChain,\n });\n }\n\n /**\n * Provides a preview of the number of shares that would be minted for a given deposit amount, after fees.\n *\n * @param amount The amount to deposit.\n * @returns The preview.\n */\n public previewDeposit(amount: bigint) {\n return this.getContract().read.previewDeposit([amount]);\n }\n\n /**\n * Provides a preview of the number of shares that would be burned for a given withdrawal amount, after fees.\n *\n * @param amount The amount to withdraw.\n * @returns The preview.\n */\n public previewWithdraw(amount: bigint) {\n return this.getContract().read.previewWithdraw([amount]);\n }\n}\n"],"names":["ConcreteVaultHandler","chain","walletClient","publicClient","__publicField","VIEM_CHAINS","Token","token","address","VAULTS_ADDRESSES","abi","ConcreteMultiStrategyVault","client","getContract","spender","amount","owner"],"mappings":"4cAoBO,MAAMA,CAAqB,CAahC,YACUC,EACAC,EACAC,EACR,CAhBMC,EAAA,kBACAA,EAAA,cAYE,KAAA,MAAAH,EACA,KAAA,aAAAC,EACA,KAAA,aAAAC,EAEH,KAAA,UAAYE,cAAYJ,CAAK,EAClC,KAAK,MAAQK,EAAAA,MAAM,WAAA,CAUd,UAAUC,EAA0B,CACzC,YAAK,MAAQA,EACN,IAAA,CAQF,aAAc,CACnB,MAAMC,EAAWC,EAAAA,iBAAiB,KAAK,KAAK,EAAE,KAAK,KAAK,EACrD,2BACGC,EAAMC,EAAA,2BACNC,EAAS,CAAE,OAAQ,KAAK,aAAc,OAAQ,KAAK,YAAa,EAEtE,OAAOC,EAAY,YAAA,CAAE,QAAAL,EAAS,IAAAE,EAAK,OAAAE,EAAQ,CAAA,CActC,QAAQE,EAAkBC,EAAgB,CACxC,OAAA,KAAK,cAAc,MAAM,QAAQ,CAACD,EAASC,CAAM,EAAG,CACzD,QAAS,KAAK,aAAa,QAC3B,MAAO,KAAK,SAAA,CACb,CAAA,CAUI,aAAaC,EAAgBF,EAAkB,CAC7C,OAAA,KAAK,cAAc,KAAK,UAAU,CAACE,EAAOF,CAAO,CAAC,CAAA,CASpD,WAAWN,EAAkB,CAClC,OAAO,KAAK,YAAY,EAAE,KAAK,UAAU,CAACA,CAAO,CAAC,CAAA,CAQ7C,gBAAiB,CACtB,OAAO,KAAK,cAAc,KAAK,YAAY,CAAA,CAStC,QAAQO,EAAgB,CAC7B,OAAO,KAAK,YAAY,EAAE,MAAM,QAAQ,CAACA,CAAM,EAAG,CAChD,QAAS,KAAK,aAAa,QAC3B,MAAO,KAAK,SAAA,CACb,CAAA,CASI,SAASA,EAAgB,CAC9B,OAAO,KAAK,YAAY,EAAE,MAAM,SAAS,CAACA,CAAM,EAAG,CACjD,QAAS,KAAK,aAAa,QAC3B,MAAO,KAAK,SAAA,CACb,CAAA,CASI,eAAeA,EAAgB,CACpC,OAAO,KAAK,YAAY,EAAE,KAAK,eAAe,CAACA,CAAM,CAAC,CAAA,CASjD,gBAAgBA,EAAgB,CACrC,OAAO,KAAK,YAAY,EAAE,KAAK,gBAAgB,CAACA,CAAM,CAAC,CAAA,
|
|
1
|
+
{"version":3,"file":"concrete-vault-handler.cjs","sources":["../../../lib/contracts/handlers/concrete-vault-handler.ts"],"sourcesContent":["import {\n WalletClient,\n PublicClient,\n getContract,\n Address,\n GetContractReturnType,\n Account,\n} from 'viem';\nimport { Chain, VIEM_CHAINS, ViemChain } from '../../chains/constants';\nimport { ConcreteMultiStrategyVault } from '../abis/mainnet/ConcreteMultiStrategyVault';\nimport { Token } from '../tokens';\nimport { VAULTS_ADDRESSES } from '../vaults-addresses';\n\ntype VaultAddresses = typeof VAULTS_ADDRESSES;\ntype PufETHVault = VaultAddresses[Token.ctTACpufETH][Chain.Mainnet];\n\n/**\n * Handler for the `ConcreteMultStrategyVault` contract for a given token (pufETH) exposing\n * methods to interact with the contract.\n */\nexport class ConcreteVaultHandler {\n private viemChain: ViemChain;\n private token: Token.ctTACpufETH;\n\n /**\n * Create the handler for processing UniFi tokens.\n *\n * @param chain Chain to use for the client.\n * @param walletClient The wallet client to use for wallet\n * interactions.\n * @param publicClient The public client to use for public\n * interactions.\n */\n constructor(\n private chain: Chain,\n private walletClient: WalletClient,\n private publicClient: PublicClient,\n ) {\n this.viemChain = VIEM_CHAINS[chain];\n this.token = Token.ctTACpufETH;\n }\n\n /**\n * Set the UniFi token to use for executing transactions on the\n * contract.\n *\n * @param token UniFi token to use for the handler.\n * @returns The handler.\n */\n public withToken(token: Token.ctTACpufETH) {\n this.token = token;\n return this;\n }\n\n /**\n * Get the contract.\n *\n * @returns The viem contract.\n */\n public getContract() {\n const address = (VAULTS_ADDRESSES[this.token][this.chain] as PufETHVault)\n .ConcreteMultiStrategyVault as Address;\n const abi = ConcreteMultiStrategyVault;\n const client = { public: this.publicClient, wallet: this.walletClient };\n\n return getContract({ address, abi, client }) as GetContractReturnType<\n typeof abi,\n typeof client,\n Address\n >;\n }\n\n /**\n * Approve a spender to spend the token.\n *\n * @param spender The spender of the token.\n * @param amount The amount to approve.\n * @returns The transaction.\n */\n public approve(spender: Address, amount: bigint) {\n return this.getContract().write.approve([spender, amount], {\n account: this.walletClient.account as Account,\n chain: this.viemChain,\n });\n }\n\n /**\n * Get the allowance of the owner for the spender.\n *\n * @param owner The owner of the allowance.\n * @param spender The spender of the allowance.\n * @returns The allowance.\n */\n public getAllowance(owner: Address, spender: Address) {\n return this.getContract().read.allowance([owner, spender]);\n }\n\n /**\n * Get the balance for the address.\n *\n * @param address The address to get the balance of.\n * @returns The balance.\n */\n public getBalance(address: Address) {\n return this.getContract().read.balanceOf([address]);\n }\n\n /**\n * Get the total supply of the token.\n *\n * @returns The total supply.\n */\n public getTotalSupply() {\n return this.getContract().read.totalSupply();\n }\n\n /**\n * Deposit an amount of the token.\n *\n * @param amount The amount to deposit.\n * @returns The transaction.\n */\n public deposit(amount: bigint) {\n return this.getContract().write.deposit([amount], {\n account: this.walletClient.account as Account,\n chain: this.viemChain,\n });\n }\n\n /**\n * Withdraw an amount of the token.\n *\n * @param amount The amount to withdraw.\n * @returns The transaction.\n */\n public withdraw(amount: bigint) {\n return this.getContract().write.withdraw([amount], {\n account: this.walletClient.account as Account,\n chain: this.viemChain,\n });\n }\n\n /**\n * Provides a preview of the number of shares that would be minted for a given deposit amount, after fees.\n *\n * @param amount The amount to deposit.\n * @returns The preview.\n */\n public previewDeposit(amount: bigint) {\n return this.getContract().read.previewDeposit([amount]);\n }\n\n /**\n * Provides a preview of the number of shares that would be burned for a given withdrawal amount, after fees.\n *\n * @param amount The amount to withdraw.\n * @returns The preview.\n */\n public previewWithdraw(amount: bigint) {\n return this.getContract().read.previewWithdraw([amount]);\n }\n\n /**\n * Provides a preview of the amount of assets that would be redeemed\n * for a specific number of shares, after withdrawal fees. Subtracts\n * the withdrawal fee from the share amount to determine the net\n * shares for asset conversion.\n *\n * @param amount The amount to redeem.\n * @returns The preview.\n */\n public previewRedeem(amount: bigint) {\n return this.getContract().read.previewRedeem([amount]);\n }\n}\n"],"names":["ConcreteVaultHandler","chain","walletClient","publicClient","__publicField","VIEM_CHAINS","Token","token","address","VAULTS_ADDRESSES","abi","ConcreteMultiStrategyVault","client","getContract","spender","amount","owner"],"mappings":"4cAoBO,MAAMA,CAAqB,CAahC,YACUC,EACAC,EACAC,EACR,CAhBMC,EAAA,kBACAA,EAAA,cAYE,KAAA,MAAAH,EACA,KAAA,aAAAC,EACA,KAAA,aAAAC,EAEH,KAAA,UAAYE,cAAYJ,CAAK,EAClC,KAAK,MAAQK,EAAAA,MAAM,WAAA,CAUd,UAAUC,EAA0B,CACzC,YAAK,MAAQA,EACN,IAAA,CAQF,aAAc,CACnB,MAAMC,EAAWC,EAAAA,iBAAiB,KAAK,KAAK,EAAE,KAAK,KAAK,EACrD,2BACGC,EAAMC,EAAA,2BACNC,EAAS,CAAE,OAAQ,KAAK,aAAc,OAAQ,KAAK,YAAa,EAEtE,OAAOC,EAAY,YAAA,CAAE,QAAAL,EAAS,IAAAE,EAAK,OAAAE,EAAQ,CAAA,CActC,QAAQE,EAAkBC,EAAgB,CACxC,OAAA,KAAK,cAAc,MAAM,QAAQ,CAACD,EAASC,CAAM,EAAG,CACzD,QAAS,KAAK,aAAa,QAC3B,MAAO,KAAK,SAAA,CACb,CAAA,CAUI,aAAaC,EAAgBF,EAAkB,CAC7C,OAAA,KAAK,cAAc,KAAK,UAAU,CAACE,EAAOF,CAAO,CAAC,CAAA,CASpD,WAAWN,EAAkB,CAClC,OAAO,KAAK,YAAY,EAAE,KAAK,UAAU,CAACA,CAAO,CAAC,CAAA,CAQ7C,gBAAiB,CACtB,OAAO,KAAK,cAAc,KAAK,YAAY,CAAA,CAStC,QAAQO,EAAgB,CAC7B,OAAO,KAAK,YAAY,EAAE,MAAM,QAAQ,CAACA,CAAM,EAAG,CAChD,QAAS,KAAK,aAAa,QAC3B,MAAO,KAAK,SAAA,CACb,CAAA,CASI,SAASA,EAAgB,CAC9B,OAAO,KAAK,YAAY,EAAE,MAAM,SAAS,CAACA,CAAM,EAAG,CACjD,QAAS,KAAK,aAAa,QAC3B,MAAO,KAAK,SAAA,CACb,CAAA,CASI,eAAeA,EAAgB,CACpC,OAAO,KAAK,YAAY,EAAE,KAAK,eAAe,CAACA,CAAM,CAAC,CAAA,CASjD,gBAAgBA,EAAgB,CACrC,OAAO,KAAK,YAAY,EAAE,KAAK,gBAAgB,CAACA,CAAM,CAAC,CAAA,CAYlD,cAAcA,EAAgB,CACnC,OAAO,KAAK,YAAY,EAAE,KAAK,cAAc,CAACA,CAAM,CAAC,CAAA,CAEzD"}
|
|
@@ -259,6 +259,20 @@ export declare class ConcreteVaultHandler {
|
|
|
259
259
|
}];
|
|
260
260
|
readonly stateMutability: "view";
|
|
261
261
|
readonly type: "function";
|
|
262
|
+
}, {
|
|
263
|
+
readonly inputs: readonly [{
|
|
264
|
+
readonly internalType: "uint256";
|
|
265
|
+
readonly name: "shares_";
|
|
266
|
+
readonly type: "uint256";
|
|
267
|
+
}];
|
|
268
|
+
readonly name: "previewRedeem";
|
|
269
|
+
readonly outputs: readonly [{
|
|
270
|
+
readonly internalType: "uint256";
|
|
271
|
+
readonly name: "assets";
|
|
272
|
+
readonly type: "uint256";
|
|
273
|
+
}];
|
|
274
|
+
readonly stateMutability: "view";
|
|
275
|
+
readonly type: "function";
|
|
262
276
|
}, {
|
|
263
277
|
readonly inputs: readonly [];
|
|
264
278
|
readonly name: "totalSupply";
|
|
@@ -14899,4 +14913,14 @@ export declare class ConcreteVaultHandler {
|
|
|
14899
14913
|
* @returns The preview.
|
|
14900
14914
|
*/
|
|
14901
14915
|
previewWithdraw(amount: bigint): Promise<bigint>;
|
|
14916
|
+
/**
|
|
14917
|
+
* Provides a preview of the amount of assets that would be redeemed
|
|
14918
|
+
* for a specific number of shares, after withdrawal fees. Subtracts
|
|
14919
|
+
* the withdrawal fee from the share amount to determine the net
|
|
14920
|
+
* shares for asset conversion.
|
|
14921
|
+
*
|
|
14922
|
+
* @param amount The amount to redeem.
|
|
14923
|
+
* @returns The preview.
|
|
14924
|
+
*/
|
|
14925
|
+
previewRedeem(amount: bigint): Promise<bigint>;
|
|
14902
14926
|
}
|
|
@@ -2,8 +2,8 @@ var n = Object.defineProperty;
|
|
|
2
2
|
var o = (i, t, e) => t in i ? n(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
|
|
3
3
|
var a = (i, t, e) => o(i, typeof t != "symbol" ? t + "" : t, e);
|
|
4
4
|
import { V as c } from "../../constants-LC89CXNv.js";
|
|
5
|
-
import { ConcreteMultiStrategyVault as
|
|
6
|
-
import { Token as
|
|
5
|
+
import { ConcreteMultiStrategyVault as h } from "../abis/mainnet/ConcreteMultiStrategyVault.js";
|
|
6
|
+
import { Token as l } from "../tokens.js";
|
|
7
7
|
import { VAULTS_ADDRESSES as s } from "../vaults-addresses.js";
|
|
8
8
|
import { g as u } from "../../getContract-Ck2VtUkY.js";
|
|
9
9
|
class v {
|
|
@@ -19,7 +19,7 @@ class v {
|
|
|
19
19
|
constructor(t, e, r) {
|
|
20
20
|
a(this, "viemChain");
|
|
21
21
|
a(this, "token");
|
|
22
|
-
this.chain = t, this.walletClient = e, this.publicClient = r, this.viemChain = c[t], this.token =
|
|
22
|
+
this.chain = t, this.walletClient = e, this.publicClient = r, this.viemChain = c[t], this.token = l.ctTACpufETH;
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* Set the UniFi token to use for executing transactions on the
|
|
@@ -37,7 +37,7 @@ class v {
|
|
|
37
37
|
* @returns The viem contract.
|
|
38
38
|
*/
|
|
39
39
|
getContract() {
|
|
40
|
-
const t = s[this.token][this.chain].ConcreteMultiStrategyVault, e =
|
|
40
|
+
const t = s[this.token][this.chain].ConcreteMultiStrategyVault, e = h, r = { public: this.publicClient, wallet: this.walletClient };
|
|
41
41
|
return u({ address: t, abi: e, client: r });
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
@@ -122,6 +122,18 @@ class v {
|
|
|
122
122
|
previewWithdraw(t) {
|
|
123
123
|
return this.getContract().read.previewWithdraw([t]);
|
|
124
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* Provides a preview of the amount of assets that would be redeemed
|
|
127
|
+
* for a specific number of shares, after withdrawal fees. Subtracts
|
|
128
|
+
* the withdrawal fee from the share amount to determine the net
|
|
129
|
+
* shares for asset conversion.
|
|
130
|
+
*
|
|
131
|
+
* @param amount The amount to redeem.
|
|
132
|
+
* @returns The preview.
|
|
133
|
+
*/
|
|
134
|
+
previewRedeem(t) {
|
|
135
|
+
return this.getContract().read.previewRedeem([t]);
|
|
136
|
+
}
|
|
125
137
|
}
|
|
126
138
|
export {
|
|
127
139
|
v as ConcreteVaultHandler
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"concrete-vault-handler.js","sources":["../../../lib/contracts/handlers/concrete-vault-handler.ts"],"sourcesContent":["import {\n WalletClient,\n PublicClient,\n getContract,\n Address,\n GetContractReturnType,\n Account,\n} from 'viem';\nimport { Chain, VIEM_CHAINS, ViemChain } from '../../chains/constants';\nimport { ConcreteMultiStrategyVault } from '../abis/mainnet/ConcreteMultiStrategyVault';\nimport { Token } from '../tokens';\nimport { VAULTS_ADDRESSES } from '../vaults-addresses';\n\ntype VaultAddresses = typeof VAULTS_ADDRESSES;\ntype PufETHVault = VaultAddresses[Token.ctTACpufETH][Chain.Mainnet];\n\n/**\n * Handler for the `ConcreteMultStrategyVault` contract for a given token (pufETH) exposing\n * methods to interact with the contract.\n */\nexport class ConcreteVaultHandler {\n private viemChain: ViemChain;\n private token: Token.ctTACpufETH;\n\n /**\n * Create the handler for processing UniFi tokens.\n *\n * @param chain Chain to use for the client.\n * @param walletClient The wallet client to use for wallet\n * interactions.\n * @param publicClient The public client to use for public\n * interactions.\n */\n constructor(\n private chain: Chain,\n private walletClient: WalletClient,\n private publicClient: PublicClient,\n ) {\n this.viemChain = VIEM_CHAINS[chain];\n this.token = Token.ctTACpufETH;\n }\n\n /**\n * Set the UniFi token to use for executing transactions on the\n * contract.\n *\n * @param token UniFi token to use for the handler.\n * @returns The handler.\n */\n public withToken(token: Token.ctTACpufETH) {\n this.token = token;\n return this;\n }\n\n /**\n * Get the contract.\n *\n * @returns The viem contract.\n */\n public getContract() {\n const address = (VAULTS_ADDRESSES[this.token][this.chain] as PufETHVault)\n .ConcreteMultiStrategyVault as Address;\n const abi = ConcreteMultiStrategyVault;\n const client = { public: this.publicClient, wallet: this.walletClient };\n\n return getContract({ address, abi, client }) as GetContractReturnType<\n typeof abi,\n typeof client,\n Address\n >;\n }\n\n /**\n * Approve a spender to spend the token.\n *\n * @param spender The spender of the token.\n * @param amount The amount to approve.\n * @returns The transaction.\n */\n public approve(spender: Address, amount: bigint) {\n return this.getContract().write.approve([spender, amount], {\n account: this.walletClient.account as Account,\n chain: this.viemChain,\n });\n }\n\n /**\n * Get the allowance of the owner for the spender.\n *\n * @param owner The owner of the allowance.\n * @param spender The spender of the allowance.\n * @returns The allowance.\n */\n public getAllowance(owner: Address, spender: Address) {\n return this.getContract().read.allowance([owner, spender]);\n }\n\n /**\n * Get the balance for the address.\n *\n * @param address The address to get the balance of.\n * @returns The balance.\n */\n public getBalance(address: Address) {\n return this.getContract().read.balanceOf([address]);\n }\n\n /**\n * Get the total supply of the token.\n *\n * @returns The total supply.\n */\n public getTotalSupply() {\n return this.getContract().read.totalSupply();\n }\n\n /**\n * Deposit an amount of the token.\n *\n * @param amount The amount to deposit.\n * @returns The transaction.\n */\n public deposit(amount: bigint) {\n return this.getContract().write.deposit([amount], {\n account: this.walletClient.account as Account,\n chain: this.viemChain,\n });\n }\n\n /**\n * Withdraw an amount of the token.\n *\n * @param amount The amount to withdraw.\n * @returns The transaction.\n */\n public withdraw(amount: bigint) {\n return this.getContract().write.withdraw([amount], {\n account: this.walletClient.account as Account,\n chain: this.viemChain,\n });\n }\n\n /**\n * Provides a preview of the number of shares that would be minted for a given deposit amount, after fees.\n *\n * @param amount The amount to deposit.\n * @returns The preview.\n */\n public previewDeposit(amount: bigint) {\n return this.getContract().read.previewDeposit([amount]);\n }\n\n /**\n * Provides a preview of the number of shares that would be burned for a given withdrawal amount, after fees.\n *\n * @param amount The amount to withdraw.\n * @returns The preview.\n */\n public previewWithdraw(amount: bigint) {\n return this.getContract().read.previewWithdraw([amount]);\n }\n}\n"],"names":["ConcreteVaultHandler","chain","walletClient","publicClient","__publicField","VIEM_CHAINS","Token","token","address","VAULTS_ADDRESSES","abi","ConcreteMultiStrategyVault","client","getContract","spender","amount","owner"],"mappings":";;;;;;;;AAoBO,MAAMA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAahC,YACUC,GACAC,GACAC,GACR;AAhBM,IAAAC,EAAA;AACA,IAAAA,EAAA;AAYE,SAAA,QAAAH,G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aAAa;AAAA,MAC3B,OAAO,KAAK;AAAA,IAAA,CACb;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASI,SAASA,GAAgB;AAC9B,WAAO,KAAK,YAAY,EAAE,MAAM,SAAS,CAACA,CAAM,GAAG;AAAA,MACjD,SAAS,KAAK,aAAa;AAAA,MAC3B,OAAO,KAAK;AAAA,IAAA,CACb;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASI,eAAeA,GAAgB;AACpC,WAAO,KAAK,YAAY,EAAE,KAAK,eAAe,CAACA,CAAM,CAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASjD,gBAAgBA,GAAgB;AACrC,WAAO,KAAK,YAAY,EAAE,KAAK,gBAAgB,CAACA,CAAM,CAAC;AAAA,EAAA;
|
|
1
|
+
{"version":3,"file":"concrete-vault-handler.js","sources":["../../../lib/contracts/handlers/concrete-vault-handler.ts"],"sourcesContent":["import {\n WalletClient,\n PublicClient,\n getContract,\n Address,\n GetContractReturnType,\n Account,\n} from 'viem';\nimport { Chain, VIEM_CHAINS, ViemChain } from '../../chains/constants';\nimport { ConcreteMultiStrategyVault } from '../abis/mainnet/ConcreteMultiStrategyVault';\nimport { Token } from '../tokens';\nimport { VAULTS_ADDRESSES } from '../vaults-addresses';\n\ntype VaultAddresses = typeof VAULTS_ADDRESSES;\ntype PufETHVault = VaultAddresses[Token.ctTACpufETH][Chain.Mainnet];\n\n/**\n * Handler for the `ConcreteMultStrategyVault` contract for a given token (pufETH) exposing\n * methods to interact with the contract.\n */\nexport class ConcreteVaultHandler {\n private viemChain: ViemChain;\n private token: Token.ctTACpufETH;\n\n /**\n * Create the handler for processing UniFi tokens.\n *\n * @param chain Chain to use for the client.\n * @param walletClient The wallet client to use for wallet\n * interactions.\n * @param publicClient The public client to use for public\n * interactions.\n */\n constructor(\n private chain: Chain,\n private walletClient: WalletClient,\n private publicClient: PublicClient,\n ) {\n this.viemChain = VIEM_CHAINS[chain];\n this.token = Token.ctTACpufETH;\n }\n\n /**\n * Set the UniFi token to use for executing transactions on the\n * contract.\n *\n * @param token UniFi token to use for the handler.\n * @returns The handler.\n */\n public withToken(token: Token.ctTACpufETH) {\n this.token = token;\n return this;\n }\n\n /**\n * Get the contract.\n *\n * @returns The viem contract.\n */\n public getContract() {\n const address = (VAULTS_ADDRESSES[this.token][this.chain] as PufETHVault)\n .ConcreteMultiStrategyVault as Address;\n const abi = ConcreteMultiStrategyVault;\n const client = { public: this.publicClient, wallet: this.walletClient };\n\n return getContract({ address, abi, client }) as GetContractReturnType<\n typeof abi,\n typeof client,\n Address\n >;\n }\n\n /**\n * Approve a spender to spend the token.\n *\n * @param spender The spender of the token.\n * @param amount The amount to approve.\n * @returns The transaction.\n */\n public approve(spender: Address, amount: bigint) {\n return this.getContract().write.approve([spender, amount], {\n account: this.walletClient.account as Account,\n chain: this.viemChain,\n });\n }\n\n /**\n * Get the allowance of the owner for the spender.\n *\n * @param owner The owner of the allowance.\n * @param spender The spender of the allowance.\n * @returns The allowance.\n */\n public getAllowance(owner: Address, spender: Address) {\n return this.getContract().read.allowance([owner, spender]);\n }\n\n /**\n * Get the balance for the address.\n *\n * @param address The address to get the balance of.\n * @returns The balance.\n */\n public getBalance(address: Address) {\n return this.getContract().read.balanceOf([address]);\n }\n\n /**\n * Get the total supply of the token.\n *\n * @returns The total supply.\n */\n public getTotalSupply() {\n return this.getContract().read.totalSupply();\n }\n\n /**\n * Deposit an amount of the token.\n *\n * @param amount The amount to deposit.\n * @returns The transaction.\n */\n public deposit(amount: bigint) {\n return this.getContract().write.deposit([amount], {\n account: this.walletClient.account as Account,\n chain: this.viemChain,\n });\n }\n\n /**\n * Withdraw an amount of the token.\n *\n * @param amount The amount to withdraw.\n * @returns The transaction.\n */\n public withdraw(amount: bigint) {\n return this.getContract().write.withdraw([amount], {\n account: this.walletClient.account as Account,\n chain: this.viemChain,\n });\n }\n\n /**\n * Provides a preview of the number of shares that would be minted for a given deposit amount, after fees.\n *\n * @param amount The amount to deposit.\n * @returns The preview.\n */\n public previewDeposit(amount: bigint) {\n return this.getContract().read.previewDeposit([amount]);\n }\n\n /**\n * Provides a preview of the number of shares that would be burned for a given withdrawal amount, after fees.\n *\n * @param amount The amount to withdraw.\n * @returns The preview.\n */\n public previewWithdraw(amount: bigint) {\n return this.getContract().read.previewWithdraw([amount]);\n }\n\n /**\n * Provides a preview of the amount of assets that would be redeemed\n * for a specific number of shares, after withdrawal fees. Subtracts\n * the withdrawal fee from the share amount to determine the net\n * shares for asset conversion.\n *\n * @param amount The amount to redeem.\n * @returns The preview.\n */\n public previewRedeem(amount: bigint) {\n return this.getContract().read.previewRedeem([amount]);\n }\n}\n"],"names":["ConcreteVaultHandler","chain","walletClient","publicClient","__publicField","VIEM_CHAINS","Token","token","address","VAULTS_ADDRESSES","abi","ConcreteMultiStrategyVault","client","getContract","spender","amount","owner"],"mappings":";;;;;;;;AAoBO,MAAMA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAahC,YACUC,GACAC,GACAC,GACR;AAhBM,IAAAC,EAAA;AACA,IAAAA,EAAA;AAYE,SAAA,QAAAH,GACA,KAAA,eAAAC,GACA,KAAA,eAAAC,GAEH,KAAA,YAAYE,EAAYJ,CAAK,GAClC,KAAK,QAAQK,EAAM;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUd,UAAUC,GAA0B;AACzC,gBAAK,QAAQA,GACN;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQF,cAAc;AACnB,UAAMC,IAAWC,EAAiB,KAAK,KAAK,EAAE,KAAK,KAAK,EACrD,4BACGC,IAAMC,GACNC,IAAS,EAAE,QAAQ,KAAK,cAAc,QAAQ,KAAK,aAAa;AAEtE,WAAOC,EAAY,EAAE,SAAAL,GAAS,KAAAE,GAAK,QAAAE,GAA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AAgB;AACrC,WAAO,KAAK,YAAY,EAAE,KAAK,gBAAgB,CAACA,CAAM,CAAC;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYlD,cAAcA,GAAgB;AACnC,WAAO,KAAK,YAAY,EAAE,KAAK,cAAc,CAACA,CAAM,CAAC;AAAA,EAAA;AAEzD;"}
|
package/dist/utils/version.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="1.17.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="1.17.7",o=e;exports.version=o;
|
|
2
2
|
//# sourceMappingURL=version.cjs.map
|
package/dist/utils/version.js
CHANGED
package/package.json
CHANGED