UNPKG

@collabland/staking-contracts

Version:
41 lines 1.69 kB
import { __decorate } from "tslib"; import { BindingScope, extensionFor, injectable } from '@loopback/core'; import { STAKING_ADAPTERS_EXTENSION_POINT } from '../keys.js'; import { BaseStakingContractAdapter } from '../staking.js'; // Use the full path to import instead of `../types` import { WarriorsofankhStaking__factory } from '../types/factories/WarriorsofankhStaking__factory.js'; let WarriorsofankhStakingContractAdapter = class WarriorsofankhStakingContractAdapter extends BaseStakingContractAdapter { constructor() { super(...arguments); /** * The contract address */ this.contractAddress = '0x1931F7A8535219592E1756a1b187EE26565deE1a'; /** * Assets that can be staked to this contract */ this.supportedAssets = [ { asset: 'ERC721:0x3Fcbb0FDE70814D7f99B9E4126E9320b713B30f8', }, ]; } /** * Get staked token ids for the given owner * @param owner - Owner address * @returns */ getStakedTokenIds(owner) { const contract = WarriorsofankhStaking__factory.connect(this.contractAddress, this.provider); return contract.getStakedTokens(owner, '0x3Fcbb0FDE70814D7f99B9E4126E9320b713B30f8'); } }; WarriorsofankhStakingContractAdapter = __decorate([ injectable({ scope: BindingScope.SINGLETON, // Mark the adapter as a singleton }, // Mark it as an extension to staking contracts service extensionFor(STAKING_ADAPTERS_EXTENSION_POINT)) ], WarriorsofankhStakingContractAdapter); export { WarriorsofankhStakingContractAdapter }; //# sourceMappingURL=warriorsofankh-staking.adapter.js.map