Skip to content

Commit

Permalink
dApp: add airdrop field (#1861)
Browse files Browse the repository at this point in the history
  • Loading branch information
ttillberg authored Dec 18, 2024
1 parent ef37f1a commit f5bb825
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/web3/src/ISpaceDapp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
SpaceRegistrar,
IRuleEntitlementBase,
IRuleEntitlementV2Base,
RiverAirdropDapp,
} from './v3'
import { PricingModules } from './v3/PricingModules'
import { BaseChainConfig } from './IStaticContractsInfo'
Expand Down Expand Up @@ -121,6 +122,8 @@ export interface ISpaceDapp {
readonly walletLink: WalletLinkV3
readonly pricingModules: PricingModules
readonly platformRequirements: PlatformRequirements
readonly airdrop: RiverAirdropDapp | undefined

isLegacySpace: (spaceId: string) => Promise<boolean>
addRoleToChannel: (
spaceId: string,
Expand Down
3 changes: 3 additions & 0 deletions packages/web3/src/v3/SpaceDapp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import { SpaceInfo } from '../types'
import {
IRuleEntitlementBase,
IRuleEntitlementV2Base,
RiverAirdropDapp,
UNKNOWN_ERROR,
UserEntitlementShim,
} from './index'
Expand Down Expand Up @@ -157,6 +158,7 @@ export class SpaceDapp implements ISpaceDapp {
public readonly pricingModules: PricingModules
public readonly walletLink: WalletLink
public readonly platformRequirements: PlatformRequirements
public readonly airdrop: RiverAirdropDapp

public readonly entitlementCache: EntitlementCache<EntitlementRequest, EntitlementData[]>
public readonly entitledWalletCache: EntitlementCache<EntitlementRequest, EntitledWallet>
Expand All @@ -173,6 +175,7 @@ export class SpaceDapp implements ISpaceDapp {
config.addresses.spaceFactory,
provider,
)
this.airdrop = new RiverAirdropDapp(config, provider)

// For RPC providers that pool for events, we need to set the polling interval to a lower value
// so that we don't miss events that may be emitted in between polling intervals. The Ethers
Expand Down

0 comments on commit f5bb825

Please sign in to comment.