@superfluid-finance/sdk-core 0.3.3-dev.a92870f.0 → 0.3.3-dev.bd59c6c.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/CHANGELOG.md +25 -1
- package/README.md +2 -0
- package/dist/index.umd.js +6034 -2012
- package/dist/main/BatchCall.d.ts +6 -6
- package/dist/main/BatchCall.js +8 -8
- package/dist/main/BatchCall.js.map +1 -1
- package/dist/main/ConstantFlowAgreementV1.d.ts +106 -17
- package/dist/main/ConstantFlowAgreementV1.d.ts.map +1 -1
- package/dist/main/ConstantFlowAgreementV1.js +238 -50
- package/dist/main/ConstantFlowAgreementV1.js.map +1 -1
- package/dist/main/{Token.d.ts → ERC20Token.d.ts} +17 -14
- package/dist/main/ERC20Token.d.ts.map +1 -0
- package/dist/main/{Token.js → ERC20Token.js} +29 -33
- package/dist/main/ERC20Token.js.map +1 -0
- package/dist/main/Framework.d.ts +34 -7
- package/dist/main/Framework.d.ts.map +1 -1
- package/dist/main/Framework.js +88 -15
- package/dist/main/Framework.js.map +1 -1
- package/dist/main/Governance.d.ts +40 -0
- package/dist/main/Governance.d.ts.map +1 -0
- package/dist/main/Governance.js +82 -0
- package/dist/main/Governance.js.map +1 -0
- package/dist/main/Host.d.ts +3 -3
- package/dist/main/Host.d.ts.map +1 -1
- package/dist/main/Host.js +4 -4
- package/dist/main/Host.js.map +1 -1
- package/dist/main/InstantDistributionAgreementV1.d.ts +25 -22
- package/dist/main/InstantDistributionAgreementV1.d.ts.map +1 -1
- package/dist/main/InstantDistributionAgreementV1.js +69 -71
- package/dist/main/InstantDistributionAgreementV1.js.map +1 -1
- package/dist/main/Operation.d.ts +5 -5
- package/dist/main/Operation.js +5 -5
- package/dist/main/Query.d.ts +6 -6
- package/dist/main/Query.d.ts.map +1 -1
- package/dist/main/Query.js +18 -16
- package/dist/main/Query.js.map +1 -1
- package/dist/main/SFError.d.ts +1 -1
- package/dist/main/SFError.d.ts.map +1 -1
- package/dist/main/SFError.js +2 -0
- package/dist/main/SFError.js.map +1 -1
- package/dist/main/SuperToken.d.ts +226 -67
- package/dist/main/SuperToken.d.ts.map +1 -1
- package/dist/main/SuperToken.js +318 -132
- package/dist/main/SuperToken.js.map +1 -1
- package/dist/main/abi/IConstantFlowAgreementV1.json +335 -2
- package/dist/main/abi/ISETH.json +1604 -0
- package/dist/main/abi/SuperfluidGovernanceII.json +921 -0
- package/dist/main/constants.d.ts +4 -0
- package/dist/main/constants.d.ts.map +1 -1
- package/dist/main/constants.js +36 -13
- package/dist/main/constants.js.map +1 -1
- package/dist/main/defaultSubgraphReleaseTag.json +3 -0
- package/dist/main/events.d.ts +14 -2
- package/dist/main/events.d.ts.map +1 -1
- package/dist/main/frameworkHelpers.d.ts +2 -2
- package/dist/main/frameworkHelpers.js +2 -2
- package/dist/main/index.d.ts +16 -5
- package/dist/main/index.d.ts.map +1 -1
- package/dist/main/index.js +12 -1
- package/dist/main/index.js.map +1 -1
- package/dist/main/interfaces.d.ts +81 -8
- package/dist/main/interfaces.d.ts.map +1 -1
- package/dist/main/mapGetAllEventsQueryEvents.d.ts.map +1 -1
- package/dist/main/mapGetAllEventsQueryEvents.js +22 -1
- package/dist/main/mapGetAllEventsQueryEvents.js.map +1 -1
- package/dist/main/pagination.d.ts +42 -4
- package/dist/main/pagination.d.ts.map +1 -1
- package/dist/main/pagination.js +36 -5
- package/dist/main/pagination.js.map +1 -1
- package/dist/main/subgraph/SubgraphClient.d.ts +2 -2
- package/dist/main/subgraph/SubgraphClient.d.ts.map +1 -1
- package/dist/main/subgraph/SubgraphClient.js +0 -12
- package/dist/main/subgraph/SubgraphClient.js.map +1 -1
- package/dist/main/subgraph/entities/account/account.d.ts +1 -0
- package/dist/main/subgraph/entities/account/account.d.ts.map +1 -1
- package/dist/main/subgraph/entities/account/accounts.generated.d.ts +2 -0
- package/dist/main/subgraph/entities/account/accounts.generated.d.ts.map +1 -1
- package/dist/main/subgraph/entities/account/accounts.generated.js +1 -1
- package/dist/main/subgraph/entities/account/accounts.generated.js.map +1 -1
- package/dist/main/subgraph/entities/accountTokenSnapshot/accountTokenSnapshot.d.ts +2 -0
- package/dist/main/subgraph/entities/accountTokenSnapshot/accountTokenSnapshot.d.ts.map +1 -1
- package/dist/main/subgraph/entities/accountTokenSnapshot/accountTokenSnapshot.js +1 -0
- package/dist/main/subgraph/entities/accountTokenSnapshot/accountTokenSnapshot.js.map +1 -1
- package/dist/main/subgraph/entities/accountTokenSnapshot/accountTokenSnapshots.generated.d.ts +3 -0
- package/dist/main/subgraph/entities/accountTokenSnapshot/accountTokenSnapshots.generated.d.ts.map +1 -1
- package/dist/main/subgraph/entities/accountTokenSnapshot/accountTokenSnapshots.generated.js +1 -1
- package/dist/main/subgraph/entities/accountTokenSnapshot/accountTokenSnapshots.generated.js.map +1 -1
- package/dist/main/subgraph/entities/index/index.d.ts +2 -0
- package/dist/main/subgraph/entities/index/index.d.ts.map +1 -1
- package/dist/main/subgraph/entities/index/index.js +1 -0
- package/dist/main/subgraph/entities/index/index.js.map +1 -1
- package/dist/main/subgraph/entities/index/indexes.generated.d.ts +3 -0
- package/dist/main/subgraph/entities/index/indexes.generated.d.ts.map +1 -1
- package/dist/main/subgraph/entities/index/indexes.generated.js +1 -1
- package/dist/main/subgraph/entities/index/indexes.generated.js.map +1 -1
- package/dist/main/subgraph/entities/indexSubscription/indexSubscription.d.ts +2 -0
- package/dist/main/subgraph/entities/indexSubscription/indexSubscription.d.ts.map +1 -1
- package/dist/main/subgraph/entities/indexSubscription/indexSubscription.js +1 -0
- package/dist/main/subgraph/entities/indexSubscription/indexSubscription.js.map +1 -1
- package/dist/main/subgraph/entities/indexSubscription/indexSubscriptions.generated.d.ts +3 -0
- package/dist/main/subgraph/entities/indexSubscription/indexSubscriptions.generated.d.ts.map +1 -1
- package/dist/main/subgraph/entities/indexSubscription/indexSubscriptions.generated.js +1 -1
- package/dist/main/subgraph/entities/indexSubscription/indexSubscriptions.generated.js.map +1 -1
- package/dist/main/subgraph/entities/stream/stream.d.ts +2 -0
- package/dist/main/subgraph/entities/stream/stream.d.ts.map +1 -1
- package/dist/main/subgraph/entities/stream/stream.js +1 -0
- package/dist/main/subgraph/entities/stream/stream.js.map +1 -1
- package/dist/main/subgraph/entities/stream/streams.generated.d.ts +3 -0
- package/dist/main/subgraph/entities/stream/streams.generated.d.ts.map +1 -1
- package/dist/main/subgraph/entities/stream/streams.generated.js +1 -1
- package/dist/main/subgraph/entities/stream/streams.generated.js.map +1 -1
- package/dist/main/subgraph/entities/streamPeriod/streamPeriod.d.ts +2 -0
- package/dist/main/subgraph/entities/streamPeriod/streamPeriod.d.ts.map +1 -1
- package/dist/main/subgraph/entities/streamPeriod/streamPeriod.js +1 -0
- package/dist/main/subgraph/entities/streamPeriod/streamPeriod.js.map +1 -1
- package/dist/main/subgraph/entities/streamPeriod/streamPeriods.generated.d.ts +3 -0
- package/dist/main/subgraph/entities/streamPeriod/streamPeriods.generated.d.ts.map +1 -1
- package/dist/main/subgraph/entities/streamPeriod/streamPeriods.generated.js +1 -1
- package/dist/main/subgraph/entities/streamPeriod/streamPeriods.generated.js.map +1 -1
- package/dist/main/subgraph/entities/token/token.d.ts +1 -0
- package/dist/main/subgraph/entities/token/token.d.ts.map +1 -1
- package/dist/main/subgraph/entities/token/tokens.generated.d.ts +2 -0
- package/dist/main/subgraph/entities/token/tokens.generated.d.ts.map +1 -1
- package/dist/main/subgraph/entities/token/tokens.generated.js +1 -1
- package/dist/main/subgraph/entities/token/tokens.generated.js.map +1 -1
- package/dist/main/subgraph/entities/tokenStatistic/tokenStatistic.d.ts +1 -0
- package/dist/main/subgraph/entities/tokenStatistic/tokenStatistic.d.ts.map +1 -1
- package/dist/main/subgraph/entities/tokenStatistic/tokenStatistics.generated.d.ts +2 -0
- package/dist/main/subgraph/entities/tokenStatistic/tokenStatistics.generated.d.ts.map +1 -1
- package/dist/main/subgraph/entities/tokenStatistic/tokenStatistics.generated.js +1 -1
- package/dist/main/subgraph/entities/tokenStatistic/tokenStatistics.generated.js.map +1 -1
- package/dist/main/subgraph/events/events.d.ts +1 -0
- package/dist/main/subgraph/events/events.d.ts.map +1 -1
- package/dist/main/subgraph/events/events.generated.d.ts +118 -3
- package/dist/main/subgraph/events/events.generated.d.ts.map +1 -1
- package/dist/main/subgraph/events/events.generated.js +38 -37
- package/dist/main/subgraph/events/events.generated.js.map +1 -1
- package/dist/main/subgraph/events/flowUpdatedEvent.d.ts +1 -0
- package/dist/main/subgraph/events/flowUpdatedEvent.d.ts.map +1 -1
- package/dist/main/subgraph/events/indexUpdatedEvent.d.ts +1 -0
- package/dist/main/subgraph/events/indexUpdatedEvent.d.ts.map +1 -1
- package/dist/main/subgraph/events/subscriptionUnitsUpdatedEvents.d.ts +1 -0
- package/dist/main/subgraph/events/subscriptionUnitsUpdatedEvents.d.ts.map +1 -1
- package/dist/main/subgraph/meta/meta.d.ts +15 -0
- package/dist/main/subgraph/meta/meta.d.ts.map +1 -0
- package/dist/main/subgraph/meta/meta.generated.d.ts +19 -0
- package/dist/main/subgraph/meta/meta.generated.d.ts.map +1 -0
- package/dist/main/subgraph/meta/meta.generated.js +5 -0
- package/dist/main/subgraph/meta/meta.generated.js.map +1 -0
- package/dist/main/subgraph/meta/meta.js +20 -0
- package/dist/main/subgraph/meta/meta.js.map +1 -0
- package/dist/main/subgraph/queries/getAllEvents.generated.d.ts +12 -0
- package/dist/main/subgraph/queries/getAllEvents.generated.d.ts.map +1 -1
- package/dist/main/subgraph/queries/getAllEvents.generated.js +1 -1
- package/dist/main/subgraph/queries/getAllEvents.generated.js.map +1 -1
- package/dist/main/subgraph/schema.generated.d.ts +817 -5
- package/dist/main/subgraph/schema.generated.d.ts.map +1 -1
- package/dist/main/subgraph/subgraphQueryHandler.d.ts +6 -3
- package/dist/main/subgraph/subgraphQueryHandler.d.ts.map +1 -1
- package/dist/main/subgraph/subgraphQueryHandler.js +30 -16
- package/dist/main/subgraph/subgraphQueryHandler.js.map +1 -1
- package/dist/main/typechain/IConstantFlowAgreementV1.d.ts +187 -5
- package/dist/main/typechain/IConstantFlowAgreementV1.d.ts.map +1 -1
- package/dist/main/typechain/ISETH.d.ts +1068 -0
- package/dist/main/typechain/ISETH.d.ts.map +1 -0
- package/dist/main/typechain/ISETH.js +3 -0
- package/dist/main/typechain/ISETH.js.map +1 -0
- package/dist/main/typechain/SuperfluidGovernanceII.d.ts +617 -0
- package/dist/main/typechain/SuperfluidGovernanceII.d.ts.map +1 -0
- package/dist/main/typechain/SuperfluidGovernanceII.js +3 -0
- package/dist/main/typechain/SuperfluidGovernanceII.js.map +1 -0
- package/dist/main/typechain/factories/IConstantFlowAgreementV1__factory.d.ts.map +1 -1
- package/dist/main/typechain/factories/IConstantFlowAgreementV1__factory.js +335 -2
- package/dist/main/typechain/factories/IConstantFlowAgreementV1__factory.js.map +1 -1
- package/dist/main/typechain/factories/ISETH__factory.d.ts +36 -0
- package/dist/main/typechain/factories/ISETH__factory.d.ts.map +1 -0
- package/dist/main/typechain/factories/ISETH__factory.js +1622 -0
- package/dist/main/typechain/factories/ISETH__factory.js.map +1 -0
- package/dist/main/typechain/factories/SuperfluidGovernanceII__factory.d.ts +36 -0
- package/dist/main/typechain/factories/SuperfluidGovernanceII__factory.d.ts.map +1 -0
- package/dist/main/typechain/factories/SuperfluidGovernanceII__factory.js +939 -0
- package/dist/main/typechain/factories/SuperfluidGovernanceII__factory.js.map +1 -0
- package/dist/main/typechain/index.d.ts +4 -0
- package/dist/main/typechain/index.d.ts.map +1 -1
- package/dist/main/typechain/index.js +5 -1
- package/dist/main/typechain/index.js.map +1 -1
- package/dist/main/utils.d.ts +15 -13
- package/dist/main/utils.d.ts.map +1 -1
- package/dist/main/utils.js +29 -15
- package/dist/main/utils.js.map +1 -1
- package/dist/module/BatchCall.d.ts +6 -6
- package/dist/module/BatchCall.js +8 -8
- package/dist/module/BatchCall.js.map +1 -1
- package/dist/module/ConstantFlowAgreementV1.d.ts +106 -17
- package/dist/module/ConstantFlowAgreementV1.d.ts.map +1 -1
- package/dist/module/ConstantFlowAgreementV1.js +239 -51
- package/dist/module/ConstantFlowAgreementV1.js.map +1 -1
- package/dist/module/{Token.d.ts → ERC20Token.d.ts} +17 -14
- package/dist/module/ERC20Token.d.ts.map +1 -0
- package/dist/module/{Token.js → ERC20Token.js} +28 -32
- package/dist/module/ERC20Token.js.map +1 -0
- package/dist/module/Framework.d.ts +34 -7
- package/dist/module/Framework.d.ts.map +1 -1
- package/dist/module/Framework.js +88 -15
- package/dist/module/Framework.js.map +1 -1
- package/dist/module/Governance.d.ts +40 -0
- package/dist/module/Governance.d.ts.map +1 -0
- package/dist/module/Governance.js +76 -0
- package/dist/module/Governance.js.map +1 -0
- package/dist/module/Host.d.ts +3 -3
- package/dist/module/Host.d.ts.map +1 -1
- package/dist/module/Host.js +4 -4
- package/dist/module/Host.js.map +1 -1
- package/dist/module/InstantDistributionAgreementV1.d.ts +25 -22
- package/dist/module/InstantDistributionAgreementV1.d.ts.map +1 -1
- package/dist/module/InstantDistributionAgreementV1.js +69 -71
- package/dist/module/InstantDistributionAgreementV1.js.map +1 -1
- package/dist/module/Operation.d.ts +5 -5
- package/dist/module/Operation.js +5 -5
- package/dist/module/Query.d.ts +6 -6
- package/dist/module/Query.d.ts.map +1 -1
- package/dist/module/Query.js +16 -16
- package/dist/module/Query.js.map +1 -1
- package/dist/module/SFError.d.ts +1 -1
- package/dist/module/SFError.d.ts.map +1 -1
- package/dist/module/SFError.js +2 -0
- package/dist/module/SFError.js.map +1 -1
- package/dist/module/SuperToken.d.ts +226 -67
- package/dist/module/SuperToken.d.ts.map +1 -1
- package/dist/module/SuperToken.js +315 -133
- package/dist/module/SuperToken.js.map +1 -1
- package/dist/module/abi/IConstantFlowAgreementV1.json +335 -2
- package/dist/module/abi/ISETH.json +1604 -0
- package/dist/module/abi/SuperfluidGovernanceII.json +921 -0
- package/dist/module/constants.d.ts +4 -0
- package/dist/module/constants.d.ts.map +1 -1
- package/dist/module/constants.js +32 -12
- package/dist/module/constants.js.map +1 -1
- package/dist/module/defaultSubgraphReleaseTag.json +3 -0
- package/dist/module/events.d.ts +14 -2
- package/dist/module/events.d.ts.map +1 -1
- package/dist/module/frameworkHelpers.d.ts +2 -2
- package/dist/module/frameworkHelpers.js +2 -2
- package/dist/module/index.d.ts +16 -5
- package/dist/module/index.d.ts.map +1 -1
- package/dist/module/index.js +16 -5
- package/dist/module/index.js.map +1 -1
- package/dist/module/interfaces.d.ts +81 -8
- package/dist/module/interfaces.d.ts.map +1 -1
- package/dist/module/mapGetAllEventsQueryEvents.d.ts.map +1 -1
- package/dist/module/mapGetAllEventsQueryEvents.js +22 -1
- package/dist/module/mapGetAllEventsQueryEvents.js.map +1 -1
- package/dist/module/pagination.d.ts +42 -4
- package/dist/module/pagination.d.ts.map +1 -1
- package/dist/module/pagination.js +30 -5
- package/dist/module/pagination.js.map +1 -1
- package/dist/module/subgraph/SubgraphClient.d.ts +2 -2
- package/dist/module/subgraph/SubgraphClient.d.ts.map +1 -1
- package/dist/module/subgraph/SubgraphClient.js +1 -13
- package/dist/module/subgraph/SubgraphClient.js.map +1 -1
- package/dist/module/subgraph/entities/account/account.d.ts +1 -0
- package/dist/module/subgraph/entities/account/account.d.ts.map +1 -1
- package/dist/module/subgraph/entities/account/accounts.generated.d.ts +2 -0
- package/dist/module/subgraph/entities/account/accounts.generated.d.ts.map +1 -1
- package/dist/module/subgraph/entities/account/accounts.generated.js +1 -1
- package/dist/module/subgraph/entities/account/accounts.generated.js.map +1 -1
- package/dist/module/subgraph/entities/accountTokenSnapshot/accountTokenSnapshot.d.ts +2 -0
- package/dist/module/subgraph/entities/accountTokenSnapshot/accountTokenSnapshot.d.ts.map +1 -1
- package/dist/module/subgraph/entities/accountTokenSnapshot/accountTokenSnapshot.js +1 -0
- package/dist/module/subgraph/entities/accountTokenSnapshot/accountTokenSnapshot.js.map +1 -1
- package/dist/module/subgraph/entities/accountTokenSnapshot/accountTokenSnapshots.generated.d.ts +3 -0
- package/dist/module/subgraph/entities/accountTokenSnapshot/accountTokenSnapshots.generated.d.ts.map +1 -1
- package/dist/module/subgraph/entities/accountTokenSnapshot/accountTokenSnapshots.generated.js +1 -1
- package/dist/module/subgraph/entities/accountTokenSnapshot/accountTokenSnapshots.generated.js.map +1 -1
- package/dist/module/subgraph/entities/index/index.d.ts +2 -0
- package/dist/module/subgraph/entities/index/index.d.ts.map +1 -1
- package/dist/module/subgraph/entities/index/index.js +1 -0
- package/dist/module/subgraph/entities/index/index.js.map +1 -1
- package/dist/module/subgraph/entities/index/indexes.generated.d.ts +3 -0
- package/dist/module/subgraph/entities/index/indexes.generated.d.ts.map +1 -1
- package/dist/module/subgraph/entities/index/indexes.generated.js +1 -1
- package/dist/module/subgraph/entities/index/indexes.generated.js.map +1 -1
- package/dist/module/subgraph/entities/indexSubscription/indexSubscription.d.ts +2 -0
- package/dist/module/subgraph/entities/indexSubscription/indexSubscription.d.ts.map +1 -1
- package/dist/module/subgraph/entities/indexSubscription/indexSubscription.js +1 -0
- package/dist/module/subgraph/entities/indexSubscription/indexSubscription.js.map +1 -1
- package/dist/module/subgraph/entities/indexSubscription/indexSubscriptions.generated.d.ts +3 -0
- package/dist/module/subgraph/entities/indexSubscription/indexSubscriptions.generated.d.ts.map +1 -1
- package/dist/module/subgraph/entities/indexSubscription/indexSubscriptions.generated.js +1 -1
- package/dist/module/subgraph/entities/indexSubscription/indexSubscriptions.generated.js.map +1 -1
- package/dist/module/subgraph/entities/stream/stream.d.ts +2 -0
- package/dist/module/subgraph/entities/stream/stream.d.ts.map +1 -1
- package/dist/module/subgraph/entities/stream/stream.js +1 -0
- package/dist/module/subgraph/entities/stream/stream.js.map +1 -1
- package/dist/module/subgraph/entities/stream/streams.generated.d.ts +3 -0
- package/dist/module/subgraph/entities/stream/streams.generated.d.ts.map +1 -1
- package/dist/module/subgraph/entities/stream/streams.generated.js +1 -1
- package/dist/module/subgraph/entities/stream/streams.generated.js.map +1 -1
- package/dist/module/subgraph/entities/streamPeriod/streamPeriod.d.ts +2 -0
- package/dist/module/subgraph/entities/streamPeriod/streamPeriod.d.ts.map +1 -1
- package/dist/module/subgraph/entities/streamPeriod/streamPeriod.js +1 -0
- package/dist/module/subgraph/entities/streamPeriod/streamPeriod.js.map +1 -1
- package/dist/module/subgraph/entities/streamPeriod/streamPeriods.generated.d.ts +3 -0
- package/dist/module/subgraph/entities/streamPeriod/streamPeriods.generated.d.ts.map +1 -1
- package/dist/module/subgraph/entities/streamPeriod/streamPeriods.generated.js +1 -1
- package/dist/module/subgraph/entities/streamPeriod/streamPeriods.generated.js.map +1 -1
- package/dist/module/subgraph/entities/token/token.d.ts +1 -0
- package/dist/module/subgraph/entities/token/token.d.ts.map +1 -1
- package/dist/module/subgraph/entities/token/tokens.generated.d.ts +2 -0
- package/dist/module/subgraph/entities/token/tokens.generated.d.ts.map +1 -1
- package/dist/module/subgraph/entities/token/tokens.generated.js +1 -1
- package/dist/module/subgraph/entities/token/tokens.generated.js.map +1 -1
- package/dist/module/subgraph/entities/tokenStatistic/tokenStatistic.d.ts +1 -0
- package/dist/module/subgraph/entities/tokenStatistic/tokenStatistic.d.ts.map +1 -1
- package/dist/module/subgraph/entities/tokenStatistic/tokenStatistics.generated.d.ts +2 -0
- package/dist/module/subgraph/entities/tokenStatistic/tokenStatistics.generated.d.ts.map +1 -1
- package/dist/module/subgraph/entities/tokenStatistic/tokenStatistics.generated.js +1 -1
- package/dist/module/subgraph/entities/tokenStatistic/tokenStatistics.generated.js.map +1 -1
- package/dist/module/subgraph/events/events.d.ts +1 -0
- package/dist/module/subgraph/events/events.d.ts.map +1 -1
- package/dist/module/subgraph/events/events.generated.d.ts +118 -3
- package/dist/module/subgraph/events/events.generated.d.ts.map +1 -1
- package/dist/module/subgraph/events/events.generated.js +37 -36
- package/dist/module/subgraph/events/events.generated.js.map +1 -1
- package/dist/module/subgraph/events/flowUpdatedEvent.d.ts +1 -0
- package/dist/module/subgraph/events/flowUpdatedEvent.d.ts.map +1 -1
- package/dist/module/subgraph/events/indexUpdatedEvent.d.ts +1 -0
- package/dist/module/subgraph/events/indexUpdatedEvent.d.ts.map +1 -1
- package/dist/module/subgraph/events/subscriptionUnitsUpdatedEvents.d.ts +1 -0
- package/dist/module/subgraph/events/subscriptionUnitsUpdatedEvents.d.ts.map +1 -1
- package/dist/module/subgraph/meta/meta.d.ts +15 -0
- package/dist/module/subgraph/meta/meta.d.ts.map +1 -0
- package/dist/module/subgraph/meta/meta.generated.d.ts +19 -0
- package/dist/module/subgraph/meta/meta.generated.d.ts.map +1 -0
- package/dist/module/subgraph/meta/meta.generated.js +2 -0
- package/dist/module/subgraph/meta/meta.generated.js.map +1 -0
- package/dist/module/subgraph/meta/meta.js +16 -0
- package/dist/module/subgraph/meta/meta.js.map +1 -0
- package/dist/module/subgraph/queries/getAllEvents.generated.d.ts +12 -0
- package/dist/module/subgraph/queries/getAllEvents.generated.d.ts.map +1 -1
- package/dist/module/subgraph/queries/getAllEvents.generated.js +1 -1
- package/dist/module/subgraph/queries/getAllEvents.generated.js.map +1 -1
- package/dist/module/subgraph/schema.generated.d.ts +817 -5
- package/dist/module/subgraph/schema.generated.d.ts.map +1 -1
- package/dist/module/subgraph/subgraphQueryHandler.d.ts +6 -3
- package/dist/module/subgraph/subgraphQueryHandler.d.ts.map +1 -1
- package/dist/module/subgraph/subgraphQueryHandler.js +31 -17
- package/dist/module/subgraph/subgraphQueryHandler.js.map +1 -1
- package/dist/module/typechain/IConstantFlowAgreementV1.d.ts +187 -5
- package/dist/module/typechain/IConstantFlowAgreementV1.d.ts.map +1 -1
- package/dist/module/typechain/ISETH.d.ts +1068 -0
- package/dist/module/typechain/ISETH.d.ts.map +1 -0
- package/dist/module/typechain/ISETH.js +2 -0
- package/dist/module/typechain/ISETH.js.map +1 -0
- package/dist/module/typechain/SuperfluidGovernanceII.d.ts +617 -0
- package/dist/module/typechain/SuperfluidGovernanceII.d.ts.map +1 -0
- package/dist/module/typechain/SuperfluidGovernanceII.js +2 -0
- package/dist/module/typechain/SuperfluidGovernanceII.js.map +1 -0
- package/dist/module/typechain/factories/IConstantFlowAgreementV1__factory.d.ts.map +1 -1
- package/dist/module/typechain/factories/IConstantFlowAgreementV1__factory.js +335 -2
- package/dist/module/typechain/factories/IConstantFlowAgreementV1__factory.js.map +1 -1
- package/dist/module/typechain/factories/ISETH__factory.d.ts +36 -0
- package/dist/module/typechain/factories/ISETH__factory.d.ts.map +1 -0
- package/dist/module/typechain/factories/ISETH__factory.js +1618 -0
- package/dist/module/typechain/factories/ISETH__factory.js.map +1 -0
- package/dist/module/typechain/factories/SuperfluidGovernanceII__factory.d.ts +36 -0
- package/dist/module/typechain/factories/SuperfluidGovernanceII__factory.d.ts.map +1 -0
- package/dist/module/typechain/factories/SuperfluidGovernanceII__factory.js +935 -0
- package/dist/module/typechain/factories/SuperfluidGovernanceII__factory.js.map +1 -0
- package/dist/module/typechain/index.d.ts +4 -0
- package/dist/module/typechain/index.d.ts.map +1 -1
- package/dist/module/typechain/index.js +2 -0
- package/dist/module/typechain/index.js.map +1 -1
- package/dist/module/utils.d.ts +15 -13
- package/dist/module/utils.d.ts.map +1 -1
- package/dist/module/utils.js +27 -15
- package/dist/module/utils.js.map +1 -1
- package/package.json +11 -41
- package/dist/main/Token.d.ts.map +0 -1
- package/dist/main/Token.js.map +0 -1
- package/dist/module/Token.d.ts.map +0 -1
- package/dist/module/Token.js.map +0 -1
|
@@ -8,11 +8,11 @@ const Operation_1 = __importDefault(require("./Operation"));
|
|
|
8
8
|
const SFError_1 = require("./SFError");
|
|
9
9
|
const ERC20WithTokenInfo_json_1 = __importDefault(require("./abi/ERC20WithTokenInfo.json"));
|
|
10
10
|
const utils_1 = require("./utils");
|
|
11
|
-
class
|
|
11
|
+
class ERC20Token {
|
|
12
12
|
constructor(address) {
|
|
13
|
-
|
|
13
|
+
/** ### ERC20 Token Contract Read Functions ### */
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* Returns the allowance the `owner` has granted the `spender`.
|
|
16
16
|
* @param owner the owner who has allotted the allowance
|
|
17
17
|
* @param spender the spender who has received the allowance
|
|
18
18
|
* @param providerOrSigner a provider or signer for executing a web3 call
|
|
@@ -22,7 +22,7 @@ class Token {
|
|
|
22
22
|
const normalizedOwner = (0, utils_1.normalizeAddress)(owner);
|
|
23
23
|
const normalizedSpender = (0, utils_1.normalizeAddress)(spender);
|
|
24
24
|
try {
|
|
25
|
-
const allowance = await this.
|
|
25
|
+
const allowance = await this.contract
|
|
26
26
|
.connect(providerOrSigner)
|
|
27
27
|
.allowance(normalizedOwner, normalizedSpender);
|
|
28
28
|
return allowance.toString();
|
|
@@ -36,7 +36,7 @@ class Token {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
39
|
+
* Returns the ERC20 balanceOf the `account`, this can't be negative and will just display 0.
|
|
40
40
|
* @param account the account you would like to query
|
|
41
41
|
* @param providerOrSigner a provider or signer for executing a web3 call
|
|
42
42
|
* @returns {Promise<string>} the token balance of `account`
|
|
@@ -44,7 +44,7 @@ class Token {
|
|
|
44
44
|
this.balanceOf = async ({ account, providerOrSigner, }) => {
|
|
45
45
|
try {
|
|
46
46
|
const normalizedAccount = (0, utils_1.normalizeAddress)(account);
|
|
47
|
-
const balanceOf = await this.
|
|
47
|
+
const balanceOf = await this.contract
|
|
48
48
|
.connect(providerOrSigner)
|
|
49
49
|
.balanceOf(normalizedAccount);
|
|
50
50
|
return balanceOf.toString();
|
|
@@ -58,15 +58,13 @@ class Token {
|
|
|
58
58
|
}
|
|
59
59
|
};
|
|
60
60
|
/**
|
|
61
|
-
*
|
|
61
|
+
* Returns the token name
|
|
62
62
|
* @param providerOrSigner a provider or signer for executing a web3 call
|
|
63
63
|
* @returns {string} the token name
|
|
64
64
|
*/
|
|
65
65
|
this.name = async ({ providerOrSigner, }) => {
|
|
66
66
|
try {
|
|
67
|
-
const name = await this.
|
|
68
|
-
.connect(providerOrSigner)
|
|
69
|
-
.name();
|
|
67
|
+
const name = await this.contract.connect(providerOrSigner).name();
|
|
70
68
|
return name;
|
|
71
69
|
}
|
|
72
70
|
catch (err) {
|
|
@@ -78,13 +76,13 @@ class Token {
|
|
|
78
76
|
}
|
|
79
77
|
};
|
|
80
78
|
/**
|
|
81
|
-
*
|
|
79
|
+
* Returns the token symbol
|
|
82
80
|
* @param providerOrSigner a provider or signer for executing a web3 call
|
|
83
81
|
* @returns {string} the token symbol
|
|
84
82
|
*/
|
|
85
83
|
this.symbol = async ({ providerOrSigner, }) => {
|
|
86
84
|
try {
|
|
87
|
-
const symbol = await this.
|
|
85
|
+
const symbol = await this.contract
|
|
88
86
|
.connect(providerOrSigner)
|
|
89
87
|
.symbol();
|
|
90
88
|
return symbol;
|
|
@@ -98,13 +96,13 @@ class Token {
|
|
|
98
96
|
}
|
|
99
97
|
};
|
|
100
98
|
/**
|
|
101
|
-
*
|
|
99
|
+
* Returns the total supply of the token.
|
|
102
100
|
* @param providerOrSigner a provider or signer for executing a web3 call
|
|
103
101
|
* @returns {Promise<string>} the total supply of the token
|
|
104
102
|
*/
|
|
105
103
|
this.totalSupply = async ({ providerOrSigner, }) => {
|
|
106
104
|
try {
|
|
107
|
-
const totalSupply = await this.
|
|
105
|
+
const totalSupply = await this.contract
|
|
108
106
|
.connect(providerOrSigner)
|
|
109
107
|
.totalSupply();
|
|
110
108
|
return totalSupply.toString();
|
|
@@ -117,50 +115,48 @@ class Token {
|
|
|
117
115
|
});
|
|
118
116
|
}
|
|
119
117
|
};
|
|
120
|
-
|
|
118
|
+
/** ### ERC20 Token Contract Write Functions ### */
|
|
121
119
|
/**
|
|
122
|
-
*
|
|
120
|
+
* Approve `receiver` to spend `amount` tokens.
|
|
123
121
|
* @param receiver The receiver approved.
|
|
124
122
|
* @param amount The amount approved.
|
|
125
123
|
* @param overrides ethers overrides object for more control over the transaction sent.
|
|
126
124
|
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
127
125
|
*/
|
|
128
|
-
this.approve = (
|
|
129
|
-
const normalizedReceiver = (0, utils_1.normalizeAddress)(receiver);
|
|
130
|
-
const txn = this.
|
|
126
|
+
this.approve = (params) => {
|
|
127
|
+
const normalizedReceiver = (0, utils_1.normalizeAddress)(params.receiver);
|
|
128
|
+
const txn = this.contract.populateTransaction.approve(normalizedReceiver, params.amount, params.overrides || {});
|
|
131
129
|
return new Operation_1.default(txn, "ERC20_APPROVE");
|
|
132
130
|
};
|
|
133
131
|
/**
|
|
134
|
-
*
|
|
132
|
+
* Transfer `receiver` `amount` tokens.
|
|
135
133
|
* @param receiver The receiver of the transfer.
|
|
136
134
|
* @param amount The amount to be transferred.
|
|
137
135
|
* @param overrides ethers overrides object for more control over the transaction sent.
|
|
138
136
|
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
139
137
|
*/
|
|
140
|
-
this.transfer = (
|
|
141
|
-
const normalizedReceiver = (0, utils_1.normalizeAddress)(receiver);
|
|
142
|
-
const txn = this.
|
|
138
|
+
this.transfer = (params) => {
|
|
139
|
+
const normalizedReceiver = (0, utils_1.normalizeAddress)(params.receiver);
|
|
140
|
+
const txn = this.contract.populateTransaction.transfer(normalizedReceiver, params.amount, params.overrides || {});
|
|
143
141
|
return new Operation_1.default(txn, "UNSUPPORTED");
|
|
144
142
|
};
|
|
145
143
|
/**
|
|
146
|
-
*
|
|
144
|
+
* Transfer from `sender` to `receiver` `amount` tokens.
|
|
147
145
|
* @param sender The sender of the transfer.
|
|
148
146
|
* @param receiver The receiver of the transfer.
|
|
149
147
|
* @param amount The amount to be transferred.
|
|
150
148
|
* @param overrides ethers overrides object for more control over the transaction sent.
|
|
151
149
|
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
152
150
|
*/
|
|
153
|
-
this.transferFrom = (
|
|
154
|
-
const normalizedSender = (0, utils_1.normalizeAddress)(sender);
|
|
155
|
-
const normalizedReceiver = (0, utils_1.normalizeAddress)(receiver);
|
|
156
|
-
const txn = this.
|
|
151
|
+
this.transferFrom = (params) => {
|
|
152
|
+
const normalizedSender = (0, utils_1.normalizeAddress)(params.sender);
|
|
153
|
+
const normalizedReceiver = (0, utils_1.normalizeAddress)(params.receiver);
|
|
154
|
+
const txn = this.contract.populateTransaction.transferFrom(normalizedSender, normalizedReceiver, params.amount, params.overrides || {});
|
|
157
155
|
return new Operation_1.default(txn, "ERC20_TRANSFER_FROM");
|
|
158
156
|
};
|
|
159
157
|
this.address = address;
|
|
160
|
-
|
|
161
|
-
get tokenContract() {
|
|
162
|
-
return new ethers_1.ethers.Contract(this.address, ERC20WithTokenInfo_json_1.default.abi);
|
|
158
|
+
this.contract = new ethers_1.ethers.Contract(this.address, ERC20WithTokenInfo_json_1.default.abi);
|
|
163
159
|
}
|
|
164
160
|
}
|
|
165
|
-
exports.default =
|
|
166
|
-
//# sourceMappingURL=
|
|
161
|
+
exports.default = ERC20Token;
|
|
162
|
+
//# sourceMappingURL=ERC20Token.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ERC20Token.js","sourceRoot":"","sources":["../../src/ERC20Token.ts"],"names":[],"mappings":";;;;;AAAA,mCAAgC;AAEhC,4DAAoC;AACpC,uCAAoC;AACpC,4FAAkE;AAGlE,mCAA2C;AAE3C,MAAqB,UAAU;IAI3B,YAAY,OAAe;QAQ3B,kDAAkD;QAElD;;;;;;WAMG;QACH,cAAS,GAAG,KAAK,EAAE,EACf,KAAK,EACL,OAAO,EACP,gBAAgB,GAKnB,EAAmB,EAAE;YAClB,MAAM,eAAe,GAAG,IAAA,wBAAgB,EAAC,KAAK,CAAC,CAAC;YAChD,MAAM,iBAAiB,GAAG,IAAA,wBAAgB,EAAC,OAAO,CAAC,CAAC;YACpD,IAAI;gBACA,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,QAAQ;qBAChC,OAAO,CAAC,gBAAgB,CAAC;qBACzB,SAAS,CAAC,eAAe,EAAE,iBAAiB,CAAC,CAAC;gBACnD,OAAO,SAAS,CAAC,QAAQ,EAAE,CAAC;aAC/B;YAAC,OA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AAG,GAAG,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC,QAAQ,CAClD,kBAAkB,EAClB,MAAM,CAAC,MAAM,EACb,MAAM,CAAC,SAAS,IAAI,EAAE,CACzB,CAAC;YACF,OAAO,IAAI,mBAAS,CAAC,GAAG,EAAE,aAAa,CAAC,CAAC;QAC7C,CAAC,CAAC;QAEF;;;;;;;WAOG;QACH,iBAAY,GAAG,CAAC,MAA2B,EAAa,EAAE;YACtD,MAAM,gBAAgB,GAAG,IAAA,wBAAgB,EAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YACzD,MAAM,kBAAkB,GAAG,IAAA,wBAAgB,EAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC7D,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC,YAAY,CACtD,gBAAgB,EAChB,kBAAkB,EAClB,MAAM,CAAC,MAAM,EACb,MAAM,CAAC,SAAS,IAAI,EAAE,CACzB,CAAC;YACF,OAAO,IAAI,mBAAS,CAAC,GAAG,EAAE,qBAAqB,CAAC,CAAC;QACrD,CAAC,CAAC;QAjME,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,CAAC,QAAQ,GAAG,IAAI,eAAM,CAAC,QAAQ,CAC/B,IAAI,CAAC,OAAO,EACZ,iCAAqB,CAAC,GAAG,CACN,CAAC;IAC5B,CAAC;CA6LJ;AAvMD,6BAuMC"}
|
package/dist/main/Framework.d.ts
CHANGED
|
@@ -4,12 +4,13 @@ import { ethers } from "ethers";
|
|
|
4
4
|
import Web3 from "web3";
|
|
5
5
|
import BatchCall from "./BatchCall";
|
|
6
6
|
import ConstantFlowAgreementV1 from "./ConstantFlowAgreementV1";
|
|
7
|
+
import Governance from "./Governance";
|
|
7
8
|
import Host from "./Host";
|
|
8
9
|
import InstantDistributionAgreementV1 from "./InstantDistributionAgreementV1";
|
|
9
10
|
import Operation from "./Operation";
|
|
10
11
|
import Query from "./Query";
|
|
11
|
-
import SuperToken from "./SuperToken";
|
|
12
|
-
import { IConfig, ISignerConstructorOptions } from "./interfaces";
|
|
12
|
+
import SuperToken, { NativeAssetSuperToken, PureSuperToken, WrapperSuperToken } from "./SuperToken";
|
|
13
|
+
import { IConfig, IContracts, ISignerConstructorOptions } from "./interfaces";
|
|
13
14
|
import { DataMode } from "./types";
|
|
14
15
|
declare type SupportedProvider = ethers.providers.Provider | (typeof ethers & HardhatEthersHelpers) | Web3;
|
|
15
16
|
export interface IFrameworkOptions {
|
|
@@ -31,19 +32,21 @@ export interface IFrameworkSettings {
|
|
|
31
32
|
config: IConfig;
|
|
32
33
|
}
|
|
33
34
|
/**
|
|
34
|
-
*
|
|
35
|
+
* Superfluid Framework Class
|
|
35
36
|
* @description The entrypoint for the SDK-core, `create` an instance of this for full functionality.
|
|
36
37
|
*/
|
|
37
38
|
export default class Framework {
|
|
38
39
|
readonly userInputOptions: IFrameworkOptions;
|
|
39
40
|
settings: IFrameworkSettings;
|
|
41
|
+
contracts: IContracts;
|
|
40
42
|
cfaV1: ConstantFlowAgreementV1;
|
|
43
|
+
governance: Governance;
|
|
41
44
|
host: Host;
|
|
42
45
|
idaV1: InstantDistributionAgreementV1;
|
|
43
46
|
query: Query;
|
|
44
47
|
private constructor();
|
|
45
48
|
/**
|
|
46
|
-
*
|
|
49
|
+
* Creates the Framework object based on user provided `options`.
|
|
47
50
|
* @param options.chainId the chainId of your desired network (e.g. 137 = matic)
|
|
48
51
|
* @param options.customSubgraphQueriesEndpoint your custom subgraph endpoint
|
|
49
52
|
* @param options.dataMode the data mode you'd like the framework to use (SUBGRAPH_ONLY, SUBGRAPH_WEB3, WEB3_ONLY)
|
|
@@ -55,7 +58,7 @@ export default class Framework {
|
|
|
55
58
|
*/
|
|
56
59
|
static create: (options: IFrameworkOptions) => Promise<Framework>;
|
|
57
60
|
/**
|
|
58
|
-
*
|
|
61
|
+
* Create a signer which can be used to sign transactions.
|
|
59
62
|
* @param options.web3Provider a Web3Provider object (e.g. client side - metamask, web3modal)
|
|
60
63
|
* @param options.provider an ethers Provider object (e.g. via Hardhat ethers)
|
|
61
64
|
* @param options.privateKey a test account private key
|
|
@@ -64,17 +67,41 @@ export default class Framework {
|
|
|
64
67
|
*/
|
|
65
68
|
createSigner: (options: ISignerConstructorOptions) => Signer;
|
|
66
69
|
/**
|
|
67
|
-
*
|
|
70
|
+
* Create a `BatchCall` class from the `Framework`.
|
|
68
71
|
* @param operations the list of operations to execute
|
|
69
72
|
* @returns `BatchCall` class
|
|
70
73
|
*/
|
|
71
74
|
batchCall: (operations: Operation[]) => BatchCall;
|
|
72
75
|
/**
|
|
73
|
-
*
|
|
76
|
+
* Loads `NativeAssetSuperToken` class from the `Framework`. Will throw if token is not NativeAssetSuperToken.
|
|
77
|
+
* @param tokenAddressOrSymbol
|
|
78
|
+
* @returns `NativeAssetSuperToken` class
|
|
79
|
+
*/
|
|
80
|
+
loadNativeAssetSuperToken: (tokenAddressOrSymbol: string) => Promise<NativeAssetSuperToken>;
|
|
81
|
+
/**
|
|
82
|
+
* Loads `PureSuperToken` class from the `Framework`. Will throw if token is not PureSuperToken.
|
|
83
|
+
* @param tokenAddressOrSymbol
|
|
84
|
+
* @returns `PureSuperToken` class
|
|
85
|
+
*/
|
|
86
|
+
loadPureSuperToken: (tokenAddressOrSymbol: string) => Promise<PureSuperToken>;
|
|
87
|
+
/**
|
|
88
|
+
* Loads `WrapperSuperToken` class from the `Framework`. Will throw if token is not WrapperSuperToken.
|
|
89
|
+
* @param tokenAddressOrSymbol
|
|
90
|
+
* @returns `WrapperSuperToken` class
|
|
91
|
+
*/
|
|
92
|
+
loadWrapperSuperToken: (tokenAddressOrSymbol: string) => Promise<WrapperSuperToken>;
|
|
93
|
+
/**
|
|
94
|
+
* Loads `SuperToken` class from the `Framework`. Use this when you're unsure of the token type.
|
|
74
95
|
* @param tokenAddressOrSymbol the `SuperToken` address or symbol (if symbol, it must be on the resolver)
|
|
75
96
|
* @returns `SuperToken` class
|
|
76
97
|
*/
|
|
77
98
|
loadSuperToken: (tokenAddressOrSymbol: string) => Promise<SuperToken>;
|
|
99
|
+
/**
|
|
100
|
+
* Try to get the token address given an address (returns if valid) or the token symbol via the resolver.
|
|
101
|
+
* @param tokenAddressOrSymbol
|
|
102
|
+
* @returns token address
|
|
103
|
+
*/
|
|
104
|
+
private _tryGetTokenAddress;
|
|
78
105
|
}
|
|
79
106
|
export {};
|
|
80
107
|
//# sourceMappingURL=Framework.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Framework.d.ts","sourceRoot":"","sources":["../../src/Framework.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,8BAA8B,MAAM,kCAAkC,CAAC;AAC9E,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,KAAK,MAAM,SAAS,CAAC;AAE5B,OAAO,UAAU,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Framework.d.ts","sourceRoot":"","sources":["../../src/Framework.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gCAAgC,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,UAAU,MAAM,cAAc,CAAC;AAC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AAE,uBAAuB,CAAC;IAC/B,UAAU,EAAE,UAAU,CAAC;IACvB,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,EAAE,8BAA8B,CAAC;IACtC,KAAK,EAAE,KAAK,CAAC;IAEb,OAAO;IAiCP;;;;;;;;;;OAUG;IACH,MAAM,CAAC,MAAM,YAAmB,iBAAiB,wBAwG/C;IAEF;;;;;;;OAOG;IACH,YAAY,YAAa,yBAAyB,KAAG,MAAM,CAqCzD;IAEF;;;;OAIG;IACH,SAAS,eAAgB,SAAS,EAAE,eAKlC;IAEF;;;;OAIG;IACH,yBAAyB,yBACC,MAAM,KAC7B,QAAQ,qBAAqB,CAAC,CAa/B;IAEF;;;;OAIG;IACH,kBAAkB,yBACQ,MAAM,KAC7B,QAAQ,cAAc,CAAC,CAaxB;IAEF;;;;OAIG;IACH,qBAAqB,yBACK,MAAM,KAC7B,QAAQ,iBAAiB,CAAC,CAY3B;IAEF;;;;OAIG;IACH,cAAc,yBACY,MAAM,KAC7B,QAAQ,UAAU,CAAC,CAMpB;IAEF;;;;OAIG;IACH,OAAO,CAAC,mBAAmB,CAiCzB;CACL"}
|
package/dist/main/Framework.js
CHANGED
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
7
|
const ethers_1 = require("ethers");
|
|
8
8
|
const BatchCall_1 = __importDefault(require("./BatchCall"));
|
|
9
9
|
const ConstantFlowAgreementV1_1 = __importDefault(require("./ConstantFlowAgreementV1"));
|
|
10
|
+
const Governance_1 = __importDefault(require("./Governance"));
|
|
10
11
|
const Host_1 = __importDefault(require("./Host"));
|
|
11
12
|
const InstantDistributionAgreementV1_1 = __importDefault(require("./InstantDistributionAgreementV1"));
|
|
12
13
|
const Query_1 = __importDefault(require("./Query"));
|
|
@@ -18,13 +19,13 @@ const constants_1 = require("./constants");
|
|
|
18
19
|
const frameworkHelpers_1 = require("./frameworkHelpers");
|
|
19
20
|
const utils_1 = require("./utils");
|
|
20
21
|
/**
|
|
21
|
-
*
|
|
22
|
+
* Superfluid Framework Class
|
|
22
23
|
* @description The entrypoint for the SDK-core, `create` an instance of this for full functionality.
|
|
23
24
|
*/
|
|
24
25
|
class Framework {
|
|
25
26
|
constructor(options, settings) {
|
|
26
27
|
/**
|
|
27
|
-
*
|
|
28
|
+
* Create a signer which can be used to sign transactions.
|
|
28
29
|
* @param options.web3Provider a Web3Provider object (e.g. client side - metamask, web3modal)
|
|
29
30
|
* @param options.provider an ethers Provider object (e.g. via Hardhat ethers)
|
|
30
31
|
* @param options.privateKey a test account private key
|
|
@@ -65,7 +66,7 @@ class Framework {
|
|
|
65
66
|
});
|
|
66
67
|
};
|
|
67
68
|
/**
|
|
68
|
-
*
|
|
69
|
+
* Create a `BatchCall` class from the `Framework`.
|
|
69
70
|
* @param operations the list of operations to execute
|
|
70
71
|
* @returns `BatchCall` class
|
|
71
72
|
*/
|
|
@@ -76,15 +77,78 @@ class Framework {
|
|
|
76
77
|
});
|
|
77
78
|
};
|
|
78
79
|
/**
|
|
79
|
-
*
|
|
80
|
+
* Loads `NativeAssetSuperToken` class from the `Framework`. Will throw if token is not NativeAssetSuperToken.
|
|
81
|
+
* @param tokenAddressOrSymbol
|
|
82
|
+
* @returns `NativeAssetSuperToken` class
|
|
83
|
+
*/
|
|
84
|
+
this.loadNativeAssetSuperToken = async (tokenAddressOrSymbol) => {
|
|
85
|
+
const superToken = await this.loadSuperToken(tokenAddressOrSymbol);
|
|
86
|
+
// The NativeAssetSuperToken class should have the nativeTokenSymbol property
|
|
87
|
+
const isNativeAssetSuperToken = !!superToken.nativeTokenSymbol;
|
|
88
|
+
if (!isNativeAssetSuperToken) {
|
|
89
|
+
throw new SFError_1.SFError({
|
|
90
|
+
type: "SUPERTOKEN_INITIALIZATION",
|
|
91
|
+
customMessage: "The token is not a native asset supertoken.",
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
return superToken;
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* Loads `PureSuperToken` class from the `Framework`. Will throw if token is not PureSuperToken.
|
|
98
|
+
* @param tokenAddressOrSymbol
|
|
99
|
+
* @returns `PureSuperToken` class
|
|
100
|
+
*/
|
|
101
|
+
this.loadPureSuperToken = async (tokenAddressOrSymbol) => {
|
|
102
|
+
const superToken = await this.loadSuperToken(tokenAddressOrSymbol);
|
|
103
|
+
// The PureSuperToken class should not have the downgrade (and upgrade) function
|
|
104
|
+
// we can just check if downgrade doesn't exist
|
|
105
|
+
const isPureSuperToken = !!superToken.downgrade === false;
|
|
106
|
+
if (!isPureSuperToken) {
|
|
107
|
+
throw new SFError_1.SFError({
|
|
108
|
+
type: "SUPERTOKEN_INITIALIZATION",
|
|
109
|
+
customMessage: "The token is not a pure supertoken.",
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
return superToken;
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* Loads `WrapperSuperToken` class from the `Framework`. Will throw if token is not WrapperSuperToken.
|
|
116
|
+
* @param tokenAddressOrSymbol
|
|
117
|
+
* @returns `WrapperSuperToken` class
|
|
118
|
+
*/
|
|
119
|
+
this.loadWrapperSuperToken = async (tokenAddressOrSymbol) => {
|
|
120
|
+
const superToken = await this.loadSuperToken(tokenAddressOrSymbol);
|
|
121
|
+
// The WrapperSuperToken class should have the underlyingToken property
|
|
122
|
+
const isWrapperSuperToken = !!superToken.underlyingToken;
|
|
123
|
+
if (!isWrapperSuperToken) {
|
|
124
|
+
throw new SFError_1.SFError({
|
|
125
|
+
type: "SUPERTOKEN_INITIALIZATION",
|
|
126
|
+
customMessage: "The token is not a wrapper supertoken.",
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
return superToken;
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* Loads `SuperToken` class from the `Framework`. Use this when you're unsure of the token type.
|
|
80
133
|
* @param tokenAddressOrSymbol the `SuperToken` address or symbol (if symbol, it must be on the resolver)
|
|
81
134
|
* @returns `SuperToken` class
|
|
82
135
|
*/
|
|
83
136
|
this.loadSuperToken = async (tokenAddressOrSymbol) => {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
address
|
|
137
|
+
const address = await this._tryGetTokenAddress(tokenAddressOrSymbol);
|
|
138
|
+
return await SuperToken_1.default.create({
|
|
139
|
+
...this.settings,
|
|
140
|
+
address,
|
|
141
|
+
});
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* Try to get the token address given an address (returns if valid) or the token symbol via the resolver.
|
|
145
|
+
* @param tokenAddressOrSymbol
|
|
146
|
+
* @returns token address
|
|
147
|
+
*/
|
|
148
|
+
this._tryGetTokenAddress = async (tokenAddressOrSymbol) => {
|
|
149
|
+
const isInputValidAddress = ethers_1.ethers.utils.isAddress(tokenAddressOrSymbol);
|
|
150
|
+
if (isInputValidAddress) {
|
|
151
|
+
return tokenAddressOrSymbol;
|
|
88
152
|
}
|
|
89
153
|
else {
|
|
90
154
|
try {
|
|
@@ -93,8 +157,7 @@ class Framework {
|
|
|
93
157
|
"." +
|
|
94
158
|
tokenAddressOrSymbol;
|
|
95
159
|
const resolver = new ethers_1.ethers.Contract(this.settings.config.resolverAddress, IResolver_json_1.default.abi, this.settings.provider);
|
|
96
|
-
|
|
97
|
-
address = tokenAddress;
|
|
160
|
+
return await resolver.get(superTokenKey);
|
|
98
161
|
}
|
|
99
162
|
catch (err) {
|
|
100
163
|
throw new SFError_1.SFError({
|
|
@@ -106,27 +169,32 @@ class Framework {
|
|
|
106
169
|
});
|
|
107
170
|
}
|
|
108
171
|
}
|
|
109
|
-
return await SuperToken_1.default.create({
|
|
110
|
-
...this.settings,
|
|
111
|
-
address,
|
|
112
|
-
});
|
|
113
172
|
};
|
|
114
173
|
this.userInputOptions = options;
|
|
115
174
|
this.settings = settings;
|
|
116
175
|
this.cfaV1 = new ConstantFlowAgreementV1_1.default({
|
|
117
176
|
config: this.settings.config,
|
|
118
177
|
});
|
|
178
|
+
this.governance = new Governance_1.default(this.settings.config.governanceAddress, this.settings.config.hostAddress);
|
|
119
179
|
this.host = new Host_1.default(this.settings.config.hostAddress);
|
|
120
180
|
this.idaV1 = new InstantDistributionAgreementV1_1.default({
|
|
121
181
|
config: this.settings.config,
|
|
122
182
|
});
|
|
123
183
|
this.query = new Query_1.default(this.settings);
|
|
184
|
+
const resolver = new ethers_1.ethers.Contract(this.settings.config.resolverAddress, IResolver_json_1.default.abi);
|
|
185
|
+
this.contracts = {
|
|
186
|
+
cfaV1: this.cfaV1.contract,
|
|
187
|
+
governance: this.governance.contract,
|
|
188
|
+
host: this.host.contract,
|
|
189
|
+
idaV1: this.idaV1.contract,
|
|
190
|
+
resolver,
|
|
191
|
+
};
|
|
124
192
|
}
|
|
125
193
|
}
|
|
126
194
|
exports.default = Framework;
|
|
127
195
|
_a = Framework;
|
|
128
196
|
/**
|
|
129
|
-
*
|
|
197
|
+
* Creates the Framework object based on user provided `options`.
|
|
130
198
|
* @param options.chainId the chainId of your desired network (e.g. 137 = matic)
|
|
131
199
|
* @param options.customSubgraphQueriesEndpoint your custom subgraph endpoint
|
|
132
200
|
* @param options.dataMode the data mode you'd like the framework to use (SUBGRAPH_ONLY, SUBGRAPH_WEB3, WEB3_ONLY)
|
|
@@ -173,6 +241,7 @@ Framework.create = async (options) => {
|
|
|
173
241
|
subgraphAPIEndpoint: "",
|
|
174
242
|
resolverAddress: "",
|
|
175
243
|
networkName: "",
|
|
244
|
+
nativeTokenSymbol: "",
|
|
176
245
|
};
|
|
177
246
|
const resolverAddress = options.resolverAddress
|
|
178
247
|
? options.resolverAddress
|
|
@@ -181,6 +250,9 @@ Framework.create = async (options) => {
|
|
|
181
250
|
const superfluidLoaderAddress = await resolver.get("SuperfluidLoader-v1");
|
|
182
251
|
const superfluidLoader = new ethers_1.ethers.Contract(superfluidLoaderAddress, SuperfluidLoader_json_1.default.abi, provider);
|
|
183
252
|
const framework = await superfluidLoader.loadFramework(releaseVersion);
|
|
253
|
+
const governanceAddress = await new Host_1.default(framework.superfluid).contract
|
|
254
|
+
.connect(provider)
|
|
255
|
+
.getGovernance();
|
|
184
256
|
const settings = {
|
|
185
257
|
chainId,
|
|
186
258
|
customSubgraphQueriesEndpoint,
|
|
@@ -193,6 +265,7 @@ Framework.create = async (options) => {
|
|
|
193
265
|
hostAddress: framework.superfluid,
|
|
194
266
|
cfaV1Address: framework.agreementCFAv1,
|
|
195
267
|
idaV1Address: framework.agreementIDAv1,
|
|
268
|
+
governanceAddress,
|
|
196
269
|
},
|
|
197
270
|
};
|
|
198
271
|
return new Framework(options, settings);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Framework.js","sourceRoot":"","sources":["../../src/Framework.ts"],"names":[],"mappings":";;;;;;AAEA,mCAAgC;AAGhC,4DAAoC;AACpC,wFAAgE;AAChE,kDAA0B;AAC1B,sGAA8E;AAE9E,oDAA4B;AAC5B,uCAAoC;AACpC,
|
|
1
|
+
{"version":3,"file":"Framework.js","sourceRoot":"","sources":["../../src/Framework.ts"],"names":[],"mappings":";;;;;;AAEA,mCAAgC;AAGhC,4DAAoC;AACpC,wFAAgE;AAChE,8DAAsC;AACtC,kDAA0B;AAC1B,sGAA8E;AAE9E,oDAA4B;AAC5B,uCAAoC;AACpC,8DAIsB;AACtB,0EAAgD;AAChD,wFAA8D;AAC9D,2CAAgF;AAChF,yDAI4B;AAS5B,mCAA2D;AA6B3D;;;GAGG;AACH,MAAqB,SAAS;IAW1B,YACI,OAA0B,EAC1B,QAA4B;QAoJhC;;;;;;;WAOG;QACH,iBAAY,GAAG,CAAC,OAAkC,EAAU,EAAE;YAC1D,IACI,CAAC,OAAO,CAAC,UAAU;gBACnB,CAAC,OAAO,CAAC,QAAQ;gBACjB,CAAC,OAAO,CAAC,MAAM;gBACf,CAAC,OAAO,CAAC,YAAY,EACvB;gBACE,MAAM,IAAI,iBAAO,CAAC;oBACd,IAAI,EAAE,eAAe;oBACrB,aAAa,EACT,qDAAqD;iBAC5D,CAAC,CAAC;aACN;YAED,2B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EtB,MAAM,SAAS,GAAG,MAAM,gBAAgB,CAAC,aAAa,CAClD,cAAc,CACjB,CAAC;QACF,MAAM,iBAAiB,GAAG,MAAM,IAAI,cAAI,CACpC,SAAS,CAAC,UAAU,CACvB,CAAC,QAAQ;aACL,OAAO,CAAC,QAAQ,CAAC;aACjB,aAAa,EAAE,CAAC;QAErB,MAAM,QAAQ,GAAuB;YACjC,OAAO;YACP,6BAA6B;YAC7B,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,eAAe;YAC7C,sBAAsB,EAAE,OAAO,CAAC,sBAAsB,IAAI,IAAI;YAC9D,QAAQ;YACR,WAAW;YACX,MAAM,EAAE;gBACJ,eAAe;gBACf,WAAW,EAAE,SAAS,CAAC,UAAU;gBACjC,YAAY,EAAE,SAAS,CAAC,cAAc;gBACtC,YAAY,EAAE,SAAS,CAAC,cAAc;gBACtC,iBAAiB;aACpB;SACJ,CAAC;QAEF,OAAO,IAAI,SAAS,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;KAC3C;IAAC,OAAO,GAAG,EAAE;QACV,MAAM,IAAI,iBAAO,CAAC;YACd,IAAI,EAAE,0BAA0B;YAChC,aAAa,EAAE,+CAA+C;YAC9D,WAAW,EAAE,GAAG;SACnB,CAAC,CAAC;KACN;AACL,CAAE,CAAA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { IGetGovernanceParametersParams, IWeb3GovernanceParams } from "./interfaces";
|
|
2
|
+
import { SuperfluidGovernanceII } from "./typechain/SuperfluidGovernanceII";
|
|
3
|
+
export default class Governance {
|
|
4
|
+
contract: SuperfluidGovernanceII;
|
|
5
|
+
hostAddress: string;
|
|
6
|
+
constructor(govAddress: string, hostAddress: string);
|
|
7
|
+
/**
|
|
8
|
+
* Returns the 3Ps config for the specified token (or default) - the liquidation period and patrician period
|
|
9
|
+
* @see https://docs.superfluid.finance/superfluid/sentinels/liquidations-and-toga
|
|
10
|
+
* @param providerOrSigner a provider or signer for executing a web3 call
|
|
11
|
+
* @param token specified governance parameter token
|
|
12
|
+
* @returns {Object} liquidationPeriod and patricianPeriod as strings
|
|
13
|
+
*/
|
|
14
|
+
getPPPConfig: ({ providerOrSigner, token, }: IGetGovernanceParametersParams) => Promise<{
|
|
15
|
+
liquidationPeriod: string;
|
|
16
|
+
patricianPeriod: string;
|
|
17
|
+
}>;
|
|
18
|
+
/**
|
|
19
|
+
* Returns the reward address for the specified token (or default)
|
|
20
|
+
* @param providerOrSigner a provider or signer for executing a web3 call
|
|
21
|
+
* @param token specified governance parameter token
|
|
22
|
+
* @returns {string} the reward address
|
|
23
|
+
*/
|
|
24
|
+
getRewardAddress: ({ providerOrSigner, token, }: IGetGovernanceParametersParams) => Promise<string>;
|
|
25
|
+
/**
|
|
26
|
+
* Returns the minimum deposit for the specified token (or default)
|
|
27
|
+
* @param providerOrSigner a provider or signer for executing a web3 call
|
|
28
|
+
* @param token specified governance parameter token
|
|
29
|
+
* @returns {string} minimum deposit
|
|
30
|
+
*/
|
|
31
|
+
getMinimumDeposit: ({ providerOrSigner, token, }: IGetGovernanceParametersParams) => Promise<string>;
|
|
32
|
+
/**
|
|
33
|
+
* Returns the relevant governance parameters
|
|
34
|
+
* @param providerOrSigner a provider or signer for executing a web3 call
|
|
35
|
+
* @param token specified governance parameter token
|
|
36
|
+
* @returns {Object} liquidationPeriod, patricianPeriod, rewardAddress and minimumDeposit
|
|
37
|
+
*/
|
|
38
|
+
getGovernanceParameters: ({ providerOrSigner, token, }: IGetGovernanceParametersParams) => Promise<IWeb3GovernanceParams>;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=Governance.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Governance.d.ts","sourceRoot":"","sources":["../../src/Governance.ts"],"names":[],"mappings":"AAGA,OAAO,EACH,8BAA8B,EAC9B,qBAAqB,EACxB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAE5E,MAAM,CAAC,OAAO,OAAO,UAAU;IAC3B,QAAQ,EAAE,sBAAsB,CAAC;IACjC,WAAW,EAAE,MAAM,CAAC;gBAER,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM;IAQnD;;;;;;OAMG;IACH,YAAY,iCAGT,8BAA8B;;;OAQ/B;IAEF;;;;;OAKG;IACH,gBAAgB,iCAGb,8BAA8B,qBAI/B;IAEF;;;;;OAKG;IACH,iBAAiB,iCAGd,8BAA8B,qBAK/B;IAEF;;;;;OAKG;IACH,uBAAuB,iCAGpB,8BAA8B,KAAG,QAAQ,qBAAqB,CAAC,CAqBhE;CACL"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const ethers_1 = require("ethers");
|
|
7
|
+
const SuperfluidGovernanceII_json_1 = __importDefault(require("./abi/SuperfluidGovernanceII.json"));
|
|
8
|
+
class Governance {
|
|
9
|
+
constructor(govAddress, hostAddress) {
|
|
10
|
+
/**
|
|
11
|
+
* Returns the 3Ps config for the specified token (or default) - the liquidation period and patrician period
|
|
12
|
+
* @see https://docs.superfluid.finance/superfluid/sentinels/liquidations-and-toga
|
|
13
|
+
* @param providerOrSigner a provider or signer for executing a web3 call
|
|
14
|
+
* @param token specified governance parameter token
|
|
15
|
+
* @returns {Object} liquidationPeriod and patricianPeriod as strings
|
|
16
|
+
*/
|
|
17
|
+
this.getPPPConfig = async ({ providerOrSigner, token = ethers_1.ethers.constants.AddressZero, }) => {
|
|
18
|
+
const { liquidationPeriod, patricianPeriod } = await this.contract
|
|
19
|
+
.connect(providerOrSigner)
|
|
20
|
+
.getPPPConfig(this.hostAddress, token);
|
|
21
|
+
return {
|
|
22
|
+
liquidationPeriod: liquidationPeriod.toString(),
|
|
23
|
+
patricianPeriod: patricianPeriod.toString(),
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Returns the reward address for the specified token (or default)
|
|
28
|
+
* @param providerOrSigner a provider or signer for executing a web3 call
|
|
29
|
+
* @param token specified governance parameter token
|
|
30
|
+
* @returns {string} the reward address
|
|
31
|
+
*/
|
|
32
|
+
this.getRewardAddress = async ({ providerOrSigner, token = ethers_1.ethers.constants.AddressZero, }) => {
|
|
33
|
+
return await this.contract
|
|
34
|
+
.connect(providerOrSigner)
|
|
35
|
+
.getRewardAddress(this.hostAddress, token);
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Returns the minimum deposit for the specified token (or default)
|
|
39
|
+
* @param providerOrSigner a provider or signer for executing a web3 call
|
|
40
|
+
* @param token specified governance parameter token
|
|
41
|
+
* @returns {string} minimum deposit
|
|
42
|
+
*/
|
|
43
|
+
this.getMinimumDeposit = async ({ providerOrSigner, token = ethers_1.ethers.constants.AddressZero, }) => {
|
|
44
|
+
const superTokenMinimumDeposit = await this.contract
|
|
45
|
+
.connect(providerOrSigner)
|
|
46
|
+
.getSuperTokenMinimumDeposit(this.hostAddress, token);
|
|
47
|
+
return superTokenMinimumDeposit.toString();
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Returns the relevant governance parameters
|
|
51
|
+
* @param providerOrSigner a provider or signer for executing a web3 call
|
|
52
|
+
* @param token specified governance parameter token
|
|
53
|
+
* @returns {Object} liquidationPeriod, patricianPeriod, rewardAddress and minimumDeposit
|
|
54
|
+
*/
|
|
55
|
+
this.getGovernanceParameters = async ({ providerOrSigner, token = ethers_1.ethers.constants.AddressZero, }) => {
|
|
56
|
+
const pppPromise = this.getPPPConfig({ providerOrSigner, token });
|
|
57
|
+
const rewardPromose = this.getRewardAddress({
|
|
58
|
+
providerOrSigner,
|
|
59
|
+
token,
|
|
60
|
+
});
|
|
61
|
+
const minimumDepositPromise = this.getMinimumDeposit({
|
|
62
|
+
providerOrSigner,
|
|
63
|
+
token,
|
|
64
|
+
});
|
|
65
|
+
const data = await Promise.all([
|
|
66
|
+
pppPromise,
|
|
67
|
+
rewardPromose,
|
|
68
|
+
minimumDepositPromise,
|
|
69
|
+
]);
|
|
70
|
+
return {
|
|
71
|
+
liquidationPeriod: data[0].liquidationPeriod,
|
|
72
|
+
patricianPeriod: data[0].patricianPeriod,
|
|
73
|
+
rewardAddress: data[1],
|
|
74
|
+
minimumDeposit: data[2],
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
this.contract = new ethers_1.ethers.Contract(govAddress, SuperfluidGovernanceII_json_1.default.abi);
|
|
78
|
+
this.hostAddress = hostAddress;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
exports.default = Governance;
|
|
82
|
+
//# sourceMappingURL=Governance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Governance.js","sourceRoot":"","sources":["../../src/Governance.ts"],"names":[],"mappings":";;;;;AAAA,mCAAgC;AAEhC,oGAA0E;AAO1E,MAAqB,UAAU;IAI3B,YAAY,UAAkB,EAAE,WAAmB;QAQnD;;;;;;WAMG;QACH,iBAAY,GAAG,KAAK,EAAE,EAClB,gBAAgB,EAChB,KAAK,GAAG,eAAM,CAAC,SAAS,CAAC,WAAW,GACP,EAAE,EAAE;YACjC,MAAM,EAAE,iBAAiB,EAAE,eAAe,EAAE,GAAG,MAAM,IAAI,CAAC,QAAQ;iBAC7D,OAAO,CAAC,gBAAgB,CAAC;iBACzB,YAAY,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;YAC3C,OAAO;gBACH,iBAAiB,EAAE,iBAAiB,CAAC,QAAQ,EAAE;gBAC/C,eAAe,EAAE,eAAe,CAAC,QAAQ,EAAE;aAC9C,CAAC;QACN,CAAC,CAAC;QAEF;;;;;WAKG;QACH,qBAAgB,GAAG,KAAK,EAAE,EACtB,gBAAgB,EAChB,KAAK,GAAG,eA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,CAAC;gBACtB,cAAc,EAAE,IAAI,CAAC,CAAC,CAAC;aAC1B,CAAC;QACN,CAAC,CAAC;QAxFE,IAAI,CAAC,QAAQ,GAAG,IAAI,eAAM,CAAC,QAAQ,CAC/B,UAAU,EACV,qCAAyB,CAAC,GAAG,CACN,CAAC;QAC5B,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IACnC,CAAC;CAoFJ;AA9FD,6BA8FC"}
|
package/dist/main/Host.d.ts
CHANGED
|
@@ -2,14 +2,14 @@ import { ethers } from "ethers";
|
|
|
2
2
|
import Operation from "./Operation";
|
|
3
3
|
import { Superfluid } from "./typechain";
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Host Helper Class
|
|
6
6
|
* @description A helper class which can be used as a standalone class to populate call agreement transactions.
|
|
7
7
|
*/
|
|
8
8
|
export default class Host {
|
|
9
|
-
|
|
9
|
+
contract: Superfluid;
|
|
10
10
|
constructor(hostAddress: string);
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Creates an Operation of the `callAgreement` function on the host contract.
|
|
13
13
|
* @param agreementAddress the agreement address (cfa or ida address)
|
|
14
14
|
* @param callData the encoded callData for the function
|
|
15
15
|
* @param userData any additional user data
|
package/dist/main/Host.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Host.d.ts","sourceRoot":"","sources":["../../src/Host.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAa,MAAM,QAAQ,CAAC;AAE3C,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,IAAI;IACrB,
|
|
1
|
+
{"version":3,"file":"Host.d.ts","sourceRoot":"","sources":["../../src/Host.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAa,MAAM,QAAQ,CAAC;AAE3C,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,IAAI;IACrB,QAAQ,EAAE,UAAU,CAAC;gBAET,WAAW,EAAE,MAAM;IAO/B;;;;;;;OAOG;IACH,0CAA0C,qBACpB,MAAM,YACd,MAAM,YACN,MAAM,GAAG,SAAS;;uBAE7B,SAAS,CAQV;CACL"}
|