@evergonlabs/tmi-protocol-api 0.8.0 → 0.9.0
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/app.d.ts +462 -67
- package/dist/app.d.ts.map +1 -1
- package/dist/client.d.ts +591 -180
- package/dist/client.d.ts.map +1 -1
- package/dist/common/blockchain.d.ts +63 -63
- package/dist/common/middleware/indexer.d.ts +1 -1
- package/dist/common/middleware/indexer.d.ts.map +1 -1
- package/dist/common/models/chainId.d.ts +3 -0
- package/dist/common/models/chainId.d.ts.map +1 -1
- package/dist/common/models/chainId.js +10 -16
- package/dist/common/models/platform.d.ts +1 -1
- package/dist/factory.d.ts +1 -3
- package/dist/factory.d.ts.map +1 -1
- package/dist/fractions/fractions/approveWrapper.route.d.ts +3 -3
- package/dist/fractions/fractions/approveWrapper.route.d.ts.map +1 -1
- package/dist/fractions/fractions/index.d.ts +1 -1
- package/dist/fractions/fractions/index.d.ts.map +1 -1
- package/dist/fractions/index.d.ts +154 -6
- package/dist/fractions/index.d.ts.map +1 -1
- package/dist/fractions/markets/getDeployEvent.d.ts +1 -1
- package/dist/fractions/markets/getDeployEvent.d.ts.map +1 -1
- package/dist/fractions/markets/getMarket/getMarket.d.ts +22 -2
- package/dist/fractions/markets/getMarket/getMarket.d.ts.map +1 -1
- package/dist/fractions/markets/getMarket/index.d.ts +22 -2
- package/dist/fractions/markets/getMarket/index.d.ts.map +1 -1
- package/dist/fractions/markets/index.d.ts +43 -3
- package/dist/fractions/markets/index.d.ts.map +1 -1
- package/dist/fractions/markets/searchMarkets/index.d.ts +22 -2
- package/dist/fractions/markets/searchMarkets/index.d.ts.map +1 -1
- package/dist/fractions/markets/searchMarkets/searchMarkets.d.ts +22 -2
- package/dist/fractions/markets/searchMarkets/searchMarkets.d.ts.map +1 -1
- package/dist/fractions/platforms/deployMarket.routes.d.ts +4 -4
- package/dist/fractions/platforms/deployMarket.routes.d.ts.map +1 -1
- package/dist/fractions/platforms/index.d.ts +1 -1
- package/dist/fractions/platforms/index.d.ts.map +1 -1
- package/dist/fractions/platforms/initCompilot.routes.d.ts +1 -1
- package/dist/fractions/platforms/initCompilot.routes.d.ts.map +1 -1
- package/dist/fractions/platforms/initNid.route.d.ts +1 -1
- package/dist/fractions/platforms/initNid.route.d.ts.map +1 -1
- package/dist/fractions/roles/getRoles.d.ts +1 -1
- package/dist/fractions/roles/getRoles.d.ts.map +1 -1
- package/dist/fractions/roles/grantRole.route.d.ts +1 -1
- package/dist/fractions/roles/grantRole.route.d.ts.map +1 -1
- package/dist/fractions/roles/index.d.ts +1 -1
- package/dist/fractions/roles/index.d.ts.map +1 -1
- package/dist/fractions/sales/approveSale.route.d.ts +1 -1
- package/dist/fractions/sales/approveSale.route.d.ts.map +1 -1
- package/dist/fractions/sales/common/fractionsSale.d.ts +1 -1
- package/dist/fractions/sales/completeSale.route.d.ts +1 -1
- package/dist/fractions/sales/completeSale.route.d.ts.map +1 -1
- package/dist/fractions/sales/createFractions.route.d.ts +1 -1
- package/dist/fractions/sales/createFractions.route.d.ts.map +1 -1
- package/dist/fractions/sales/getFractionSaleStatistics.route.d.ts +1 -1
- package/dist/fractions/sales/getFractionSaleStatistics.route.d.ts.map +1 -1
- package/dist/fractions/sales/getVaultAddress.d.ts +1 -1
- package/dist/fractions/sales/getVaultAddress.d.ts.map +1 -1
- package/dist/fractions/sales/getWithdrawEvent.d.ts +1 -1
- package/dist/fractions/sales/getWithdrawEvent.d.ts.map +1 -1
- package/dist/fractions/sales/index.d.ts +112 -4
- package/dist/fractions/sales/index.d.ts.map +1 -1
- package/dist/fractions/sales/parseFractionsCreatedEvent.d.ts +1 -1
- package/dist/fractions/sales/parseFractionsCreatedEvent.d.ts.map +1 -1
- package/dist/fractions/sales/purchase.route.d.ts +1 -1
- package/dist/fractions/sales/purchase.route.d.ts.map +1 -1
- package/dist/fractions/sales/purchaseStatistics.route.d.ts +1 -1
- package/dist/fractions/sales/purchaseStatistics.route.d.ts.map +1 -1
- package/dist/fractions/sales/receiveFundsAfterNonFunded.route.d.ts +2 -2
- package/dist/fractions/sales/receiveFundsAfterNonFunded.route.d.ts.map +1 -1
- package/dist/fractions/sales/receiveNonPurchasedWrappedAssets.route.d.ts +1 -1
- package/dist/fractions/sales/receiveNonPurchasedWrappedAssets.route.d.ts.map +1 -1
- package/dist/fractions/sales/recoverFractions.d.ts +1 -1
- package/dist/fractions/sales/recoverFractions.d.ts.map +1 -1
- package/dist/fractions/sales/rejectFractions.d.ts +1 -1
- package/dist/fractions/sales/rejectFractions.d.ts.map +1 -1
- package/dist/fractions/sales/searchActivity.route.d.ts +1 -1
- package/dist/fractions/sales/searchActivity.route.d.ts.map +1 -1
- package/dist/fractions/sales/searchSales/searchSales.d.ts +67 -2
- package/dist/fractions/sales/searchSales/searchSales.d.ts.map +1 -1
- package/dist/fractions/sales/searchWithdrawal.route.d.ts +35 -2
- package/dist/fractions/sales/searchWithdrawal.route.d.ts.map +1 -1
- package/dist/fractions/sales/setFeeCapLimit.d.ts +1 -1
- package/dist/fractions/sales/setFeeCapLimit.d.ts.map +1 -1
- package/dist/fractions/sales/unlockWrappedAssets.route.d.ts +1 -1
- package/dist/fractions/sales/unlockWrappedAssets.route.d.ts.map +1 -1
- package/dist/fractions/sales/vesting/claimStatistics.route.d.ts +12 -2
- package/dist/fractions/sales/vesting/claimStatistics.route.d.ts.map +1 -1
- package/dist/fractions/sales/vesting/claimVestedTokens.route.d.ts +1 -1
- package/dist/fractions/sales/vesting/claimVestedTokens.route.d.ts.map +1 -1
- package/dist/fractions/sales/vesting/editCliff.route.d.ts +1 -1
- package/dist/fractions/sales/vesting/editCliff.route.d.ts.map +1 -1
- package/dist/fractions/sales/vesting/parseClaimVestedTokensEvent.d.ts +1 -1
- package/dist/fractions/sales/vesting/parseClaimVestedTokensEvent.d.ts.map +1 -1
- package/dist/fractions/sales/withdraw.route.d.ts +1 -1
- package/dist/fractions/sales/withdraw.route.d.ts.map +1 -1
- package/dist/fractions/sig/getAuthData.d.ts +1 -1
- package/dist/fractions/sig/getAuthData.d.ts.map +1 -1
- package/dist/fractions/sig/getNonce.route.d.ts +1 -1
- package/dist/fractions/sig/getNonce.route.d.ts.map +1 -1
- package/dist/fractions/sig/index.d.ts +1 -1
- package/dist/fractions/sig/index.d.ts.map +1 -1
- package/dist/fractions/statistics/index.d.ts +1 -1
- package/dist/fractions/statistics/index.d.ts.map +1 -1
- package/dist/fractions/statistics/networkStatistics.route.d.ts +4 -4
- package/dist/fractions/statistics/networkStatistics.route.d.ts.map +1 -1
- package/dist/general/estimateGas.d.ts +1 -1
- package/dist/general/estimateGas.d.ts.map +1 -1
- package/dist/general/getBalance.d.ts +1 -1
- package/dist/general/getBalance.d.ts.map +1 -1
- package/dist/general/getBalancesBatch.d.ts +1 -1
- package/dist/general/getBalancesBatch.d.ts.map +1 -1
- package/dist/general/index.d.ts +1 -1
- package/dist/general/index.d.ts.map +1 -1
- package/dist/general/searchBalances.d.ts +1 -1
- package/dist/general/searchBalances.d.ts.map +1 -1
- package/dist/issuance/common/exports.d.ts +1 -1
- package/dist/issuance/common/exports.d.ts.map +1 -1
- package/dist/issuance/common/exports.js +1 -1
- package/dist/issuance/common/factories.base.d.ts +167 -0
- package/dist/issuance/common/factories.base.d.ts.map +1 -0
- package/dist/issuance/common/factories.base.js +15 -0
- package/dist/issuance/common/factories.d.ts +2 -166
- package/dist/issuance/common/factories.d.ts.map +1 -1
- package/dist/issuance/common/factories.js +4 -15
- package/dist/issuance/erc20/approve.d.ts +1 -1
- package/dist/issuance/erc20/approve.d.ts.map +1 -1
- package/dist/issuance/erc20/burn.d.ts +1 -1
- package/dist/issuance/erc20/burn.d.ts.map +1 -1
- package/dist/issuance/erc20/default/deploy.d.ts +38 -0
- package/dist/issuance/erc20/default/deploy.d.ts.map +1 -0
- package/dist/issuance/erc20/default/deploy.js +54 -0
- package/dist/issuance/erc20/default/initialize.d.ts +38 -0
- package/dist/issuance/erc20/default/initialize.d.ts.map +1 -0
- package/dist/issuance/erc20/default/initialize.js +43 -0
- package/dist/issuance/erc20/default/parseDeployEvent.d.ts +23 -0
- package/dist/issuance/erc20/default/parseDeployEvent.d.ts.map +1 -0
- package/dist/issuance/erc20/default/parseDeployEvent.js +79 -0
- package/dist/issuance/erc20/gated/deploy.d.ts +40 -0
- package/dist/issuance/erc20/gated/deploy.d.ts.map +1 -0
- package/dist/issuance/erc20/gated/deploy.js +60 -0
- package/dist/issuance/erc20/gated/initialize.d.ts +40 -0
- package/dist/issuance/erc20/gated/initialize.d.ts.map +1 -0
- package/dist/issuance/erc20/gated/initialize.js +45 -0
- package/dist/issuance/erc20/gated/parseDeployEvent.d.ts +23 -0
- package/dist/issuance/erc20/gated/parseDeployEvent.d.ts.map +1 -0
- package/dist/issuance/erc20/gated/parseDeployEvent.js +79 -0
- package/dist/issuance/erc20/gatedSimple/deploy.d.ts +15 -0
- package/dist/issuance/erc20/gatedSimple/deploy.d.ts.map +1 -0
- package/dist/issuance/erc20/gatedSimple/deploy.js +28 -0
- package/dist/issuance/erc20/gatedSimple/getInitData.d.ts +32 -0
- package/dist/issuance/erc20/gatedSimple/getInitData.d.ts.map +1 -0
- package/dist/issuance/erc20/gatedSimple/getInitData.js +51 -0
- package/dist/issuance/erc20/gatedSimple/parseDeployEvent.d.ts +18 -0
- package/dist/issuance/erc20/gatedSimple/parseDeployEvent.d.ts.map +1 -0
- package/dist/issuance/erc20/gatedSimple/parseDeployEvent.js +63 -0
- package/dist/issuance/erc20/grantRole.d.ts +1 -1
- package/dist/issuance/erc20/grantRole.d.ts.map +1 -1
- package/dist/issuance/erc20/index.d.ts +126 -30
- package/dist/issuance/erc20/index.d.ts.map +1 -1
- package/dist/issuance/erc20/index.js +21 -7
- package/dist/issuance/erc20/mint.d.ts +1 -1
- package/dist/issuance/erc20/mint.d.ts.map +1 -1
- package/dist/issuance/erc20/parseErc20DeployEvent.js +2 -2
- package/dist/issuance/erc20/recover.d.ts +1 -1
- package/dist/issuance/erc20/recover.d.ts.map +1 -1
- package/dist/issuance/erc20/renounceRole.d.ts +1 -1
- package/dist/issuance/erc20/renounceRole.d.ts.map +1 -1
- package/dist/issuance/erc20/revokeRole.d.ts +1 -1
- package/dist/issuance/erc20/revokeRole.d.ts.map +1 -1
- package/dist/issuance/erc20/transfer.d.ts +1 -1
- package/dist/issuance/erc20/transfer.d.ts.map +1 -1
- package/dist/issuance/erc20/transferFrom.d.ts +1 -1
- package/dist/issuance/erc20/transferFrom.d.ts.map +1 -1
- package/dist/issuance/erc721/approve.d.ts +1 -1
- package/dist/issuance/erc721/approve.d.ts.map +1 -1
- package/dist/issuance/erc721/burn.d.ts +1 -1
- package/dist/issuance/erc721/burn.d.ts.map +1 -1
- package/dist/issuance/erc721/default/deploy.d.ts +38 -0
- package/dist/issuance/erc721/default/deploy.d.ts.map +1 -0
- package/dist/issuance/erc721/default/deploy.js +53 -0
- package/dist/issuance/erc721/default/initialize.d.ts +38 -0
- package/dist/issuance/erc721/default/initialize.d.ts.map +1 -0
- package/dist/issuance/erc721/default/initialize.js +40 -0
- package/dist/issuance/erc721/default/parseDeployEvent.d.ts +23 -0
- package/dist/issuance/erc721/default/parseDeployEvent.d.ts.map +1 -0
- package/dist/issuance/erc721/default/parseDeployEvent.js +78 -0
- package/dist/issuance/erc721/gated/deploy.d.ts +40 -0
- package/dist/issuance/erc721/gated/deploy.d.ts.map +1 -0
- package/dist/issuance/erc721/gated/deploy.js +60 -0
- package/dist/issuance/erc721/gated/initialize.d.ts +40 -0
- package/dist/issuance/erc721/gated/initialize.d.ts.map +1 -0
- package/dist/issuance/erc721/gated/initialize.js +44 -0
- package/dist/issuance/erc721/gated/parseDeployEvent.d.ts +23 -0
- package/dist/issuance/erc721/gated/parseDeployEvent.d.ts.map +1 -0
- package/dist/issuance/erc721/gated/parseDeployEvent.js +78 -0
- package/dist/issuance/erc721/grantRole.d.ts +1 -1
- package/dist/issuance/erc721/grantRole.d.ts.map +1 -1
- package/dist/issuance/erc721/index.d.ts +78 -29
- package/dist/issuance/erc721/index.d.ts.map +1 -1
- package/dist/issuance/erc721/index.js +14 -7
- package/dist/issuance/erc721/mint.d.ts +1 -1
- package/dist/issuance/erc721/mint.d.ts.map +1 -1
- package/dist/issuance/erc721/parseErc721DeployEvent.js +2 -2
- package/dist/issuance/erc721/recover.d.ts +1 -1
- package/dist/issuance/erc721/recover.d.ts.map +1 -1
- package/dist/issuance/erc721/renounceRole.d.ts +1 -1
- package/dist/issuance/erc721/renounceRole.d.ts.map +1 -1
- package/dist/issuance/erc721/revokeRole.d.ts +1 -1
- package/dist/issuance/erc721/revokeRole.d.ts.map +1 -1
- package/dist/issuance/erc721/setBaseURI.d.ts +1 -1
- package/dist/issuance/erc721/setBaseURI.d.ts.map +1 -1
- package/dist/issuance/erc721/setTokenURI.d.ts +1 -1
- package/dist/issuance/erc721/setTokenURI.d.ts.map +1 -1
- package/dist/issuance/erc721/transferFrom.d.ts +1 -1
- package/dist/issuance/erc721/transferFrom.d.ts.map +1 -1
- package/dist/issuance/index.d.ts +186 -41
- package/dist/issuance/index.d.ts.map +1 -1
- package/dist/issuance/proxy/deploy.d.ts +2 -2
- package/dist/issuance/proxy/deploy.d.ts.map +1 -1
- package/dist/issuance/proxy/index.d.ts +1 -1
- package/dist/issuance/proxy/index.d.ts.map +1 -1
- package/dist/issuance/proxy/upgrade.d.ts +1 -1
- package/dist/issuance/proxy/upgrade.d.ts.map +1 -1
- package/dist/next/fractions/index.d.ts +1 -1
- package/dist/next/fractions/index.d.ts.map +1 -1
- package/dist/next/fractions/lending/buyback/buyback.routes.d.ts +1 -1
- package/dist/next/fractions/lending/buyback/buyback.routes.d.ts.map +1 -1
- package/dist/next/fractions/lending/createLendingSale.d.ts +1 -1
- package/dist/next/fractions/lending/createLendingSale.d.ts.map +1 -1
- package/dist/next/fractions/lending/deployMarket/lending.routes.d.ts +1 -1
- package/dist/next/fractions/lending/deployMarket/lending.routes.d.ts.map +1 -1
- package/dist/next/fractions/lending/index.d.ts +1 -1
- package/dist/next/fractions/lending/index.d.ts.map +1 -1
- package/dist/next/fractions/lending/purchase/directPurchase.route.d.ts +1 -1
- package/dist/next/fractions/lending/purchase/directPurchase.route.d.ts.map +1 -1
- package/dist/next/fractions/lending/setCollateralPrice/setCollateralPrice.routes.d.ts +1 -1
- package/dist/next/fractions/lending/setCollateralPrice/setCollateralPrice.routes.d.ts.map +1 -1
- package/dist/next/fractions/platforms/deployNftFractionsMarket.routes.d.ts +1 -1
- package/dist/next/fractions/platforms/deployNftFractionsMarket.routes.d.ts.map +1 -1
- package/dist/next/fractions/platforms/index.d.ts +1 -1
- package/dist/next/fractions/platforms/index.d.ts.map +1 -1
- package/dist/next/fractions/sales/createNftFractions.routes.d.ts +1 -1
- package/dist/next/fractions/sales/createNftFractions.routes.d.ts.map +1 -1
- package/dist/next/fractions/sales/index.d.ts +1 -1
- package/dist/next/fractions/sales/index.d.ts.map +1 -1
- package/dist/staking/index.d.ts +76 -8
- package/dist/staking/index.d.ts.map +1 -1
- package/dist/staking/platforms/getPlatform/index.d.ts +1 -1
- package/dist/staking/platforms/getPlatform/index.d.ts.map +1 -1
- package/dist/staking/platforms/getPlatform/v0/getPlatform.d.ts +1 -1
- package/dist/staking/platforms/getPlatform/v0/getPlatform.d.ts.map +1 -1
- package/dist/staking/platforms/index.d.ts +1 -1
- package/dist/staking/platforms/index.d.ts.map +1 -1
- package/dist/staking/platforms/searchPlatforms/index.d.ts +1 -1
- package/dist/staking/platforms/searchPlatforms/index.d.ts.map +1 -1
- package/dist/staking/platforms/searchPlatforms/v0/searchPlatforms.d.ts +1 -1
- package/dist/staking/platforms/searchPlatforms/v0/searchPlatforms.d.ts.map +1 -1
- package/dist/staking/pools/getPool/index.d.ts +10 -2
- package/dist/staking/pools/getPool/index.d.ts.map +1 -1
- package/dist/staking/pools/getPool/v0/getPool.d.ts +11 -2
- package/dist/staking/pools/getPool/v0/getPool.d.ts.map +1 -1
- package/dist/staking/pools/index.d.ts +19 -3
- package/dist/staking/pools/index.d.ts.map +1 -1
- package/dist/staking/pools/searchPools/index.d.ts +10 -2
- package/dist/staking/pools/searchPools/index.d.ts.map +1 -1
- package/dist/staking/pools/searchPools/v0/searchPools.d.ts +11 -2
- package/dist/staking/pools/searchPools/v0/searchPools.d.ts.map +1 -1
- package/dist/staking/roles/getRoles/index.d.ts +1 -1
- package/dist/staking/roles/getRoles/index.d.ts.map +1 -1
- package/dist/staking/roles/getRoles/v0/getRoles.d.ts +1 -1
- package/dist/staking/roles/getRoles/v0/getRoles.d.ts.map +1 -1
- package/dist/staking/roles/grantRole/index.d.ts +1 -1
- package/dist/staking/roles/grantRole/index.d.ts.map +1 -1
- package/dist/staking/roles/grantRole/v0/grantRole.d.ts +1 -1
- package/dist/staking/roles/grantRole/v0/grantRole.d.ts.map +1 -1
- package/dist/staking/roles/index.d.ts +20 -3
- package/dist/staking/roles/index.d.ts.map +1 -1
- package/dist/staking/roles/searchRoleEvents/index.d.ts +11 -2
- package/dist/staking/roles/searchRoleEvents/index.d.ts.map +1 -1
- package/dist/staking/roles/searchRoleEvents/v0/searchRoleEvents.d.ts +11 -2
- package/dist/staking/roles/searchRoleEvents/v0/searchRoleEvents.d.ts.map +1 -1
- package/dist/staking/roles/searchRoles/index.d.ts +10 -2
- package/dist/staking/roles/searchRoles/index.d.ts.map +1 -1
- package/dist/staking/roles/searchRoles/v0/searchRoles.d.ts +11 -2
- package/dist/staking/roles/searchRoles/v0/searchRoles.d.ts.map +1 -1
- package/dist/staking/stakes/getStake/index.d.ts +15 -2
- package/dist/staking/stakes/getStake/index.d.ts.map +1 -1
- package/dist/staking/stakes/getStake/v0/getStake.d.ts +15 -2
- package/dist/staking/stakes/getStake/v0/getStake.d.ts.map +1 -1
- package/dist/staking/stakes/index.d.ts +39 -4
- package/dist/staking/stakes/index.d.ts.map +1 -1
- package/dist/staking/stakes/searchStakeEvents/index.d.ts +11 -2
- package/dist/staking/stakes/searchStakeEvents/index.d.ts.map +1 -1
- package/dist/staking/stakes/searchStakeEvents/v0/searchStakeEvents.d.ts +12 -2
- package/dist/staking/stakes/searchStakeEvents/v0/searchStakeEvents.d.ts.map +1 -1
- package/dist/staking/stakes/searchStakes/index.d.ts +15 -2
- package/dist/staking/stakes/searchStakes/index.d.ts.map +1 -1
- package/dist/staking/stakes/searchStakes/v0/searchStakes.d.ts +15 -2
- package/dist/staking/stakes/searchStakes/v0/searchStakes.d.ts.map +1 -1
- package/dist/stakingTemplates/index.d.ts +43 -7
- package/dist/stakingTemplates/index.d.ts.map +1 -1
- package/dist/stakingTemplates/templates/common/getCreatePoolEvent.d.ts +6 -2
- package/dist/stakingTemplates/templates/common/getCreatePoolEvent.d.ts.map +1 -1
- package/dist/stakingTemplates/templates/common/getPlatformDeployEvent.d.ts +1 -1
- package/dist/stakingTemplates/templates/common/getPlatformDeployEvent.d.ts.map +1 -1
- package/dist/stakingTemplates/templates/common/getReward.d.ts +1 -1
- package/dist/stakingTemplates/templates/common/getReward.d.ts.map +1 -1
- package/dist/stakingTemplates/templates/common/getStakeEvent.d.ts +10 -2
- package/dist/stakingTemplates/templates/common/getStakeEvent.d.ts.map +1 -1
- package/dist/stakingTemplates/templates/common/partialUnstake.d.ts +1 -1
- package/dist/stakingTemplates/templates/common/partialUnstake.d.ts.map +1 -1
- package/dist/stakingTemplates/templates/common/unstake.d.ts +1 -1
- package/dist/stakingTemplates/templates/common/unstake.d.ts.map +1 -1
- package/dist/stakingTemplates/templates/reputation/index.d.ts +15 -3
- package/dist/stakingTemplates/templates/reputation/index.d.ts.map +1 -1
- package/dist/stakingTemplates/templates/reputation/v0/createPlatform.d.ts +1 -1
- package/dist/stakingTemplates/templates/reputation/v0/createPlatform.d.ts.map +1 -1
- package/dist/stakingTemplates/templates/reputation/v0/createPool.d.ts +1 -1
- package/dist/stakingTemplates/templates/reputation/v0/createPool.d.ts.map +1 -1
- package/dist/stakingTemplates/templates/reputation/v0/index.d.ts +15 -3
- package/dist/stakingTemplates/templates/reputation/v0/index.d.ts.map +1 -1
- package/dist/stakingTemplates/templates/reputation/v0/restake.d.ts +1 -1
- package/dist/stakingTemplates/templates/reputation/v0/restake.d.ts.map +1 -1
- package/dist/stakingTemplates/templates/reputation/v0/stake.d.ts +1 -1
- package/dist/stakingTemplates/templates/reputation/v0/stake.d.ts.map +1 -1
- package/dist/stakingTemplates/templates/reputationLock/index.d.ts +15 -3
- package/dist/stakingTemplates/templates/reputationLock/index.d.ts.map +1 -1
- package/dist/stakingTemplates/templates/reputationLock/v0/createPlatform.d.ts +1 -1
- package/dist/stakingTemplates/templates/reputationLock/v0/createPlatform.d.ts.map +1 -1
- package/dist/stakingTemplates/templates/reputationLock/v0/createPool.d.ts +1 -1
- package/dist/stakingTemplates/templates/reputationLock/v0/createPool.d.ts.map +1 -1
- package/dist/stakingTemplates/templates/reputationLock/v0/index.d.ts +15 -3
- package/dist/stakingTemplates/templates/reputationLock/v0/index.d.ts.map +1 -1
- package/dist/stakingTemplates/templates/reputationLock/v0/restake.d.ts +1 -1
- package/dist/stakingTemplates/templates/reputationLock/v0/restake.d.ts.map +1 -1
- package/dist/stakingTemplates/templates/reputationLock/v0/stake.d.ts +1 -1
- package/dist/stakingTemplates/templates/reputationLock/v0/stake.d.ts.map +1 -1
- package/dist/stakingTemplates/templates/rwa/index.d.ts +15 -3
- package/dist/stakingTemplates/templates/rwa/index.d.ts.map +1 -1
- package/dist/stakingTemplates/templates/rwa/v0/createPlatform.d.ts +1 -1
- package/dist/stakingTemplates/templates/rwa/v0/createPlatform.d.ts.map +1 -1
- package/dist/stakingTemplates/templates/rwa/v0/createPool.d.ts +1 -1
- package/dist/stakingTemplates/templates/rwa/v0/createPool.d.ts.map +1 -1
- package/dist/stakingTemplates/templates/rwa/v0/distributeRewards.d.ts +1 -1
- package/dist/stakingTemplates/templates/rwa/v0/distributeRewards.d.ts.map +1 -1
- package/dist/stakingTemplates/templates/rwa/v0/index.d.ts +15 -3
- package/dist/stakingTemplates/templates/rwa/v0/index.d.ts.map +1 -1
- package/dist/stakingTemplates/templates/rwa/v0/restake.d.ts +1 -1
- package/dist/stakingTemplates/templates/rwa/v0/restake.d.ts.map +1 -1
- package/dist/stakingTemplates/templates/rwa/v0/stake.d.ts +1 -1
- package/dist/stakingTemplates/templates/rwa/v0/stake.d.ts.map +1 -1
- package/package.json +12 -12
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const InitializeDefaultErc20RequestSchema: z.ZodObject<{
|
|
3
|
+
tokenAddress: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
symbol: z.ZodString;
|
|
6
|
+
cap: z.ZodPipe<z.core.$ZodBranded<z.ZodString, "Int256", "out">, z.ZodTransform<bigint, string & z.core.$brand<"Int256">>>;
|
|
7
|
+
defaultAdmin: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
8
|
+
minter: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export declare const InitializeDefaultErc20: import("../../../common/controller.js").IController<import("hono/hono-base").HonoBase<import("../../../common/context.js").AppContext, {
|
|
11
|
+
"/": {
|
|
12
|
+
$post: {
|
|
13
|
+
input: {
|
|
14
|
+
json: {
|
|
15
|
+
tokenAddress: string;
|
|
16
|
+
name: string;
|
|
17
|
+
symbol: string;
|
|
18
|
+
cap: string;
|
|
19
|
+
defaultAdmin: string;
|
|
20
|
+
minter: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
output: {
|
|
24
|
+
data: `0x${string}`;
|
|
25
|
+
to: `0x${string}`;
|
|
26
|
+
details: {
|
|
27
|
+
functionName: string;
|
|
28
|
+
address: `0x${string}`;
|
|
29
|
+
abi: any[];
|
|
30
|
+
args: any[];
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
outputFormat: "json";
|
|
34
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
}, "/", "/">>;
|
|
38
|
+
//# sourceMappingURL=initialize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initialize.d.ts","sourceRoot":"","sources":["../../../../src/issuance/erc20/default/initialize.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,mCAAmC;;;;;;;iBAO9C,CAAC;AAkBH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;aAgBjC,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { describeRoute } from "hono-openapi";
|
|
2
|
+
import { resolver, validator } from "hono-openapi";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import { abis } from "@evergonlabs/tmi-factories-sdk";
|
|
5
|
+
import { createController } from "../../../common/controller.js";
|
|
6
|
+
import { AddressSchema, toTransaction, TransactionSchema } from "../../../common/index.js";
|
|
7
|
+
import { Int256BigInt } from "../../../common/int256.js";
|
|
8
|
+
export const InitializeDefaultErc20RequestSchema = z.object({
|
|
9
|
+
tokenAddress: AddressSchema,
|
|
10
|
+
name: z.string().nonempty().openapi({ description: "Name of the ERC20 token" }),
|
|
11
|
+
symbol: z.string().nonempty().openapi({ description: "Symbol of the ERC20 token" }),
|
|
12
|
+
cap: Int256BigInt(z.bigint().nonnegative()),
|
|
13
|
+
defaultAdmin: AddressSchema.openapi({ description: "Address to receive DEFAULT_ADMIN_ROLE" }),
|
|
14
|
+
minter: AddressSchema.openapi({ description: "Address to receive MINTER_ROLE" }),
|
|
15
|
+
});
|
|
16
|
+
const initializeRoute = describeRoute({
|
|
17
|
+
summary: "Initialize ERC20",
|
|
18
|
+
description: "Returns transaction data for initializing an ERC20 token proxy contract",
|
|
19
|
+
tags: ["Issuance"],
|
|
20
|
+
responses: {
|
|
21
|
+
200: {
|
|
22
|
+
description: "Returns transaction data for initializing an ERC20",
|
|
23
|
+
content: {
|
|
24
|
+
"application/json": {
|
|
25
|
+
schema: resolver(TransactionSchema),
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
export const InitializeDefaultErc20 = createController({
|
|
32
|
+
build: (factory) => factory
|
|
33
|
+
.createApp()
|
|
34
|
+
.post("/", initializeRoute, validator("json", InitializeDefaultErc20RequestSchema), async (c) => {
|
|
35
|
+
const { tokenAddress, name, symbol, cap, defaultAdmin, minter } = c.req.valid("json");
|
|
36
|
+
return c.json(toTransaction({
|
|
37
|
+
address: tokenAddress,
|
|
38
|
+
abi: abis.erc20PausableRecoverableUpgradeableAbi,
|
|
39
|
+
functionName: "initialize",
|
|
40
|
+
args: [name, symbol, BigInt(cap), defaultAdmin, minter],
|
|
41
|
+
}));
|
|
42
|
+
}),
|
|
43
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare const ParseDefaultErc20DeployEvent: import("../../../common/controller.js").IController<import("hono/hono-base").HonoBase<import("../../../common/context.js").AppContext, {
|
|
2
|
+
"/": {
|
|
3
|
+
$get: {
|
|
4
|
+
input: {
|
|
5
|
+
query: {
|
|
6
|
+
chainId: string | string[];
|
|
7
|
+
hash: string | string[];
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
output: {
|
|
11
|
+
proxy: `0x${string}`;
|
|
12
|
+
admin: `0x${string}`;
|
|
13
|
+
minter: `0x${string}`;
|
|
14
|
+
supplyCap: string;
|
|
15
|
+
name: string;
|
|
16
|
+
symbol: string;
|
|
17
|
+
};
|
|
18
|
+
outputFormat: "json";
|
|
19
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
}, "/", "/">>;
|
|
23
|
+
//# sourceMappingURL=parseDeployEvent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseDeployEvent.d.ts","sourceRoot":"","sources":["../../../../src/issuance/erc20/default/parseDeployEvent.ts"],"names":[],"mappings":"AA4BA,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;aAoDvC,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { describeRoute } from "hono-openapi";
|
|
2
|
+
import { resolver, validator } from "hono-openapi";
|
|
3
|
+
import { parseEventLogs } from "viem";
|
|
4
|
+
import { waitForTransactionReceipt } from "viem/actions";
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
import { abis } from "@evergonlabs/tmi-factories-sdk";
|
|
7
|
+
import { Int256Json } from "@evergonlabs/tmi-utils/models";
|
|
8
|
+
import { getPublicClient } from "../../../common/blockchain.js";
|
|
9
|
+
import { createController } from "../../../common/controller.js";
|
|
10
|
+
import { HttpError } from "../../../common/http-error.js";
|
|
11
|
+
import { AddressSchema, HashSchema } from "../../../common/index.js";
|
|
12
|
+
import { FactoryChainIdQuery } from "../../common/factories.js";
|
|
13
|
+
const QuerySchema = z.object({
|
|
14
|
+
chainId: FactoryChainIdQuery.openapi({
|
|
15
|
+
param: {
|
|
16
|
+
name: "chainId",
|
|
17
|
+
in: "query",
|
|
18
|
+
},
|
|
19
|
+
}),
|
|
20
|
+
hash: HashSchema.openapi({
|
|
21
|
+
param: {
|
|
22
|
+
name: "hash",
|
|
23
|
+
in: "query",
|
|
24
|
+
},
|
|
25
|
+
}),
|
|
26
|
+
});
|
|
27
|
+
export const ParseDefaultErc20DeployEvent = createController({
|
|
28
|
+
build: (factory) => factory.createApp().get("/", describeRoute({
|
|
29
|
+
summary: "Get ERC20 TokenProxyConfigured Event",
|
|
30
|
+
description: `Gets the transaction by hash and parses emitted logs.\n\nProvided transaction must be a transaction emitted by the ERC20 factory \`deployAndInitializeProxy\` action`,
|
|
31
|
+
tags: ["Issuance"],
|
|
32
|
+
responses: {
|
|
33
|
+
200: {
|
|
34
|
+
description: "Returns parsed event log",
|
|
35
|
+
content: {
|
|
36
|
+
"application/json": {
|
|
37
|
+
schema: resolver(z.object({
|
|
38
|
+
proxy: AddressSchema,
|
|
39
|
+
admin: AddressSchema,
|
|
40
|
+
minter: AddressSchema,
|
|
41
|
+
supplyCap: Int256Json,
|
|
42
|
+
name: z.string(),
|
|
43
|
+
symbol: z.string(),
|
|
44
|
+
})),
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
}), validator("query", QuerySchema), async (c) => {
|
|
50
|
+
const params = c.req.valid("query");
|
|
51
|
+
const receipt = await waitForTransactionReceipt(getPublicClient(params.chainId, c.env.config), {
|
|
52
|
+
hash: params.hash,
|
|
53
|
+
});
|
|
54
|
+
const [event] = parseEventLogs({
|
|
55
|
+
abi: abis.erc20PausableRecoverableFactoryAbi,
|
|
56
|
+
eventName: "TokenProxyConfigured",
|
|
57
|
+
logs: receipt.logs,
|
|
58
|
+
});
|
|
59
|
+
if (!event) {
|
|
60
|
+
throw new UnableParseDefaultErc20DeployEvent();
|
|
61
|
+
}
|
|
62
|
+
return c.json({
|
|
63
|
+
proxy: event.args.proxy,
|
|
64
|
+
admin: event.args.admin,
|
|
65
|
+
minter: event.args.minter,
|
|
66
|
+
supplyCap: event.args.supplyCap.toString(),
|
|
67
|
+
name: event.args.name,
|
|
68
|
+
symbol: event.args.symbol,
|
|
69
|
+
});
|
|
70
|
+
}),
|
|
71
|
+
});
|
|
72
|
+
class UnableParseDefaultErc20DeployEvent extends HttpError {
|
|
73
|
+
constructor() {
|
|
74
|
+
super(500, {
|
|
75
|
+
message: `Can't parse TokenProxyConfigured event. Make sure you're passing a transaction generated by the ERC20 factory \`deployAndInitializeProxy\` action`,
|
|
76
|
+
name: "UnableParseDefaultErc20DeployEvent",
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const DeployGatedErc20RequestSchema: z.ZodObject<{
|
|
3
|
+
chainId: z.ZodUnion<[z.ZodLiteral<11155111 | 72080>, z.ZodLiteral<11155111 | 72080>, ...z.ZodLiteral<11155111 | 72080>[]]>;
|
|
4
|
+
tokenName: z.ZodString;
|
|
5
|
+
tokenSymbol: z.ZodString;
|
|
6
|
+
supplyCap: z.ZodPipe<z.core.$ZodBranded<z.ZodString, "Int256", "out">, z.ZodTransform<bigint, string & z.core.$brand<"Int256">>>;
|
|
7
|
+
defaultTokenAdmin: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
8
|
+
minter: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
9
|
+
gatingSigner: z.ZodOptional<z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export declare const CreateGatedErc20Token: import("../../../common/controller.js").IController<import("hono/hono-base").HonoBase<import("../../../common/context.js").AppContext, {
|
|
12
|
+
"/": {
|
|
13
|
+
$post: {
|
|
14
|
+
input: {
|
|
15
|
+
json: {
|
|
16
|
+
chainId: 11155111 | 72080;
|
|
17
|
+
tokenName: string;
|
|
18
|
+
tokenSymbol: string;
|
|
19
|
+
supplyCap: string;
|
|
20
|
+
defaultTokenAdmin: string;
|
|
21
|
+
minter: string;
|
|
22
|
+
gatingSigner?: string | undefined;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
output: {
|
|
26
|
+
data: `0x${string}`;
|
|
27
|
+
to: `0x${string}`;
|
|
28
|
+
details: {
|
|
29
|
+
functionName: string;
|
|
30
|
+
address: `0x${string}`;
|
|
31
|
+
abi: any[];
|
|
32
|
+
args: any[];
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
outputFormat: "json";
|
|
36
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
}, "/", "/">>;
|
|
40
|
+
//# sourceMappingURL=deploy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../../src/issuance/erc20/gated/deploy.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,eAAO,MAAM,6BAA6B;;;;;;;;iBAUxC,CAAC;AAsBH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAyBhC,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { describeRoute } from "hono-openapi";
|
|
2
|
+
import { resolver, validator } from "hono-openapi";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import { abis } from "@evergonlabs/tmi-factories-sdk";
|
|
5
|
+
import { createController } from "../../../common/controller.js";
|
|
6
|
+
import { AddressSchema, toTransaction, TransactionSchema } from "../../../common/index.js";
|
|
7
|
+
import { Int256BigInt } from "../../../common/int256.js";
|
|
8
|
+
import { DEFAULT_COMPILOT_SIGNER } from "../../../common/models/compilot.js";
|
|
9
|
+
import { FactoryChainId, getFactories } from "../../common/factories.js";
|
|
10
|
+
export const DeployGatedErc20RequestSchema = z.object({
|
|
11
|
+
chainId: FactoryChainId.Schema,
|
|
12
|
+
tokenName: z.string().nonempty().openapi({ description: "Name of the ERC20 token" }),
|
|
13
|
+
tokenSymbol: z.string().nonempty().openapi({ description: "Symbol of the ERC20 token" }),
|
|
14
|
+
supplyCap: Int256BigInt(z.bigint().nonnegative()),
|
|
15
|
+
defaultTokenAdmin: AddressSchema.openapi({ description: "Address to receive DEFAULT_ADMIN_ROLE" }),
|
|
16
|
+
minter: AddressSchema.openapi({ description: "Address to receive MINTER_ROLE" }),
|
|
17
|
+
gatingSigner: AddressSchema.optional().openapi({
|
|
18
|
+
description: "Address of the gating signer for whitelist verification. Defaults to the ComPilot signer.",
|
|
19
|
+
}),
|
|
20
|
+
});
|
|
21
|
+
const deployGatedErc20Route = describeRoute({
|
|
22
|
+
summary: "Deploy Gated ERC20 via Factory",
|
|
23
|
+
description: `Returns transaction data for deploying a new whitelist-gated ERC20 token via the factory contract.
|
|
24
|
+
|
|
25
|
+
**Note: This contract is not audited.**
|
|
26
|
+
|
|
27
|
+
Calls deployAndInitializeProxy on the ERC20GatedPausableRecoverableFactory to atomically deploy and initialize a new token proxy.`,
|
|
28
|
+
tags: ["Issuance"],
|
|
29
|
+
responses: {
|
|
30
|
+
200: {
|
|
31
|
+
description: "Returns transaction data for deploying a gated ERC20 token via factory",
|
|
32
|
+
content: {
|
|
33
|
+
"application/json": {
|
|
34
|
+
schema: resolver(TransactionSchema),
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
export const CreateGatedErc20Token = createController({
|
|
41
|
+
build: (factory) => factory
|
|
42
|
+
.createApp()
|
|
43
|
+
.post("/", deployGatedErc20Route, validator("json", DeployGatedErc20RequestSchema), async (c) => {
|
|
44
|
+
const { chainId, tokenName, tokenSymbol, supplyCap, defaultTokenAdmin, minter, gatingSigner } = c.req.valid("json");
|
|
45
|
+
const factory = getFactories(chainId);
|
|
46
|
+
return c.json(toTransaction({
|
|
47
|
+
address: factory.ERC20GatedPausableRecoverableFactory,
|
|
48
|
+
abi: abis.erc20GatedPausableRecoverableFactoryAbi,
|
|
49
|
+
functionName: "deployAndInitializeProxy",
|
|
50
|
+
args: [
|
|
51
|
+
tokenName,
|
|
52
|
+
tokenSymbol,
|
|
53
|
+
BigInt(supplyCap),
|
|
54
|
+
defaultTokenAdmin,
|
|
55
|
+
minter,
|
|
56
|
+
gatingSigner ?? DEFAULT_COMPILOT_SIGNER,
|
|
57
|
+
],
|
|
58
|
+
}));
|
|
59
|
+
}),
|
|
60
|
+
});
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const InitializeGatedErc20RequestSchema: z.ZodObject<{
|
|
3
|
+
tokenAddress: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
4
|
+
name: z.ZodString;
|
|
5
|
+
symbol: z.ZodString;
|
|
6
|
+
cap: z.ZodPipe<z.core.$ZodBranded<z.ZodString, "Int256", "out">, z.ZodTransform<bigint, string & z.core.$brand<"Int256">>>;
|
|
7
|
+
defaultAdmin: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
8
|
+
minter: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
9
|
+
gatingSigner: z.ZodOptional<z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export declare const InitializeGatedErc20: import("../../../common/controller.js").IController<import("hono/hono-base").HonoBase<import("../../../common/context.js").AppContext, {
|
|
12
|
+
"/": {
|
|
13
|
+
$post: {
|
|
14
|
+
input: {
|
|
15
|
+
json: {
|
|
16
|
+
tokenAddress: string;
|
|
17
|
+
name: string;
|
|
18
|
+
symbol: string;
|
|
19
|
+
cap: string;
|
|
20
|
+
defaultAdmin: string;
|
|
21
|
+
minter: string;
|
|
22
|
+
gatingSigner?: string | undefined;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
output: {
|
|
26
|
+
data: `0x${string}`;
|
|
27
|
+
to: `0x${string}`;
|
|
28
|
+
details: {
|
|
29
|
+
functionName: string;
|
|
30
|
+
address: `0x${string}`;
|
|
31
|
+
abi: any[];
|
|
32
|
+
args: any[];
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
outputFormat: "json";
|
|
36
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
}, "/", "/">>;
|
|
40
|
+
//# sourceMappingURL=initialize.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initialize.d.ts","sourceRoot":"","sources":["../../../../src/issuance/erc20/gated/initialize.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,iCAAiC;;;;;;;;iBAU5C,CAAC;AAkBH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAc/B,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { describeRoute } from "hono-openapi";
|
|
2
|
+
import { resolver, validator } from "hono-openapi";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
import { abis } from "@evergonlabs/tmi-factories-sdk";
|
|
5
|
+
import { createController } from "../../../common/controller.js";
|
|
6
|
+
import { AddressSchema, toTransaction, TransactionSchema } from "../../../common/index.js";
|
|
7
|
+
import { Int256BigInt } from "../../../common/int256.js";
|
|
8
|
+
import { DEFAULT_COMPILOT_SIGNER } from "../../../common/models/compilot.js";
|
|
9
|
+
export const InitializeGatedErc20RequestSchema = z.object({
|
|
10
|
+
tokenAddress: AddressSchema,
|
|
11
|
+
name: z.string().nonempty().openapi({ description: "Name of the ERC20 token" }),
|
|
12
|
+
symbol: z.string().nonempty().openapi({ description: "Symbol of the ERC20 token" }),
|
|
13
|
+
cap: Int256BigInt(z.bigint().nonnegative()),
|
|
14
|
+
defaultAdmin: AddressSchema.openapi({ description: "Address to receive DEFAULT_ADMIN_ROLE" }),
|
|
15
|
+
minter: AddressSchema.openapi({ description: "Address to receive MINTER_ROLE" }),
|
|
16
|
+
gatingSigner: AddressSchema.optional().openapi({
|
|
17
|
+
description: "Address of the gating signer for whitelist verification. Defaults to the ComPilot signer.",
|
|
18
|
+
}),
|
|
19
|
+
});
|
|
20
|
+
const initializeRoute = describeRoute({
|
|
21
|
+
summary: "Initialize Gated ERC20",
|
|
22
|
+
description: "Returns transaction data for initializing a gated ERC20 token proxy contract",
|
|
23
|
+
tags: ["Issuance"],
|
|
24
|
+
responses: {
|
|
25
|
+
200: {
|
|
26
|
+
description: "Returns transaction data for initializing a gated ERC20",
|
|
27
|
+
content: {
|
|
28
|
+
"application/json": {
|
|
29
|
+
schema: resolver(TransactionSchema),
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
export const InitializeGatedErc20 = createController({
|
|
36
|
+
build: (factory) => factory.createApp().post("/", initializeRoute, validator("json", InitializeGatedErc20RequestSchema), async (c) => {
|
|
37
|
+
const { tokenAddress, name, symbol, cap, defaultAdmin, minter, gatingSigner } = c.req.valid("json");
|
|
38
|
+
return c.json(toTransaction({
|
|
39
|
+
address: tokenAddress,
|
|
40
|
+
abi: abis.erc20WhitelistGatedPausableRecoverableUpgradeableAbi,
|
|
41
|
+
functionName: "initialize",
|
|
42
|
+
args: [name, symbol, BigInt(cap), defaultAdmin, minter, gatingSigner ?? DEFAULT_COMPILOT_SIGNER],
|
|
43
|
+
}));
|
|
44
|
+
}),
|
|
45
|
+
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export declare const ParseGatedErc20DeployEvent: import("../../../common/controller.js").IController<import("hono/hono-base").HonoBase<import("../../../common/context.js").AppContext, {
|
|
2
|
+
"/": {
|
|
3
|
+
$get: {
|
|
4
|
+
input: {
|
|
5
|
+
query: {
|
|
6
|
+
chainId: string | string[];
|
|
7
|
+
hash: string | string[];
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
output: {
|
|
11
|
+
proxy: `0x${string}`;
|
|
12
|
+
admin: `0x${string}`;
|
|
13
|
+
minter: `0x${string}`;
|
|
14
|
+
supplyCap: string;
|
|
15
|
+
name: string;
|
|
16
|
+
symbol: string;
|
|
17
|
+
};
|
|
18
|
+
outputFormat: "json";
|
|
19
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
}, "/", "/">>;
|
|
23
|
+
//# sourceMappingURL=parseDeployEvent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parseDeployEvent.d.ts","sourceRoot":"","sources":["../../../../src/issuance/erc20/gated/parseDeployEvent.ts"],"names":[],"mappings":"AA4BA,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;aAoDrC,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { describeRoute } from "hono-openapi";
|
|
2
|
+
import { resolver, validator } from "hono-openapi";
|
|
3
|
+
import { parseEventLogs } from "viem";
|
|
4
|
+
import { waitForTransactionReceipt } from "viem/actions";
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
import { abis } from "@evergonlabs/tmi-factories-sdk";
|
|
7
|
+
import { Int256Json } from "@evergonlabs/tmi-utils/models";
|
|
8
|
+
import { getPublicClient } from "../../../common/blockchain.js";
|
|
9
|
+
import { createController } from "../../../common/controller.js";
|
|
10
|
+
import { HttpError } from "../../../common/http-error.js";
|
|
11
|
+
import { AddressSchema, HashSchema } from "../../../common/index.js";
|
|
12
|
+
import { FactoryChainIdQuery } from "../../common/factories.js";
|
|
13
|
+
const QuerySchema = z.object({
|
|
14
|
+
chainId: FactoryChainIdQuery.openapi({
|
|
15
|
+
param: {
|
|
16
|
+
name: "chainId",
|
|
17
|
+
in: "query",
|
|
18
|
+
},
|
|
19
|
+
}),
|
|
20
|
+
hash: HashSchema.openapi({
|
|
21
|
+
param: {
|
|
22
|
+
name: "hash",
|
|
23
|
+
in: "query",
|
|
24
|
+
},
|
|
25
|
+
}),
|
|
26
|
+
});
|
|
27
|
+
export const ParseGatedErc20DeployEvent = createController({
|
|
28
|
+
build: (factory) => factory.createApp().get("/", describeRoute({
|
|
29
|
+
summary: "Get Gated ERC20 TokenProxyConfigured Event",
|
|
30
|
+
description: `Gets the transaction by hash and parses emitted logs.\n\nProvided transaction must be a transaction emitted by the Gated ERC20 factory \`deployAndInitializeProxy\` action`,
|
|
31
|
+
tags: ["Issuance"],
|
|
32
|
+
responses: {
|
|
33
|
+
200: {
|
|
34
|
+
description: "Returns parsed event log",
|
|
35
|
+
content: {
|
|
36
|
+
"application/json": {
|
|
37
|
+
schema: resolver(z.object({
|
|
38
|
+
proxy: AddressSchema,
|
|
39
|
+
admin: AddressSchema,
|
|
40
|
+
minter: AddressSchema,
|
|
41
|
+
supplyCap: Int256Json,
|
|
42
|
+
name: z.string(),
|
|
43
|
+
symbol: z.string(),
|
|
44
|
+
})),
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
}), validator("query", QuerySchema), async (c) => {
|
|
50
|
+
const params = c.req.valid("query");
|
|
51
|
+
const receipt = await waitForTransactionReceipt(getPublicClient(params.chainId, c.env.config), {
|
|
52
|
+
hash: params.hash,
|
|
53
|
+
});
|
|
54
|
+
const [event] = parseEventLogs({
|
|
55
|
+
abi: abis.erc20GatedPausableRecoverableFactoryAbi,
|
|
56
|
+
eventName: "TokenProxyConfigured",
|
|
57
|
+
logs: receipt.logs,
|
|
58
|
+
});
|
|
59
|
+
if (!event) {
|
|
60
|
+
throw new UnableParseGatedErc20DeployEvent();
|
|
61
|
+
}
|
|
62
|
+
return c.json({
|
|
63
|
+
proxy: event.args.proxy,
|
|
64
|
+
admin: event.args.admin,
|
|
65
|
+
minter: event.args.minter,
|
|
66
|
+
supplyCap: event.args.supplyCap.toString(),
|
|
67
|
+
name: event.args.name,
|
|
68
|
+
symbol: event.args.symbol,
|
|
69
|
+
});
|
|
70
|
+
}),
|
|
71
|
+
});
|
|
72
|
+
class UnableParseGatedErc20DeployEvent extends HttpError {
|
|
73
|
+
constructor() {
|
|
74
|
+
super(500, {
|
|
75
|
+
message: `Can't parse TokenProxyConfigured event. Make sure you're passing a transaction generated by the Gated ERC20 factory \`deployAndInitializeProxy\` action`,
|
|
76
|
+
name: "UnableParseGatedErc20DeployEvent",
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const DeployErc20GatedSimpleToken: import("../../../common/controller.js").IController<import("hono/hono-base").HonoBase<import("../../../common/context.js").AppContext, {
|
|
2
|
+
"/": {
|
|
3
|
+
$get: {
|
|
4
|
+
input: {};
|
|
5
|
+
output: {
|
|
6
|
+
bytecode: `0x${string}`;
|
|
7
|
+
abi: any[];
|
|
8
|
+
args?: any[] | undefined;
|
|
9
|
+
};
|
|
10
|
+
outputFormat: "json";
|
|
11
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
}, "/", "/">>;
|
|
15
|
+
//# sourceMappingURL=deploy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../../../src/issuance/erc20/gatedSimple/deploy.ts"],"names":[],"mappings":"AAuBA,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;aAQtC,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { describeRoute } from "hono-openapi";
|
|
2
|
+
import { resolver } from "hono-openapi";
|
|
3
|
+
import { erc20GatedAbi, erc20GatedBytecode } from "@evergonlabs/tmi-protocol-contracts/erc20Gated";
|
|
4
|
+
import { createController } from "../../../common/controller.js";
|
|
5
|
+
import { DeployTransactionSchema } from "../../../common/index.js";
|
|
6
|
+
const deployGatedSimpleRoute = describeRoute({
|
|
7
|
+
summary: "Get Gated ERC20",
|
|
8
|
+
description: "Returns transaction data for deploying a gated ERC20. This is an audited contract.",
|
|
9
|
+
tags: ["Issuance"],
|
|
10
|
+
responses: {
|
|
11
|
+
200: {
|
|
12
|
+
description: "Returns transaction data for deploying a gated ERC20",
|
|
13
|
+
content: {
|
|
14
|
+
"application/json": {
|
|
15
|
+
schema: resolver(DeployTransactionSchema),
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
export const DeployErc20GatedSimpleToken = createController({
|
|
22
|
+
build: (factory) => factory.createApp().get("/", deployGatedSimpleRoute, async (c) => {
|
|
23
|
+
return c.json({
|
|
24
|
+
bytecode: erc20GatedBytecode,
|
|
25
|
+
abi: erc20GatedAbi,
|
|
26
|
+
});
|
|
27
|
+
}),
|
|
28
|
+
});
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const Erc20InitDataResponse: z.ZodObject<{
|
|
3
|
+
data: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
4
|
+
}, z.core.$strip>;
|
|
5
|
+
export declare const Erc20InitDataParams: z.ZodObject<{
|
|
6
|
+
tokenName: z.ZodString;
|
|
7
|
+
tokenSymbol: z.ZodString;
|
|
8
|
+
cap: z.ZodPipe<z.core.$ZodBranded<z.ZodString, "Int256", "out">, z.ZodTransform<bigint, string & z.core.$brand<"Int256">>>;
|
|
9
|
+
defaultAdmin: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
10
|
+
minter: z.ZodPipe<z.ZodString & z.ZodType<`0x${string}`, string, z.core.$ZodTypeInternals<`0x${string}`, string>>, z.ZodTransform<`0x${string}`, `0x${string}`>>;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export declare const GetErc20InitData: import("../../../common/controller.js").IController<import("hono/hono-base").HonoBase<import("../../../common/context.js").AppContext, {
|
|
13
|
+
"/": {
|
|
14
|
+
$post: {
|
|
15
|
+
input: {
|
|
16
|
+
json: {
|
|
17
|
+
tokenName: string;
|
|
18
|
+
tokenSymbol: string;
|
|
19
|
+
cap: string;
|
|
20
|
+
defaultAdmin: string;
|
|
21
|
+
minter: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
output: {
|
|
25
|
+
data: `0x${string}`;
|
|
26
|
+
};
|
|
27
|
+
outputFormat: "json";
|
|
28
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
}, "/", "/">>;
|
|
32
|
+
//# sourceMappingURL=getInitData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getInitData.d.ts","sourceRoot":"","sources":["../../../../src/issuance/erc20/gatedSimple/getInitData.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,eAAO,MAAM,qBAAqB;;iBAIC,CAAC;AAEpC,eAAO,MAAM,mBAAmB;;;;;;iBAQC,CAAC;AAkBlC,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;aAc3B,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { describeRoute } from "hono-openapi";
|
|
2
|
+
import { resolver, validator } from "hono-openapi";
|
|
3
|
+
import { encodeFunctionData } from "viem";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import { erc20GatedAbi } from "@evergonlabs/tmi-protocol-contracts/erc20Gated";
|
|
6
|
+
import { createController } from "../../../common/controller.js";
|
|
7
|
+
import { AddressSchema, HexStringSchema } from "../../../common/index.js";
|
|
8
|
+
import { Int256BigInt } from "../../../common/int256.js";
|
|
9
|
+
import { DEFAULT_COMPILOT_SIGNER } from "../../../common/models/compilot.js";
|
|
10
|
+
export const Erc20InitDataResponse = z
|
|
11
|
+
.object({
|
|
12
|
+
data: HexStringSchema.openapi("Init function call data in hex format"),
|
|
13
|
+
})
|
|
14
|
+
.openapi("Erc20InitDataResponse");
|
|
15
|
+
export const Erc20InitDataParams = z
|
|
16
|
+
.object({
|
|
17
|
+
tokenName: z.string().nonempty(),
|
|
18
|
+
tokenSymbol: z.string().nonempty(),
|
|
19
|
+
cap: Int256BigInt().openapi("Max. token supply"),
|
|
20
|
+
defaultAdmin: AddressSchema,
|
|
21
|
+
minter: AddressSchema,
|
|
22
|
+
})
|
|
23
|
+
.openapi("ERC20InitDataParams");
|
|
24
|
+
const getErc20InitDataRoute = describeRoute({
|
|
25
|
+
summary: "Get ERC20 Init Data",
|
|
26
|
+
description: `Returns init function call data in hex format. This is useful for using as initData in TransparentUpgradeableProxy`,
|
|
27
|
+
tags: ["Issuance"],
|
|
28
|
+
responses: {
|
|
29
|
+
200: {
|
|
30
|
+
description: "Init function call data in hex format",
|
|
31
|
+
content: {
|
|
32
|
+
"application/json": {
|
|
33
|
+
schema: resolver(Erc20InitDataResponse),
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
export const GetErc20InitData = createController({
|
|
40
|
+
build: (factory) => factory.createApp().post("/", getErc20InitDataRoute, validator("json", Erc20InitDataParams), async (c) => {
|
|
41
|
+
const data = c.req.valid("json");
|
|
42
|
+
const initData = encodeFunctionData({
|
|
43
|
+
abi: erc20GatedAbi,
|
|
44
|
+
functionName: "init",
|
|
45
|
+
args: [data.tokenName, data.tokenSymbol, data.cap, data.defaultAdmin, data.minter, DEFAULT_COMPILOT_SIGNER],
|
|
46
|
+
});
|
|
47
|
+
return c.json({
|
|
48
|
+
data: initData,
|
|
49
|
+
});
|
|
50
|
+
}),
|
|
51
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export declare const ParseGatedSimpleErc20DeployEvent: import("../../../common/controller.js").IController<import("hono/hono-base").HonoBase<import("../../../common/context.js").AppContext, {
|
|
2
|
+
"/": {
|
|
3
|
+
$get: {
|
|
4
|
+
input: {
|
|
5
|
+
query: {
|
|
6
|
+
chainId: string | string[];
|
|
7
|
+
hash: string | string[];
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
output: {
|
|
11
|
+
contractAddress: `0x${string}`;
|
|
12
|
+
};
|
|
13
|
+
outputFormat: "json";
|
|
14
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
}, "/", "/">>;
|
|
18
|
+
//# sourceMappingURL=parseDeployEvent.d.ts.map
|