@towns-labs/web3 3.2.0 → 3.3.1
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/cache/KVCacheStorage.d.ts +3 -3
- package/dist/cache/KVCacheStorage.d.ts.map +1 -1
- package/dist/cache/KVCacheStorage.js +10 -103
- package/dist/cache/KVCacheStorage.js.map +1 -1
- package/dist/cache/Keyable.d.ts +2 -3
- package/dist/cache/Keyable.d.ts.map +1 -1
- package/dist/cache/Keyable.js +1 -2
- package/dist/cache/Keyable.js.map +1 -1
- package/dist/eip-712/EIP-712.d.ts +16 -6
- package/dist/eip-712/EIP-712.d.ts.map +1 -1
- package/dist/eip-712/EIP-712.js +20 -8
- package/dist/eip-712/EIP-712.js.map +1 -1
- package/dist/index.d.ts +2 -77
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -77
- package/dist/index.js.map +1 -1
- package/dist/test-helpers/MockERC1155.d.ts +1 -1
- package/dist/test-helpers/MockERC1155.d.ts.map +1 -1
- package/dist/test-helpers/MockERC20.d.ts +1 -1
- package/dist/test-helpers/MockERC20.d.ts.map +1 -1
- package/dist/types/ContractTypes.d.ts +0 -170
- package/dist/types/ContractTypes.d.ts.map +1 -1
- package/dist/types/ContractTypes.js +0 -32
- package/dist/types/ContractTypes.js.map +1 -1
- package/dist/utils/ut.d.ts +1 -4
- package/dist/utils/ut.d.ts.map +1 -1
- package/dist/utils/ut.js +2 -14
- package/dist/utils/ut.js.map +1 -1
- package/dist/utils/web3Env.js +1 -1
- package/dist/utils/web3Env.js.map +1 -1
- package/dist/utils/xchain.d.ts +21 -0
- package/dist/utils/xchain.d.ts.map +1 -0
- package/dist/{space/entitlements/XChainConfig.js → utils/xchain.js} +45 -29
- package/dist/utils/xchain.js.map +1 -0
- package/dist/web3Types.d.ts +33 -0
- package/dist/web3Types.d.ts.map +1 -0
- package/dist/web3Types.js +89 -0
- package/dist/web3Types.js.map +1 -0
- package/package.json +3 -5
- package/dist/BaseContractShim.d.ts +0 -57
- package/dist/BaseContractShim.d.ts.map +0 -1
- package/dist/BaseContractShim.js +0 -224
- package/dist/BaseContractShim.js.map +0 -1
- package/dist/airdrop/IDropFacetShim.d.ts +0 -9
- package/dist/airdrop/IDropFacetShim.d.ts.map +0 -1
- package/dist/airdrop/IDropFacetShim.js +0 -9
- package/dist/airdrop/IDropFacetShim.js.map +0 -1
- package/dist/airdrop/IRiverPointsShim.d.ts +0 -9
- package/dist/airdrop/IRiverPointsShim.d.ts.map +0 -1
- package/dist/airdrop/IRiverPointsShim.js +0 -9
- package/dist/airdrop/IRiverPointsShim.js.map +0 -1
- package/dist/airdrop/RiverAirdropDapp.d.ts +0 -16
- package/dist/airdrop/RiverAirdropDapp.d.ts.map +0 -1
- package/dist/airdrop/RiverAirdropDapp.js +0 -30
- package/dist/airdrop/RiverAirdropDapp.js.map +0 -1
- package/dist/app-registry/AppRegistryDapp.d.ts +0 -68
- package/dist/app-registry/AppRegistryDapp.d.ts.map +0 -1
- package/dist/app-registry/AppRegistryDapp.js +0 -182
- package/dist/app-registry/AppRegistryDapp.js.map +0 -1
- package/dist/app-registry/IAppFactoryShim.d.ts +0 -9
- package/dist/app-registry/IAppFactoryShim.d.ts.map +0 -1
- package/dist/app-registry/IAppFactoryShim.js +0 -9
- package/dist/app-registry/IAppFactoryShim.js.map +0 -1
- package/dist/app-registry/IAppInstallerShim.d.ts +0 -9
- package/dist/app-registry/IAppInstallerShim.d.ts.map +0 -1
- package/dist/app-registry/IAppInstallerShim.js +0 -9
- package/dist/app-registry/IAppInstallerShim.js.map +0 -1
- package/dist/app-registry/IAppRegistryShim.d.ts +0 -9
- package/dist/app-registry/IAppRegistryShim.d.ts.map +0 -1
- package/dist/app-registry/IAppRegistryShim.js +0 -9
- package/dist/app-registry/IAppRegistryShim.js.map +0 -1
- package/dist/app-registry/IIdentityRegistryShim.d.ts +0 -9
- package/dist/app-registry/IIdentityRegistryShim.d.ts.map +0 -1
- package/dist/app-registry/IIdentityRegistryShim.js +0 -9
- package/dist/app-registry/IIdentityRegistryShim.js.map +0 -1
- package/dist/app-registry/IReputationRegistryShim.d.ts +0 -9
- package/dist/app-registry/IReputationRegistryShim.d.ts.map +0 -1
- package/dist/app-registry/IReputationRegistryShim.js +0 -9
- package/dist/app-registry/IReputationRegistryShim.js.map +0 -1
- package/dist/app-registry/SimpleAppShim.d.ts +0 -9
- package/dist/app-registry/SimpleAppShim.d.ts.map +0 -1
- package/dist/app-registry/SimpleAppShim.js +0 -9
- package/dist/app-registry/SimpleAppShim.js.map +0 -1
- package/dist/base-registry/BaseRegistry.d.ts +0 -32
- package/dist/base-registry/BaseRegistry.d.ts.map +0 -1
- package/dist/base-registry/BaseRegistry.js +0 -67
- package/dist/base-registry/BaseRegistry.js.map +0 -1
- package/dist/base-registry/IEntitlementCheckerShim.d.ts +0 -9
- package/dist/base-registry/IEntitlementCheckerShim.d.ts.map +0 -1
- package/dist/base-registry/IEntitlementCheckerShim.js +0 -9
- package/dist/base-registry/IEntitlementCheckerShim.js.map +0 -1
- package/dist/base-registry/INodeOperatorShim.d.ts +0 -9
- package/dist/base-registry/INodeOperatorShim.d.ts.map +0 -1
- package/dist/base-registry/INodeOperatorShim.js +0 -9
- package/dist/base-registry/INodeOperatorShim.js.map +0 -1
- package/dist/base-registry/ISpaceDelegationShim.d.ts +0 -9
- package/dist/base-registry/ISpaceDelegationShim.d.ts.map +0 -1
- package/dist/base-registry/ISpaceDelegationShim.js +0 -9
- package/dist/base-registry/ISpaceDelegationShim.js.map +0 -1
- package/dist/base-registry/RewardsDistributionShim.d.ts +0 -9
- package/dist/base-registry/RewardsDistributionShim.d.ts.map +0 -1
- package/dist/base-registry/RewardsDistributionShim.js +0 -9
- package/dist/base-registry/RewardsDistributionShim.js.map +0 -1
- package/dist/delegate-registry/DelegateRegistry.d.ts +0 -3
- package/dist/delegate-registry/DelegateRegistry.d.ts.map +0 -1
- package/dist/delegate-registry/DelegateRegistry.js +0 -72
- package/dist/delegate-registry/DelegateRegistry.js.map +0 -1
- package/dist/erc-721/IERC721AQueryableShim.d.ts +0 -9
- package/dist/erc-721/IERC721AQueryableShim.d.ts.map +0 -1
- package/dist/erc-721/IERC721AQueryableShim.js +0 -9
- package/dist/erc-721/IERC721AQueryableShim.js.map +0 -1
- package/dist/erc-721/IERC721AShim.d.ts +0 -9
- package/dist/erc-721/IERC721AShim.d.ts.map +0 -1
- package/dist/erc-721/IERC721AShim.js +0 -9
- package/dist/erc-721/IERC721AShim.js.map +0 -1
- package/dist/platform-requirements/PlatformRequirements.d.ts +0 -12
- package/dist/platform-requirements/PlatformRequirements.d.ts.map +0 -1
- package/dist/platform-requirements/PlatformRequirements.js +0 -18
- package/dist/platform-requirements/PlatformRequirements.js.map +0 -1
- package/dist/pricing-modules/IPricingShim.d.ts +0 -9
- package/dist/pricing-modules/IPricingShim.d.ts.map +0 -1
- package/dist/pricing-modules/IPricingShim.js +0 -9
- package/dist/pricing-modules/IPricingShim.js.map +0 -1
- package/dist/pricing-modules/PricingModules.d.ts +0 -13
- package/dist/pricing-modules/PricingModules.d.ts.map +0 -1
- package/dist/pricing-modules/PricingModules.js +0 -23
- package/dist/pricing-modules/PricingModules.js.map +0 -1
- package/dist/pricing-modules/helpers.d.ts +0 -16
- package/dist/pricing-modules/helpers.d.ts.map +0 -1
- package/dist/pricing-modules/helpers.js +0 -35
- package/dist/pricing-modules/helpers.js.map +0 -1
- package/dist/readContractRetryer.d.ts +0 -10
- package/dist/readContractRetryer.d.ts.map +0 -1
- package/dist/readContractRetryer.js +0 -68
- package/dist/readContractRetryer.js.map +0 -1
- package/dist/river-registry/IOperatorRegistryShim.d.ts +0 -9
- package/dist/river-registry/IOperatorRegistryShim.d.ts.map +0 -1
- package/dist/river-registry/IOperatorRegistryShim.js +0 -9
- package/dist/river-registry/IOperatorRegistryShim.js.map +0 -1
- package/dist/river-registry/IStreamRegistryShim.d.ts +0 -9
- package/dist/river-registry/IStreamRegistryShim.d.ts.map +0 -1
- package/dist/river-registry/IStreamRegistryShim.js +0 -9
- package/dist/river-registry/IStreamRegistryShim.js.map +0 -1
- package/dist/river-registry/RiverRegistry.d.ts +0 -18
- package/dist/river-registry/RiverRegistry.d.ts.map +0 -1
- package/dist/river-registry/RiverRegistry.js +0 -42
- package/dist/river-registry/RiverRegistry.js.map +0 -1
- package/dist/river-registry/RiverRegistryFactory.d.ts +0 -5
- package/dist/river-registry/RiverRegistryFactory.d.ts.map +0 -1
- package/dist/river-registry/RiverRegistryFactory.js +0 -5
- package/dist/river-registry/RiverRegistryFactory.js.map +0 -1
- package/dist/space/IAppAccountShim.d.ts +0 -9
- package/dist/space/IAppAccountShim.d.ts.map +0 -1
- package/dist/space/IAppAccountShim.js +0 -9
- package/dist/space/IAppAccountShim.js.map +0 -1
- package/dist/space/IBanningShim.d.ts +0 -9
- package/dist/space/IBanningShim.d.ts.map +0 -1
- package/dist/space/IBanningShim.js +0 -9
- package/dist/space/IBanningShim.js.map +0 -1
- package/dist/space/IChannelShim.d.ts +0 -9
- package/dist/space/IChannelShim.d.ts.map +0 -1
- package/dist/space/IChannelShim.js +0 -9
- package/dist/space/IChannelShim.js.map +0 -1
- package/dist/space/IEntitlementDataQueryableShim.d.ts +0 -11
- package/dist/space/IEntitlementDataQueryableShim.d.ts.map +0 -1
- package/dist/space/IEntitlementDataQueryableShim.js +0 -9
- package/dist/space/IEntitlementDataQueryableShim.js.map +0 -1
- package/dist/space/IEntitlementsShim.d.ts +0 -13
- package/dist/space/IEntitlementsShim.d.ts.map +0 -1
- package/dist/space/IEntitlementsShim.js +0 -19
- package/dist/space/IEntitlementsShim.js.map +0 -1
- package/dist/space/IMembershipMetadataShim.d.ts +0 -9
- package/dist/space/IMembershipMetadataShim.d.ts.map +0 -1
- package/dist/space/IMembershipMetadataShim.js +0 -9
- package/dist/space/IMembershipMetadataShim.js.map +0 -1
- package/dist/space/IMembershipShim.d.ts +0 -33
- package/dist/space/IMembershipShim.d.ts.map +0 -1
- package/dist/space/IMembershipShim.js +0 -139
- package/dist/space/IMembershipShim.js.map +0 -1
- package/dist/space/IMulticallShim.d.ts +0 -13
- package/dist/space/IMulticallShim.d.ts.map +0 -1
- package/dist/space/IMulticallShim.js +0 -15
- package/dist/space/IMulticallShim.js.map +0 -1
- package/dist/space/IReviewShim.d.ts +0 -64
- package/dist/space/IReviewShim.d.ts.map +0 -1
- package/dist/space/IReviewShim.js +0 -102
- package/dist/space/IReviewShim.js.map +0 -1
- package/dist/space/IRolesShim.d.ts +0 -10
- package/dist/space/IRolesShim.d.ts.map +0 -1
- package/dist/space/IRolesShim.js +0 -9
- package/dist/space/IRolesShim.js.map +0 -1
- package/dist/space/ITippingShim.d.ts +0 -39
- package/dist/space/ITippingShim.d.ts.map +0 -1
- package/dist/space/ITippingShim.js +0 -76
- package/dist/space/ITippingShim.js.map +0 -1
- package/dist/space/ITreasuryShim.d.ts +0 -9
- package/dist/space/ITreasuryShim.d.ts.map +0 -1
- package/dist/space/ITreasuryShim.js +0 -9
- package/dist/space/ITreasuryShim.js.map +0 -1
- package/dist/space/OwnableFacetShim.d.ts +0 -12
- package/dist/space/OwnableFacetShim.d.ts.map +0 -1
- package/dist/space/OwnableFacetShim.js +0 -19
- package/dist/space/OwnableFacetShim.js.map +0 -1
- package/dist/space/Space.d.ts +0 -107
- package/dist/space/Space.d.ts.map +0 -1
- package/dist/space/Space.js +0 -511
- package/dist/space/Space.js.map +0 -1
- package/dist/space/TokenPausableFacetShim.d.ts +0 -9
- package/dist/space/TokenPausableFacetShim.d.ts.map +0 -1
- package/dist/space/TokenPausableFacetShim.js +0 -9
- package/dist/space/TokenPausableFacetShim.js.map +0 -1
- package/dist/space/entitlements/ConvertersEntitlements.d.ts +0 -14
- package/dist/space/entitlements/ConvertersEntitlements.d.ts.map +0 -1
- package/dist/space/entitlements/ConvertersEntitlements.js +0 -193
- package/dist/space/entitlements/ConvertersEntitlements.js.map +0 -1
- package/dist/space/entitlements/RuleBuilder.d.ts +0 -83
- package/dist/space/entitlements/RuleBuilder.d.ts.map +0 -1
- package/dist/space/entitlements/RuleBuilder.js +0 -86
- package/dist/space/entitlements/RuleBuilder.js.map +0 -1
- package/dist/space/entitlements/RuleEntitlementShim.d.ts +0 -353
- package/dist/space/entitlements/RuleEntitlementShim.d.ts.map +0 -1
- package/dist/space/entitlements/RuleEntitlementShim.js +0 -40
- package/dist/space/entitlements/RuleEntitlementShim.js.map +0 -1
- package/dist/space/entitlements/RuleEntitlementV2Shim.d.ts +0 -353
- package/dist/space/entitlements/RuleEntitlementV2Shim.d.ts.map +0 -1
- package/dist/space/entitlements/RuleEntitlementV2Shim.js +0 -40
- package/dist/space/entitlements/RuleEntitlementV2Shim.js.map +0 -1
- package/dist/space/entitlements/UserEntitlementShim.d.ts +0 -13
- package/dist/space/entitlements/UserEntitlementShim.d.ts.map +0 -1
- package/dist/space/entitlements/UserEntitlementShim.js +0 -45
- package/dist/space/entitlements/UserEntitlementShim.js.map +0 -1
- package/dist/space/entitlements/XChainConfig.d.ts +0 -14
- package/dist/space/entitlements/XChainConfig.d.ts.map +0 -1
- package/dist/space/entitlements/XChainConfig.js.map +0 -1
- package/dist/space/entitlements/entitlement.d.ts +0 -147
- package/dist/space/entitlements/entitlement.d.ts.map +0 -1
- package/dist/space/entitlements/entitlement.js +0 -940
- package/dist/space/entitlements/entitlement.js.map +0 -1
- package/dist/space/entitlements/validateAndParseXChainConfig.d.ts +0 -6
- package/dist/space/entitlements/validateAndParseXChainConfig.d.ts.map +0 -1
- package/dist/space/entitlements/validateAndParseXChainConfig.js +0 -34
- package/dist/space/entitlements/validateAndParseXChainConfig.js.map +0 -1
- package/dist/space-dapp/SpaceDapp.d.ts +0 -223
- package/dist/space-dapp/SpaceDapp.d.ts.map +0 -1
- package/dist/space-dapp/SpaceDapp.js +0 -1260
- package/dist/space-dapp/SpaceDapp.js.map +0 -1
- package/dist/space-dapp/SpaceDappFactory.d.ts +0 -5
- package/dist/space-dapp/SpaceDappFactory.d.ts.map +0 -1
- package/dist/space-dapp/SpaceDappFactory.js +0 -8
- package/dist/space-dapp/SpaceDappFactory.js.map +0 -1
- package/dist/space-dapp/wrapTransaction.d.ts +0 -4
- package/dist/space-dapp/wrapTransaction.d.ts.map +0 -1
- package/dist/space-dapp/wrapTransaction.js +0 -99
- package/dist/space-dapp/wrapTransaction.js.map +0 -1
- package/dist/space-owner/GuardianFacetShim.d.ts +0 -9
- package/dist/space-owner/GuardianFacetShim.d.ts.map +0 -1
- package/dist/space-owner/GuardianFacetShim.js +0 -9
- package/dist/space-owner/GuardianFacetShim.js.map +0 -1
- package/dist/space-owner/SpaceOwner.d.ts +0 -48
- package/dist/space-owner/SpaceOwner.d.ts.map +0 -1
- package/dist/space-owner/SpaceOwner.js +0 -81
- package/dist/space-owner/SpaceOwner.js.map +0 -1
- package/dist/space-registrar/ICreateSpaceShim.d.ts +0 -11
- package/dist/space-registrar/ICreateSpaceShim.d.ts.map +0 -1
- package/dist/space-registrar/ICreateSpaceShim.js +0 -9
- package/dist/space-registrar/ICreateSpaceShim.js.map +0 -1
- package/dist/space-registrar/ILegacySpaceArchitectShim.d.ts +0 -10
- package/dist/space-registrar/ILegacySpaceArchitectShim.d.ts.map +0 -1
- package/dist/space-registrar/ILegacySpaceArchitectShim.js +0 -9
- package/dist/space-registrar/ILegacySpaceArchitectShim.js.map +0 -1
- package/dist/space-registrar/ISpaceArchitectShim.d.ts +0 -10
- package/dist/space-registrar/ISpaceArchitectShim.d.ts.map +0 -1
- package/dist/space-registrar/ISpaceArchitectShim.js +0 -39
- package/dist/space-registrar/ISpaceArchitectShim.js.map +0 -1
- package/dist/space-registrar/SpaceRegistrar.d.ts +0 -27
- package/dist/space-registrar/SpaceRegistrar.d.ts.map +0 -1
- package/dist/space-registrar/SpaceRegistrar.js +0 -58
- package/dist/space-registrar/SpaceRegistrar.js.map +0 -1
- package/dist/test-helpers/LocalhostWeb3Provider.d.ts +0 -19
- package/dist/test-helpers/LocalhostWeb3Provider.d.ts.map +0 -1
- package/dist/test-helpers/LocalhostWeb3Provider.js +0 -80
- package/dist/test-helpers/LocalhostWeb3Provider.js.map +0 -1
- package/dist/test-helpers/MockCrossChainEntitlement.d.ts +0 -6
- package/dist/test-helpers/MockCrossChainEntitlement.d.ts.map +0 -1
- package/dist/test-helpers/MockCrossChainEntitlement.js +0 -104
- package/dist/test-helpers/MockCrossChainEntitlement.js.map +0 -1
- package/dist/test-helpers/MockERC721AShim.d.ts +0 -9
- package/dist/test-helpers/MockERC721AShim.d.ts.map +0 -1
- package/dist/test-helpers/MockERC721AShim.js +0 -9
- package/dist/test-helpers/MockERC721AShim.js.map +0 -1
- package/dist/test-helpers/TestCrossChainEntitlement.d.ts +0 -14
- package/dist/test-helpers/TestCrossChainEntitlement.d.ts.map +0 -1
- package/dist/test-helpers/TestCrossChainEntitlement.js +0 -99
- package/dist/test-helpers/TestCrossChainEntitlement.js.map +0 -1
- package/dist/test-helpers/TestGatingERC1155.d.ts +0 -17
- package/dist/test-helpers/TestGatingERC1155.d.ts.map +0 -1
- package/dist/test-helpers/TestGatingERC1155.js +0 -100
- package/dist/test-helpers/TestGatingERC1155.js.map +0 -1
- package/dist/test-helpers/TestGatingERC20.d.ts +0 -17
- package/dist/test-helpers/TestGatingERC20.d.ts.map +0 -1
- package/dist/test-helpers/TestGatingERC20.js +0 -149
- package/dist/test-helpers/TestGatingERC20.js.map +0 -1
- package/dist/test-helpers/TestGatingNFT.d.ts +0 -17
- package/dist/test-helpers/TestGatingNFT.d.ts.map +0 -1
- package/dist/test-helpers/TestGatingNFT.js +0 -137
- package/dist/test-helpers/TestGatingNFT.js.map +0 -1
- package/dist/test-helpers/TestGatingUtils.d.ts +0 -15
- package/dist/test-helpers/TestGatingUtils.d.ts.map +0 -1
- package/dist/test-helpers/TestGatingUtils.js +0 -112
- package/dist/test-helpers/TestGatingUtils.js.map +0 -1
- package/dist/test-helpers/utils.d.ts +0 -22
- package/dist/test-helpers/utils.d.ts.map +0 -1
- package/dist/test-helpers/utils.js +0 -30
- package/dist/test-helpers/utils.js.map +0 -1
- package/dist/towns-token/TownsToken.d.ts +0 -17
- package/dist/towns-token/TownsToken.d.ts.map +0 -1
- package/dist/towns-token/TownsToken.js +0 -33
- package/dist/towns-token/TownsToken.js.map +0 -1
- package/dist/types/typechain.d.ts +0 -4
- package/dist/types/typechain.d.ts.map +0 -1
- package/dist/types/typechain.js +0 -2
- package/dist/types/typechain.js.map +0 -1
- package/dist/utils/ContractHelpers.d.ts +0 -14
- package/dist/utils/ContractHelpers.d.ts.map +0 -1
- package/dist/utils/ContractHelpers.js +0 -54
- package/dist/utils/ContractHelpers.js.map +0 -1
- package/dist/wallet-link/WalletLink.d.ts +0 -58
- package/dist/wallet-link/WalletLink.d.ts.map +0 -1
- package/dist/wallet-link/WalletLink.js +0 -226
- package/dist/wallet-link/WalletLink.js.map +0 -1
- package/dist/wallet-link/WalletLinkShim.d.ts +0 -9
- package/dist/wallet-link/WalletLinkShim.d.ts.map +0 -1
- package/dist/wallet-link/WalletLinkShim.js +0 -9
- package/dist/wallet-link/WalletLinkShim.js.map +0 -1
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { ethers, utils } from 'ethers';
|
|
2
|
-
const v1RegistryContractAddress = '0x00000000000076a84fef008cdabe6409d2fe638b';
|
|
3
|
-
const delegationTypeAll = 1;
|
|
4
|
-
const delegateRegistryJsonAbi = `
|
|
5
|
-
[
|
|
6
|
-
{
|
|
7
|
-
"type": "function",
|
|
8
|
-
"name": "getDelegationsByDelegate",
|
|
9
|
-
"inputs": [
|
|
10
|
-
{
|
|
11
|
-
"name": "delegate",
|
|
12
|
-
"type": "address",
|
|
13
|
-
"internalType": "address"
|
|
14
|
-
}
|
|
15
|
-
],
|
|
16
|
-
"outputs": [
|
|
17
|
-
{
|
|
18
|
-
"name": "",
|
|
19
|
-
"type": "tuple[]",
|
|
20
|
-
"internalType": "struct IDelegateRegistryV1.DelegationInfo[]",
|
|
21
|
-
"components": [
|
|
22
|
-
{
|
|
23
|
-
"name": "type_",
|
|
24
|
-
"type": "uint8",
|
|
25
|
-
"internalType": "enum IDelegateRegistryV1.DelegationType"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"name": "vault",
|
|
29
|
-
"type": "address",
|
|
30
|
-
"internalType": "address"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"name": "delegate",
|
|
34
|
-
"type": "address",
|
|
35
|
-
"internalType": "address"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"name": "contract_",
|
|
39
|
-
"type": "address",
|
|
40
|
-
"internalType": "address"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"name": "tokenId",
|
|
44
|
-
"type": "uint256",
|
|
45
|
-
"internalType": "uint256"
|
|
46
|
-
}
|
|
47
|
-
]
|
|
48
|
-
}
|
|
49
|
-
],
|
|
50
|
-
"stateMutability": "view"
|
|
51
|
-
}
|
|
52
|
-
]`;
|
|
53
|
-
function newDelegateContract(provider) {
|
|
54
|
-
const iface = new utils.Interface(delegateRegistryJsonAbi);
|
|
55
|
-
const humanReadableAbi = iface.format(utils.FormatTypes.full);
|
|
56
|
-
return new ethers.Contract(v1RegistryContractAddress, humanReadableAbi, provider);
|
|
57
|
-
}
|
|
58
|
-
export async function computeDelegatorsForProvider(provider, wallets) {
|
|
59
|
-
const contract = newDelegateContract(provider);
|
|
60
|
-
const delegatorWallets = (await Promise.all(wallets.map(async (wallet) => {
|
|
61
|
-
return ((await contract.callStatic.getDelegationsByDelegate(wallet))
|
|
62
|
-
// Keep only delegations that cede the entire wallet
|
|
63
|
-
.filter((info) => info.type_ == delegationTypeAll)
|
|
64
|
-
// The 'vault' is the delegator wallet that cedes to one of wallets
|
|
65
|
-
// passed in via the parameters
|
|
66
|
-
.map((info) => info.vault));
|
|
67
|
-
}))).reduce((left, right) => [...left, ...right]);
|
|
68
|
-
// Return de-duped list of wallets, in case delegate wallets occur >1x across
|
|
69
|
-
// ethereum mainnet and testnets.
|
|
70
|
-
return [...new Set(delegatorWallets)];
|
|
71
|
-
}
|
|
72
|
-
//# sourceMappingURL=DelegateRegistry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DelegateRegistry.js","sourceRoot":"","sources":["../../src/delegate-registry/DelegateRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAA;AAEtC,MAAM,yBAAyB,GAAG,4CAA4C,CAAA;AAC9E,MAAM,iBAAiB,GAAG,CAAC,CAAA;AAE3B,MAAM,uBAAuB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgD9B,CAAA;AAEF,SAAS,mBAAmB,CAAC,QAAuC;IAChE,MAAM,KAAK,GAAG,IAAI,KAAK,CAAC,SAAS,CAAC,uBAAuB,CAAC,CAAA;IAC1D,MAAM,gBAAgB,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,CAAC,CAAA;IAC7D,OAAO,IAAI,MAAM,CAAC,QAAQ,CAAC,yBAAyB,EAAE,gBAAgB,EAAE,QAAQ,CAAC,CAAA;AACrF,CAAC;AAUD,MAAM,CAAC,KAAK,UAAU,4BAA4B,CAC9C,QAAuC,EACvC,OAAiB;IAEjB,MAAM,QAAQ,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAAA;IAC9C,MAAM,gBAAgB,GAAG,CACrB,MAAM,OAAO,CAAC,GAAG,CACb,OAAO,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE;QACzB,OAAO,CAEC,CAAC,MAAM,QAAQ,CAAC,UAAU,CAAC,wBAAwB,CAC/C,MAAM,CACT,CACJ;YACG,oDAAoD;aACnD,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,IAAI,iBAAiB,CAAC;YAClD,mEAAmE;YACnE,+BAA+B;aAC9B,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,CACjC,CAAA;IACL,CAAC,CAAC,CACL,CACJ,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC,CAAC,CAAA;IAE9C,6EAA6E;IAC7E,iCAAiC;IACjC,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAA;AACzC,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ethers } from 'ethers';
|
|
2
|
-
import { BaseContractShim } from '../BaseContractShim';
|
|
3
|
-
import { IERC721AQueryable__factory } from '@towns-labs/generated/dev/typings/factories/IERC721AQueryable__factory';
|
|
4
|
-
declare const connect: typeof IERC721AQueryable__factory.connect;
|
|
5
|
-
export declare class IERC721AQueryableShim extends BaseContractShim<typeof connect> {
|
|
6
|
-
constructor(address: string, provider: ethers.providers.Provider);
|
|
7
|
-
}
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=IERC721AQueryableShim.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IERC721AQueryableShim.d.ts","sourceRoot":"","sources":["../../src/erc-721/IERC721AQueryableShim.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,wEAAwE,CAAA;AAEnH,QAAA,MAAa,OAAO,2CAA+B,CAAA;AAEnD,qBAAa,qBAAsB,SAAQ,gBAAgB,CAAC,OAAO,OAAO,CAAC;gBAC3D,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,SAAS,CAAC,QAAQ;CAGnE"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { BaseContractShim } from '../BaseContractShim';
|
|
2
|
-
import { IERC721AQueryable__factory } from '@towns-labs/generated/dev/typings/factories/IERC721AQueryable__factory';
|
|
3
|
-
const { abi, connect } = IERC721AQueryable__factory;
|
|
4
|
-
export class IERC721AQueryableShim extends BaseContractShim {
|
|
5
|
-
constructor(address, provider) {
|
|
6
|
-
super(address, provider, connect, abi);
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=IERC721AQueryableShim.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IERC721AQueryableShim.js","sourceRoot":"","sources":["../../src/erc-721/IERC721AQueryableShim.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,0BAA0B,EAAE,MAAM,wEAAwE,CAAA;AAEnH,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,0BAA0B,CAAA;AAEnD,MAAM,OAAO,qBAAsB,SAAQ,gBAAgC;IACvE,YAAY,OAAe,EAAE,QAAmC;QAC5D,KAAK,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,CAAC,CAAA;IAC1C,CAAC;CACJ"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ethers } from 'ethers';
|
|
2
|
-
import { IERC721A__factory } from '@towns-labs/generated/dev/typings/factories/IERC721A__factory';
|
|
3
|
-
import { BaseContractShim } from '../BaseContractShim';
|
|
4
|
-
declare const connect: typeof IERC721A__factory.connect;
|
|
5
|
-
export declare class IERC721AShim extends BaseContractShim<typeof connect> {
|
|
6
|
-
constructor(address: string, provider: ethers.providers.Provider);
|
|
7
|
-
}
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=IERC721AShim.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IERC721AShim.d.ts","sourceRoot":"","sources":["../../src/erc-721/IERC721AShim.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,+DAA+D,CAAA;AACjG,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAEtD,QAAA,MAAa,OAAO,kCAAsB,CAAA;AAE1C,qBAAa,YAAa,SAAQ,gBAAgB,CAAC,OAAO,OAAO,CAAC;gBAClD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,SAAS,CAAC,QAAQ;CAGnE"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { IERC721A__factory } from '@towns-labs/generated/dev/typings/factories/IERC721A__factory';
|
|
2
|
-
import { BaseContractShim } from '../BaseContractShim';
|
|
3
|
-
const { abi, connect } = IERC721A__factory;
|
|
4
|
-
export class IERC721AShim extends BaseContractShim {
|
|
5
|
-
constructor(address, provider) {
|
|
6
|
-
super(address, provider, connect, abi);
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=IERC721AShim.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IERC721AShim.js","sourceRoot":"","sources":["../../src/erc-721/IERC721AShim.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,+DAA+D,CAAA;AACjG,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAEtD,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,iBAAiB,CAAA;AAE1C,MAAM,OAAO,YAAa,SAAQ,gBAAgC;IAC9D,YAAY,OAAe,EAAE,QAAmC;QAC5D,KAAK,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,CAAC,CAAA;IAC1C,CAAC;CACJ"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ethers } from 'ethers';
|
|
2
|
-
import { BaseContractShim } from '../BaseContractShim';
|
|
3
|
-
import { PlatformRequirementsFacet__factory } from '@towns-labs/generated/dev/typings/factories/PlatformRequirementsFacet__factory';
|
|
4
|
-
declare const connect: typeof PlatformRequirementsFacet__factory.connect;
|
|
5
|
-
export declare class PlatformRequirements extends BaseContractShim<typeof connect> {
|
|
6
|
-
constructor(address: string, provider: ethers.providers.Provider);
|
|
7
|
-
getMembershipMintLimit(): Promise<ethers.BigNumber>;
|
|
8
|
-
getMembershipFee(): Promise<ethers.BigNumber>;
|
|
9
|
-
getMembershipMinPrice(): Promise<ethers.BigNumber>;
|
|
10
|
-
}
|
|
11
|
-
export {};
|
|
12
|
-
//# sourceMappingURL=PlatformRequirements.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PlatformRequirements.d.ts","sourceRoot":"","sources":["../../src/platform-requirements/PlatformRequirements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,kCAAkC,EAAE,MAAM,gFAAgF,CAAA;AAEnI,QAAA,MAAa,OAAO,mDAAuC,CAAA;AAE3D,qBAAa,oBAAqB,SAAQ,gBAAgB,CAAC,OAAO,OAAO,CAAC;gBAC1D,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,SAAS,CAAC,QAAQ;IAIzD,sBAAsB;IAItB,gBAAgB;IAIhB,qBAAqB;CAG/B"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { BaseContractShim } from '../BaseContractShim';
|
|
2
|
-
import { PlatformRequirementsFacet__factory } from '@towns-labs/generated/dev/typings/factories/PlatformRequirementsFacet__factory';
|
|
3
|
-
const { abi, connect } = PlatformRequirementsFacet__factory;
|
|
4
|
-
export class PlatformRequirements extends BaseContractShim {
|
|
5
|
-
constructor(address, provider) {
|
|
6
|
-
super(address, provider, connect, abi);
|
|
7
|
-
}
|
|
8
|
-
getMembershipMintLimit() {
|
|
9
|
-
return this.read.getMembershipMintLimit();
|
|
10
|
-
}
|
|
11
|
-
getMembershipFee() {
|
|
12
|
-
return this.read.getMembershipFee();
|
|
13
|
-
}
|
|
14
|
-
getMembershipMinPrice() {
|
|
15
|
-
return this.read.getMembershipMinPrice();
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=PlatformRequirements.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PlatformRequirements.js","sourceRoot":"","sources":["../../src/platform-requirements/PlatformRequirements.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,kCAAkC,EAAE,MAAM,gFAAgF,CAAA;AAEnI,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,kCAAkC,CAAA;AAE3D,MAAM,OAAO,oBAAqB,SAAQ,gBAAgC;IACtE,YAAY,OAAe,EAAE,QAAmC;QAC5D,KAAK,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,CAAC,CAAA;IAC1C,CAAC;IAEM,sBAAsB;QACzB,OAAO,IAAI,CAAC,IAAI,CAAC,sBAAsB,EAAE,CAAA;IAC7C,CAAC;IAEM,gBAAgB;QACnB,OAAO,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,CAAA;IACvC,CAAC;IAEM,qBAAqB;QACxB,OAAO,IAAI,CAAC,IAAI,CAAC,qBAAqB,EAAE,CAAA;IAC5C,CAAC;CACJ"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ethers } from 'ethers';
|
|
2
|
-
import { BaseContractShim } from '../BaseContractShim';
|
|
3
|
-
import { IPricingModules__factory } from '@towns-labs/generated/dev/typings/factories/IPricingModules__factory';
|
|
4
|
-
declare const connect: typeof IPricingModules__factory.connect;
|
|
5
|
-
export type { IPricingModulesBase } from '@towns-labs/generated/dev/typings/IPricingModules';
|
|
6
|
-
export declare class IPricingShim extends BaseContractShim<typeof connect> {
|
|
7
|
-
constructor(address: string, provider: ethers.providers.Provider);
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=IPricingShim.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IPricingShim.d.ts","sourceRoot":"","sources":["../../src/pricing-modules/IPricingShim.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sEAAsE,CAAA;AAE/G,QAAA,MAAa,OAAO,yCAA6B,CAAA;AAEjD,YAAY,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAA;AAE5F,qBAAa,YAAa,SAAQ,gBAAgB,CAAC,OAAO,OAAO,CAAC;gBAClD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,SAAS,CAAC,QAAQ;CAGnE"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { BaseContractShim } from '../BaseContractShim';
|
|
2
|
-
import { IPricingModules__factory } from '@towns-labs/generated/dev/typings/factories/IPricingModules__factory';
|
|
3
|
-
const { abi, connect } = IPricingModules__factory;
|
|
4
|
-
export class IPricingShim extends BaseContractShim {
|
|
5
|
-
constructor(address, provider) {
|
|
6
|
-
super(address, provider, connect, abi);
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=IPricingShim.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IPricingShim.js","sourceRoot":"","sources":["../../src/pricing-modules/IPricingShim.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,sEAAsE,CAAA;AAE/G,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,wBAAwB,CAAA;AAIjD,MAAM,OAAO,YAAa,SAAQ,gBAAgC;IAC9D,YAAY,OAAe,EAAE,QAAmC;QAC5D,KAAK,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,CAAC,CAAA;IAC1C,CAAC;CACJ"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ethers } from 'ethers';
|
|
2
|
-
import { BaseChainConfig } from '../utils/web3Env';
|
|
3
|
-
import { PricingModuleStruct } from '../types/ContractTypes';
|
|
4
|
-
export declare class PricingModules {
|
|
5
|
-
private readonly pricingShim;
|
|
6
|
-
constructor(config: BaseChainConfig, provider: ethers.providers.Provider);
|
|
7
|
-
parseError(error: unknown): Error;
|
|
8
|
-
listPricingModules(): Promise<PricingModuleStruct[]>;
|
|
9
|
-
addPricingModule(moduleAddress: string, signer: ethers.Signer): Promise<void>;
|
|
10
|
-
removePricingModule(moduleAddress: string, signer: ethers.Signer): Promise<void>;
|
|
11
|
-
isPricingModule(moduleAddress: string): Promise<boolean>;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=PricingModules.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PricingModules.d.ts","sourceRoot":"","sources":["../../src/pricing-modules/PricingModules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AAG5D,qBAAa,cAAc;IACvB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAc;gBAE9B,MAAM,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,CAAC,SAAS,CAAC,QAAQ;IAIjE,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK;IAI3B,kBAAkB,IAAI,OAAO,CAAC,mBAAmB,EAAE,CAAC;IAIpD,gBAAgB,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI7E,mBAAmB,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIhF,eAAe,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAGxE"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { IPricingShim } from './IPricingShim';
|
|
2
|
-
export class PricingModules {
|
|
3
|
-
pricingShim;
|
|
4
|
-
constructor(config, provider) {
|
|
5
|
-
this.pricingShim = new IPricingShim(config.addresses.spaceFactory, provider);
|
|
6
|
-
}
|
|
7
|
-
parseError(error) {
|
|
8
|
-
return this.pricingShim.parseError(error);
|
|
9
|
-
}
|
|
10
|
-
async listPricingModules() {
|
|
11
|
-
return this.pricingShim.read.listPricingModules();
|
|
12
|
-
}
|
|
13
|
-
async addPricingModule(moduleAddress, signer) {
|
|
14
|
-
await this.pricingShim.write(signer).addPricingModule(moduleAddress);
|
|
15
|
-
}
|
|
16
|
-
async removePricingModule(moduleAddress, signer) {
|
|
17
|
-
await this.pricingShim.write(signer).removePricingModule(moduleAddress);
|
|
18
|
-
}
|
|
19
|
-
async isPricingModule(moduleAddress) {
|
|
20
|
-
return this.pricingShim.read.isPricingModule(moduleAddress);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=PricingModules.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PricingModules.js","sourceRoot":"","sources":["../../src/pricing-modules/PricingModules.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAE7C,MAAM,OAAO,cAAc;IACN,WAAW,CAAc;IAE1C,YAAY,MAAuB,EAAE,QAAmC;QACpE,IAAI,CAAC,WAAW,GAAG,IAAI,YAAY,CAAC,MAAM,CAAC,SAAS,CAAC,YAAY,EAAE,QAAQ,CAAC,CAAA;IAChF,CAAC;IAEM,UAAU,CAAC,KAAc;QAC5B,OAAO,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,KAAK,CAAC,CAAA;IAC7C,CAAC;IAEM,KAAK,CAAC,kBAAkB;QAC3B,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAA;IACrD,CAAC;IAEM,KAAK,CAAC,gBAAgB,CAAC,aAAqB,EAAE,MAAqB;QACtE,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAA;IACxE,CAAC;IAEM,KAAK,CAAC,mBAAmB,CAAC,aAAqB,EAAE,MAAqB;QACzE,MAAM,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,mBAAmB,CAAC,aAAa,CAAC,CAAA;IAC3E,CAAC;IAEM,KAAK,CAAC,eAAe,CAAC,aAAqB;QAC9C,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,eAAe,CAAC,aAAa,CAAC,CAAA;IAC/D,CAAC;CACJ"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { SpaceDapp } from '../space-dapp/SpaceDapp';
|
|
2
|
-
import { PricingModuleStruct } from '../types/ContractTypes';
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated
|
|
5
|
-
* Use TIERED_PRICING_ORACLE_V2 or TIERED_PRICING_ORACLE_V3 instead
|
|
6
|
-
* Yes, the correct value for this constant is "TieredLogPricingOracleV2"
|
|
7
|
-
*/
|
|
8
|
-
export declare const TIERED_PRICING_ORACLE = "TieredLogPricingOracleV2";
|
|
9
|
-
export declare const TIERED_PRICING_ORACLE_V2 = "TieredLogPricingOracleV2";
|
|
10
|
-
export declare const TIERED_PRICING_ORACLE_V3 = "TieredLogPricingOracleV3";
|
|
11
|
-
export declare const FIXED_PRICING = "FixedPricing";
|
|
12
|
-
export declare const getDynamicPricingModule: (spaceDapp: SpaceDapp | undefined) => Promise<import("@towns-labs/generated/dev/typings/IPricingModules").IPricingModulesBase.PricingModuleStruct>;
|
|
13
|
-
export declare const getFixedPricingModule: (spaceDapp: SpaceDapp | undefined) => Promise<import("@towns-labs/generated/dev/typings/IPricingModules").IPricingModulesBase.PricingModuleStruct>;
|
|
14
|
-
export declare const findDynamicPricingModule: (pricingModules: PricingModuleStruct[]) => import("@towns-labs/generated/dev/typings/IPricingModules").IPricingModulesBase.PricingModuleStruct | undefined;
|
|
15
|
-
export declare const findFixedPricingModule: (pricingModules: PricingModuleStruct[]) => import("@towns-labs/generated/dev/typings/IPricingModules").IPricingModulesBase.PricingModuleStruct | undefined;
|
|
16
|
-
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/pricing-modules/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAA;AAE5D;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,6BAA6B,CAAA;AAC/D,eAAO,MAAM,wBAAwB,6BAA6B,CAAA;AAClE,eAAO,MAAM,wBAAwB,6BAA6B,CAAA;AAClE,eAAO,MAAM,aAAa,iBAAiB,CAAA;AAE3C,eAAO,MAAM,uBAAuB,GAAU,WAAW,SAAS,GAAG,SAAS,iHAU7E,CAAA;AAED,eAAO,MAAM,qBAAqB,GAAU,WAAW,SAAS,GAAG,SAAS,iHAU3E,CAAA;AAED,eAAO,MAAM,wBAAwB,GAAI,gBAAgB,mBAAmB,EAAE,oHAED,CAAA;AAE7E,eAAO,MAAM,sBAAsB,GAAI,gBAAgB,mBAAmB,EAAE,oHACV,CAAA"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @deprecated
|
|
3
|
-
* Use TIERED_PRICING_ORACLE_V2 or TIERED_PRICING_ORACLE_V3 instead
|
|
4
|
-
* Yes, the correct value for this constant is "TieredLogPricingOracleV2"
|
|
5
|
-
*/
|
|
6
|
-
export const TIERED_PRICING_ORACLE = 'TieredLogPricingOracleV2';
|
|
7
|
-
export const TIERED_PRICING_ORACLE_V2 = 'TieredLogPricingOracleV2';
|
|
8
|
-
export const TIERED_PRICING_ORACLE_V3 = 'TieredLogPricingOracleV3';
|
|
9
|
-
export const FIXED_PRICING = 'FixedPricing';
|
|
10
|
-
export const getDynamicPricingModule = async (spaceDapp) => {
|
|
11
|
-
if (!spaceDapp) {
|
|
12
|
-
throw new Error('getDynamicPricingModule: No spaceDapp');
|
|
13
|
-
}
|
|
14
|
-
const pricingModules = await spaceDapp.listPricingModules();
|
|
15
|
-
const dynamicPricingModule = findDynamicPricingModule(pricingModules);
|
|
16
|
-
if (!dynamicPricingModule) {
|
|
17
|
-
throw new Error('getDynamicPricingModule: no dynamicPricingModule');
|
|
18
|
-
}
|
|
19
|
-
return dynamicPricingModule;
|
|
20
|
-
};
|
|
21
|
-
export const getFixedPricingModule = async (spaceDapp) => {
|
|
22
|
-
if (!spaceDapp) {
|
|
23
|
-
throw new Error('getFixedPricingModule: No spaceDapp');
|
|
24
|
-
}
|
|
25
|
-
const pricingModules = await spaceDapp.listPricingModules();
|
|
26
|
-
const fixedPricingModule = findFixedPricingModule(pricingModules);
|
|
27
|
-
if (!fixedPricingModule) {
|
|
28
|
-
throw new Error('getFixedPricingModule: no fixedPricingModule');
|
|
29
|
-
}
|
|
30
|
-
return fixedPricingModule;
|
|
31
|
-
};
|
|
32
|
-
export const findDynamicPricingModule = (pricingModules) => pricingModules.find((module) => module.name === TIERED_PRICING_ORACLE_V3) ||
|
|
33
|
-
pricingModules.find((module) => module.name === TIERED_PRICING_ORACLE_V2);
|
|
34
|
-
export const findFixedPricingModule = (pricingModules) => pricingModules.find((module) => module.name === FIXED_PRICING);
|
|
35
|
-
//# sourceMappingURL=helpers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/pricing-modules/helpers.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,0BAA0B,CAAA;AAC/D,MAAM,CAAC,MAAM,wBAAwB,GAAG,0BAA0B,CAAA;AAClE,MAAM,CAAC,MAAM,wBAAwB,GAAG,0BAA0B,CAAA;AAClE,MAAM,CAAC,MAAM,aAAa,GAAG,cAAc,CAAA;AAE3C,MAAM,CAAC,MAAM,uBAAuB,GAAG,KAAK,EAAE,SAAgC,EAAE,EAAE;IAC9E,IAAI,CAAC,SAAS,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,uCAAuC,CAAC,CAAA;IAC5D,CAAC;IACD,MAAM,cAAc,GAAG,MAAM,SAAS,CAAC,kBAAkB,EAAE,CAAA;IAC3D,MAAM,oBAAoB,GAAG,wBAAwB,CAAC,cAAc,CAAC,CAAA;IACrE,IAAI,CAAC,oBAAoB,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,kDAAkD,CAAC,CAAA;IACvE,CAAC;IACD,OAAO,oBAAoB,CAAA;AAC/B,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAG,KAAK,EAAE,SAAgC,EAAE,EAAE;IAC5E,IAAI,CAAC,SAAS,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,qCAAqC,CAAC,CAAA;IAC1D,CAAC;IACD,MAAM,cAAc,GAAG,MAAM,SAAS,CAAC,kBAAkB,EAAE,CAAA;IAC3D,MAAM,kBAAkB,GAAG,sBAAsB,CAAC,cAAc,CAAC,CAAA;IACjE,IAAI,CAAC,kBAAkB,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAA;IACnE,CAAC;IACD,OAAO,kBAAkB,CAAA;AAC7B,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,cAAqC,EAAE,EAAE,CAC9E,cAAc,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,wBAAwB,CAAC;IACzE,cAAc,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,wBAAwB,CAAC,CAAA;AAE7E,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,cAAqC,EAAE,EAAE,CAC5E,cAAc,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,KAAK,aAAa,CAAC,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ethers } from 'ethers';
|
|
2
|
-
import { Connect, ContractType } from './types/typechain';
|
|
3
|
-
type RetryOptions = {
|
|
4
|
-
maxAttempts?: number;
|
|
5
|
-
initialRetryDelay?: number;
|
|
6
|
-
maxRetryDelay?: number;
|
|
7
|
-
};
|
|
8
|
-
export declare function readRetryWrapper<T_CONTRACT extends ContractType<Connect<ethers.Contract>>>(contract: T_CONTRACT, retryOptions?: RetryOptions): T_CONTRACT;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=readContractRetryer.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"readContractRetryer.d.ts","sourceRoot":"","sources":["../src/readContractRetryer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAIzD,KAAK,YAAY,GAAG;IAChB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,aAAa,CAAC,EAAE,MAAM,CAAA;CACzB,CAAA;AAQD,wBAAgB,gBAAgB,CAAC,UAAU,SAAS,YAAY,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,EACtF,QAAQ,EAAE,UAAU,EACpB,YAAY,GAAE,YAAiB,GAChC,UAAU,CAiFZ"}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { dlogger } from '@towns-labs/utils';
|
|
2
|
-
const logger = dlogger('csb:readContractRetryer');
|
|
3
|
-
const DEFAULT_RETRY_OPTIONS = {
|
|
4
|
-
maxAttempts: 4,
|
|
5
|
-
initialRetryDelay: 1000,
|
|
6
|
-
maxRetryDelay: 8000,
|
|
7
|
-
};
|
|
8
|
-
export function readRetryWrapper(contract, retryOptions = {}) {
|
|
9
|
-
const opts = { ...DEFAULT_RETRY_OPTIONS, ...retryOptions };
|
|
10
|
-
const wrapper = Object.create(contract);
|
|
11
|
-
// ethers/typechain contracts have a set of functions.
|
|
12
|
-
// these functions are defined on the class itself, i.e. contract[myFunction]
|
|
13
|
-
// as well as in these properties, i.e. contract.callStatic.myFunction
|
|
14
|
-
// so, we're gonna replace all these with retry wrapper
|
|
15
|
-
const contractMethodProperties = [
|
|
16
|
-
'functions',
|
|
17
|
-
'callStatic',
|
|
18
|
-
'estimateGas',
|
|
19
|
-
'populateTransaction',
|
|
20
|
-
];
|
|
21
|
-
const functionNames = Object.keys(contract.functions);
|
|
22
|
-
const objectsWithContractMethods = ['root', ...contractMethodProperties];
|
|
23
|
-
for (const target of objectsWithContractMethods) {
|
|
24
|
-
const isRoot = target === 'root';
|
|
25
|
-
const source = isRoot ? wrapper : wrapper[target];
|
|
26
|
-
const destination = isRoot ? wrapper : Object.create(wrapper[target] || {});
|
|
27
|
-
for (const funcName of functionNames) {
|
|
28
|
-
const ogFunction = source?.[funcName];
|
|
29
|
-
if (typeof ogFunction === 'function') {
|
|
30
|
-
Object.defineProperty(destination, funcName, {
|
|
31
|
-
value: function (...args) {
|
|
32
|
-
return (async () => {
|
|
33
|
-
let attempt = 0;
|
|
34
|
-
// eslint-disable-next-line no-constant-condition
|
|
35
|
-
while (true) {
|
|
36
|
-
attempt++;
|
|
37
|
-
try {
|
|
38
|
-
const result = ogFunction.apply(this, args);
|
|
39
|
-
return await result;
|
|
40
|
-
}
|
|
41
|
-
catch (error) {
|
|
42
|
-
if (attempt >= opts.maxAttempts) {
|
|
43
|
-
logger.error(`Read contract call failed after ${attempt} attempts:`, error);
|
|
44
|
-
throw error;
|
|
45
|
-
}
|
|
46
|
-
const retryDelay = Math.min(opts.maxRetryDelay, opts.initialRetryDelay * Math.pow(2, attempt - 1));
|
|
47
|
-
logger.log(`Read contract call failed for ${funcName} (attempt ${attempt}/${opts.maxAttempts}), retrying in ${retryDelay}ms:`, error);
|
|
48
|
-
await new Promise((resolve) => setTimeout(resolve, retryDelay));
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
})();
|
|
52
|
-
},
|
|
53
|
-
configurable: true,
|
|
54
|
-
writable: true,
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
if (!isRoot) {
|
|
59
|
-
Object.defineProperty(wrapper, target, {
|
|
60
|
-
value: destination,
|
|
61
|
-
configurable: true,
|
|
62
|
-
writable: true,
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
return wrapper;
|
|
67
|
-
}
|
|
68
|
-
//# sourceMappingURL=readContractRetryer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"readContractRetryer.js","sourceRoot":"","sources":["../src/readContractRetryer.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAC3C,MAAM,MAAM,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAAA;AAQjD,MAAM,qBAAqB,GAA2B;IAClD,WAAW,EAAE,CAAC;IACd,iBAAiB,EAAE,IAAI;IACvB,aAAa,EAAE,IAAI;CACtB,CAAA;AAED,MAAM,UAAU,gBAAgB,CAC5B,QAAoB,EACpB,eAA6B,EAAE;IAE/B,MAAM,IAAI,GAAG,EAAE,GAAG,qBAAqB,EAAE,GAAG,YAAY,EAAE,CAAA;IAC1D,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAe,CAAA;IAErD,sDAAsD;IACtD,6EAA6E;IAC7E,sEAAsE;IACtE,uDAAuD;IACvD,MAAM,wBAAwB,GAAG;QAC7B,WAAW;QACX,YAAY;QACZ,aAAa;QACb,qBAAqB;KACf,CAAA;IAEV,MAAM,aAAa,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAA;IAErD,MAAM,0BAA0B,GAAG,CAAC,MAAM,EAAE,GAAG,wBAAwB,CAAC,CAAA;IAExE,KAAK,MAAM,MAAM,IAAI,0BAA0B,EAAE,CAAC;QAC9C,MAAM,MAAM,GAAG,MAAM,KAAK,MAAM,CAAA;QAChC,MAAM,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAE,OAAO,CAAC,MAAM,CAA6B,CAAA;QAC9E,MAAM,WAAW,GAAG,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAE,OAAO,CAAC,MAAM,CAAY,IAAI,EAAE,CAAC,CAAA;QAEvF,KAAK,MAAM,QAAQ,IAAI,aAAa,EAAE,CAAC;YACnC,MAAM,UAAU,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAY,CAAA;YAChD,IAAI,OAAO,UAAU,KAAK,UAAU,EAAE,CAAC;gBACnC,MAAM,CAAC,cAAc,CAAC,WAAW,EAAE,QAAQ,EAAE;oBACzC,KAAK,EAAE,UAA4B,GAAG,IAAe;wBACjD,OAAO,CAAC,KAAK,IAAI,EAAE;4BACf,IAAI,OAAO,GAAG,CAAC,CAAA;4BAEf,iDAAiD;4BACjD,OAAO,IAAI,EAAE,CAAC;gCACV,OAAO,EAAE,CAAA;gCAET,IAAI,CAAC;oCACD,MAAM,MAAM,GACR,UACH,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;oCAEnB,OAAO,MAAM,MAAM,CAAA;gCACvB,CAAC;gCAAC,OAAO,KAAK,EAAE,CAAC;oCACb,IAAI,OAAO,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;wCAC9B,MAAM,CAAC,KAAK,CACR,mCAAmC,OAAO,YAAY,EACtD,KAAK,CACR,CAAA;wCACD,MAAM,KAAK,CAAA;oCACf,CAAC;oCAED,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CACvB,IAAI,CAAC,aAAa,EAClB,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,CACpD,CAAA;oCAED,MAAM,CAAC,GAAG,CACN,iCAAiC,QAAQ,aAAa,OAAO,IAAI,IAAI,CAAC,WAAW,kBAAkB,UAAU,KAAK,EAClH,KAAK,CACR,CAAA;oCACD,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAA;gCACnE,CAAC;4BACL,CAAC;wBACL,CAAC,CAAC,EAAE,CAAA;oBACR,CAAC;oBACD,YAAY,EAAE,IAAI;oBAClB,QAAQ,EAAE,IAAI;iBACjB,CAAC,CAAA;YACN,CAAC;QACL,CAAC;QAED,IAAI,CAAC,MAAM,EAAE,CAAC;YACV,MAAM,CAAC,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE;gBACnC,KAAK,EAAE,WAAW;gBAClB,YAAY,EAAE,IAAI;gBAClB,QAAQ,EAAE,IAAI;aACjB,CAAC,CAAA;QACN,CAAC;IACL,CAAC;IAED,OAAO,OAAO,CAAA;AAClB,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { OperatorRegistry__factory } from '@towns-labs/generated/dev/typings/factories/OperatorRegistry__factory';
|
|
2
|
-
import { ethers } from 'ethers';
|
|
3
|
-
import { BaseContractShim } from '../BaseContractShim';
|
|
4
|
-
declare const connect: typeof OperatorRegistry__factory.connect;
|
|
5
|
-
export declare class IOperatorRegistryShim extends BaseContractShim<typeof connect> {
|
|
6
|
-
constructor(address: string, provider: ethers.providers.Provider);
|
|
7
|
-
}
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=IOperatorRegistryShim.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IOperatorRegistryShim.d.ts","sourceRoot":"","sources":["../../src/river-registry/IOperatorRegistryShim.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uEAAuE,CAAA;AACjH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAEtD,QAAA,MAAa,OAAO,0CAA8B,CAAA;AAElD,qBAAa,qBAAsB,SAAQ,gBAAgB,CAAC,OAAO,OAAO,CAAC;gBAC3D,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,SAAS,CAAC,QAAQ;CAGnE"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { OperatorRegistry__factory } from '@towns-labs/generated/dev/typings/factories/OperatorRegistry__factory';
|
|
2
|
-
import { BaseContractShim } from '../BaseContractShim';
|
|
3
|
-
const { abi, connect } = OperatorRegistry__factory;
|
|
4
|
-
export class IOperatorRegistryShim extends BaseContractShim {
|
|
5
|
-
constructor(address, provider) {
|
|
6
|
-
super(address, provider, connect, abi);
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=IOperatorRegistryShim.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IOperatorRegistryShim.js","sourceRoot":"","sources":["../../src/river-registry/IOperatorRegistryShim.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,uEAAuE,CAAA;AAEjH,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAEtD,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,yBAAyB,CAAA;AAElD,MAAM,OAAO,qBAAsB,SAAQ,gBAAgC;IACvE,YAAY,OAAe,EAAE,QAAmC;QAC5D,KAAK,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,CAAC,CAAA;IAC1C,CAAC;CACJ"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { StreamRegistry__factory } from '@towns-labs/generated/dev/typings/factories/StreamRegistry__factory';
|
|
2
|
-
import { ethers } from 'ethers';
|
|
3
|
-
import { BaseContractShim } from '../BaseContractShim';
|
|
4
|
-
declare const connect: typeof StreamRegistry__factory.connect;
|
|
5
|
-
export declare class IStreamRegistryShim extends BaseContractShim<typeof connect> {
|
|
6
|
-
constructor(address: string, provider: ethers.providers.Provider);
|
|
7
|
-
}
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=IStreamRegistryShim.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IStreamRegistryShim.d.ts","sourceRoot":"","sources":["../../src/river-registry/IStreamRegistryShim.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qEAAqE,CAAA;AAC7G,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAEtD,QAAA,MAAa,OAAO,wCAA4B,CAAA;AAEhD,qBAAa,mBAAoB,SAAQ,gBAAgB,CAAC,OAAO,OAAO,CAAC;gBACzD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,SAAS,CAAC,QAAQ;CAGnE"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { StreamRegistry__factory } from '@towns-labs/generated/dev/typings/factories/StreamRegistry__factory';
|
|
2
|
-
import { BaseContractShim } from '../BaseContractShim';
|
|
3
|
-
const { abi, connect } = StreamRegistry__factory;
|
|
4
|
-
export class IStreamRegistryShim extends BaseContractShim {
|
|
5
|
-
constructor(address, provider) {
|
|
6
|
-
super(address, provider, connect, abi);
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=IStreamRegistryShim.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IStreamRegistryShim.js","sourceRoot":"","sources":["../../src/river-registry/IStreamRegistryShim.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,qEAAqE,CAAA;AAE7G,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAEtD,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,uBAAuB,CAAA;AAEhD,MAAM,OAAO,mBAAoB,SAAQ,gBAAgC;IACrE,YAAY,OAAe,EAAE,QAAmC;QAC5D,KAAK,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,CAAC,CAAA;IAC1C,CAAC;CACJ"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ethers } from 'ethers';
|
|
2
|
-
import { RiverChainConfig } from '../utils/web3Env';
|
|
3
|
-
import { IStreamRegistryShim } from './IStreamRegistryShim';
|
|
4
|
-
import { IOperatorRegistryShim } from './IOperatorRegistryShim';
|
|
5
|
-
import { StreamStructOutput } from '@towns-labs/generated/dev/typings/IStreamRegistry';
|
|
6
|
-
export declare class RiverRegistry {
|
|
7
|
-
readonly config: RiverChainConfig;
|
|
8
|
-
readonly provider: ethers.providers.Provider;
|
|
9
|
-
readonly streamRegistry: IStreamRegistryShim;
|
|
10
|
-
readonly operatorRegistry: IOperatorRegistryShim;
|
|
11
|
-
constructor(config: RiverChainConfig, provider: ethers.providers.Provider);
|
|
12
|
-
getStreamCount(): Promise<ethers.BigNumber>;
|
|
13
|
-
getStream(streamAddress: Uint8Array): Promise<StreamStructOutput>;
|
|
14
|
-
streamExists(streamAddress: Uint8Array): Promise<boolean>;
|
|
15
|
-
private getStreamCountOnNode;
|
|
16
|
-
getStreamCountsOnNodes(nodeAddresses: string[]): Promise<ethers.BigNumber[]>;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=RiverRegistry.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RiverRegistry.d.ts","sourceRoot":"","sources":["../../src/river-registry/RiverRegistry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAC/D,OAAO,EAAE,kBAAkB,EAAE,MAAM,mDAAmD,CAAA;AAEtF,qBAAa,aAAa;IACtB,SAAgB,MAAM,EAAE,gBAAgB,CAAA;IACxC,SAAgB,QAAQ,EAAE,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAA;IACnD,SAAgB,cAAc,EAAE,mBAAmB,CAAA;IACnD,SAAgB,gBAAgB,EAAE,qBAAqB,CAAA;gBAE3C,MAAM,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,CAAC,SAAS,CAAC,QAAQ;IAOnE,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC;IAI3C,SAAS,CAAC,aAAa,EAAE,UAAU,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAIjE,YAAY,CAAC,aAAa,EAAE,UAAU,GAAG,OAAO,CAAC,OAAO,CAAC;YAajD,oBAAoB;IAIrB,sBAAsB,CAAC,aAAa,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC;CAK5F"}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { IStreamRegistryShim } from './IStreamRegistryShim';
|
|
2
|
-
import { IOperatorRegistryShim } from './IOperatorRegistryShim';
|
|
3
|
-
export class RiverRegistry {
|
|
4
|
-
config;
|
|
5
|
-
provider;
|
|
6
|
-
streamRegistry;
|
|
7
|
-
operatorRegistry;
|
|
8
|
-
constructor(config, provider) {
|
|
9
|
-
this.config = config;
|
|
10
|
-
this.provider = provider;
|
|
11
|
-
this.streamRegistry = new IStreamRegistryShim(config.addresses.riverRegistry, provider);
|
|
12
|
-
this.operatorRegistry = new IOperatorRegistryShim(config.addresses.riverRegistry, provider);
|
|
13
|
-
}
|
|
14
|
-
async getStreamCount() {
|
|
15
|
-
return this.streamRegistry.read.getStreamCount();
|
|
16
|
-
}
|
|
17
|
-
async getStream(streamAddress) {
|
|
18
|
-
return this.streamRegistry.read.getStream(streamAddress);
|
|
19
|
-
}
|
|
20
|
-
async streamExists(streamAddress) {
|
|
21
|
-
try {
|
|
22
|
-
await this.getStream(streamAddress);
|
|
23
|
-
return true;
|
|
24
|
-
}
|
|
25
|
-
catch (error) {
|
|
26
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
27
|
-
if (error.reason === 'NOT_FOUND') {
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
|
-
throw error;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
async getStreamCountOnNode(nodeAddress) {
|
|
34
|
-
return this.streamRegistry.read.getStreamCountOnNode(nodeAddress);
|
|
35
|
-
}
|
|
36
|
-
async getStreamCountsOnNodes(nodeAddresses) {
|
|
37
|
-
const getStreamCountOnNode = this.getStreamCountOnNode.bind(this);
|
|
38
|
-
const promises = nodeAddresses.map(getStreamCountOnNode);
|
|
39
|
-
return Promise.all(promises);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
//# sourceMappingURL=RiverRegistry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RiverRegistry.js","sourceRoot":"","sources":["../../src/river-registry/RiverRegistry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAA;AAG/D,MAAM,OAAO,aAAa;IACN,MAAM,CAAkB;IACxB,QAAQ,CAA2B;IACnC,cAAc,CAAqB;IACnC,gBAAgB,CAAuB;IAEvD,YAAY,MAAwB,EAAE,QAAmC;QACrE,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;QACpB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,cAAc,GAAG,IAAI,mBAAmB,CAAC,MAAM,CAAC,SAAS,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAA;QACvF,IAAI,CAAC,gBAAgB,GAAG,IAAI,qBAAqB,CAAC,MAAM,CAAC,SAAS,CAAC,aAAa,EAAE,QAAQ,CAAC,CAAA;IAC/F,CAAC;IAED,KAAK,CAAC,cAAc;QAChB,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,cAAc,EAAE,CAAA;IACpD,CAAC;IAED,KAAK,CAAC,SAAS,CAAC,aAAyB;QACrC,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAA;IAC5D,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,aAAyB;QACxC,IAAI,CAAC;YACD,MAAM,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,CAAA;YACnC,OAAO,IAAI,CAAA;QACf,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,sEAAsE;YACtE,IAAK,KAAa,CAAC,MAAM,KAAK,WAAW,EAAE,CAAC;gBACxC,OAAO,KAAK,CAAA;YAChB,CAAC;YACD,MAAM,KAAK,CAAA;QACf,CAAC;IACL,CAAC;IAEO,KAAK,CAAC,oBAAoB,CAAC,WAAmB;QAClD,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,oBAAoB,CAAC,WAAW,CAAC,CAAA;IACrE,CAAC;IAEM,KAAK,CAAC,sBAAsB,CAAC,aAAuB;QACvD,MAAM,oBAAoB,GAAG,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACjE,MAAM,QAAQ,GAAG,aAAa,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAAA;QACxD,OAAO,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAA;IAChC,CAAC;CACJ"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { RiverRegistry } from './RiverRegistry';
|
|
2
|
-
import { ethers } from 'ethers';
|
|
3
|
-
import { RiverChainConfig } from '../utils/web3Env';
|
|
4
|
-
export declare function createRiverRegistry(provider: ethers.providers.Provider, config: RiverChainConfig): RiverRegistry;
|
|
5
|
-
//# sourceMappingURL=RiverRegistryFactory.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RiverRegistryFactory.d.ts","sourceRoot":"","sources":["../../src/river-registry/RiverRegistryFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAEnD,wBAAgB,mBAAmB,CAC/B,QAAQ,EAAE,MAAM,CAAC,SAAS,CAAC,QAAQ,EACnC,MAAM,EAAE,gBAAgB,GACzB,aAAa,CAEf"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"RiverRegistryFactory.js","sourceRoot":"","sources":["../../src/river-registry/RiverRegistryFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAI/C,MAAM,UAAU,mBAAmB,CAC/B,QAAmC,EACnC,MAAwB;IAExB,OAAO,IAAI,aAAa,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;AAC9C,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ethers } from 'ethers';
|
|
2
|
-
import { BaseContractShim } from '../BaseContractShim';
|
|
3
|
-
import { IAppAccount__factory } from '@towns-labs/generated/dev/typings/factories/IAppAccount__factory';
|
|
4
|
-
declare const connect: typeof IAppAccount__factory.connect;
|
|
5
|
-
export type { IAppAccount } from '@towns-labs/generated/dev/typings/IAppAccount';
|
|
6
|
-
export declare class IAppAccountShim extends BaseContractShim<typeof connect> {
|
|
7
|
-
constructor(address: string, provider: ethers.providers.Provider);
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=IAppAccountShim.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IAppAccountShim.d.ts","sourceRoot":"","sources":["../../src/space/IAppAccountShim.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kEAAkE,CAAA;AAEvG,QAAA,MAAa,OAAO,qCAAyB,CAAA;AAE7C,YAAY,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAA;AAEhF,qBAAa,eAAgB,SAAQ,gBAAgB,CAAC,OAAO,OAAO,CAAC;gBACrD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,SAAS,CAAC,QAAQ;CAGnE"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { BaseContractShim } from '../BaseContractShim';
|
|
2
|
-
import { IAppAccount__factory } from '@towns-labs/generated/dev/typings/factories/IAppAccount__factory';
|
|
3
|
-
const { abi, connect } = IAppAccount__factory;
|
|
4
|
-
export class IAppAccountShim extends BaseContractShim {
|
|
5
|
-
constructor(address, provider) {
|
|
6
|
-
super(address, provider, connect, abi);
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=IAppAccountShim.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IAppAccountShim.js","sourceRoot":"","sources":["../../src/space/IAppAccountShim.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kEAAkE,CAAA;AAEvG,MAAM,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,oBAAoB,CAAA;AAI7C,MAAM,OAAO,eAAgB,SAAQ,gBAAgC;IACjE,YAAY,OAAe,EAAE,QAAmC;QAC5D,KAAK,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,CAAC,CAAA;IAC1C,CAAC;CACJ"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ethers } from 'ethers';
|
|
2
|
-
import { BaseContractShim } from '../BaseContractShim';
|
|
3
|
-
import { IBanning__factory } from '@towns-labs/generated/dev/typings/factories/IBanning__factory';
|
|
4
|
-
declare const connect: typeof IBanning__factory.connect;
|
|
5
|
-
export declare class IBanningShim extends BaseContractShim<typeof connect> {
|
|
6
|
-
constructor(address: string, provider: ethers.providers.Provider);
|
|
7
|
-
}
|
|
8
|
-
export {};
|
|
9
|
-
//# sourceMappingURL=IBanningShim.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IBanningShim.d.ts","sourceRoot":"","sources":["../../src/space/IBanningShim.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+DAA+D,CAAA;AAEjG,QAAA,MAAa,OAAO,kCAAsB,CAAA;AAE1C,qBAAa,YAAa,SAAQ,gBAAgB,CAAC,OAAO,OAAO,CAAC;gBAClD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,CAAC,SAAS,CAAC,QAAQ;CAGnE"}
|