@aurigami/sdk 1.9.7 → 1.11.0-beta

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.
@@ -13,4 +13,5 @@ import IUniswapV2PairABI from '@aurigami/contracts/artifacts/contracts/mock/IUni
13
13
  import Multicall2ABI from '@aurigami/contracts/artifacts/contracts/mock/Multicall2.sol/Multicall2.json';
14
14
  import PulpABI from '@aurigami/contracts/artifacts/contracts/PULP.sol/PULP.json';
15
15
  import ReferralDirectoryABI from '@aurigami/contracts/artifacts/contracts/ReferralDirectory.sol/ReferralDirectory.json';
16
- export { AuriOracleABI, AuTokenABI, IUniswapV2PairABI, AuriAirdropABI, AuriFairLaunchABI, AuriLensABI, ComptrollerABI, EIP20InterfaceABI, ReferralDirectoryABI, AuErc20ABI, AuETHABI, EthRepayHelperABI, Multicall2ABI, PulpABI, AuriInternalLensABI, };
16
+ import PlyGameABI from '@aurigami/contracts/artifacts/contracts/plygame/PlyGame.sol/PlyGame.json';
17
+ export { AuriOracleABI, AuTokenABI, IUniswapV2PairABI, AuriAirdropABI, AuriFairLaunchABI, AuriLensABI, ComptrollerABI, EIP20InterfaceABI, ReferralDirectoryABI, AuErc20ABI, AuETHABI, EthRepayHelperABI, Multicall2ABI, PulpABI, AuriInternalLensABI, PlyGameABI, };
@@ -1,4 +1,4 @@
1
- import { AuriAirdrop, AuriFairLaunch, AuriInternalLens, AuriLens, Comptroller, IERC20, AuriOracle, PULP, ReferralDirectory } from '@aurigami/contracts/typechain';
1
+ import { AuErc20, AuriAirdrop, AuriFairLaunch, AuriInternalLens, AuriLens, AuriOracle, Comptroller, IERC20, PlyGame, PULP, ReferralDirectory } from '@aurigami/contracts/typechain';
2
2
  import { Contract } from 'ethers';
3
3
  import { AuTokenWithUnderlying } from '../types';
4
4
  import { BlockchainEntityRead } from './BlockchainEntity';
@@ -12,8 +12,19 @@ export declare class AuriEnv extends BlockchainEntityRead {
12
12
  private _auriAirdrop;
13
13
  private _referralDirectory;
14
14
  private _oracle;
15
+ private _plygame;
15
16
  getContract<CType extends Contract>(address: string, abi: any): CType;
16
17
  getAuTokenContracts(): AuTokenWithUnderlying[];
18
+ /**
19
+ * Get AuErc20 contract by its address or underlying name.
20
+ *
21
+ * Either address or underlyingName must be provided
22
+ *
23
+ */
24
+ getAuErc20Contract({ address, underlyingName, }: {
25
+ address?: string;
26
+ underlyingName?: string;
27
+ }): AuErc20;
17
28
  get comptroller(): Comptroller;
18
29
  get auriFairLaunch(): AuriFairLaunch;
19
30
  get auriLens(): AuriLens;
@@ -23,4 +34,5 @@ export declare class AuriEnv extends BlockchainEntityRead {
23
34
  get auriAirdrop(): AuriAirdrop;
24
35
  get referralDirectory(): ReferralDirectory;
25
36
  get oracle(): AuriOracle;
37
+ get plygame(): PlyGame;
26
38
  }
@@ -12,7 +12,7 @@ export declare class PapermillRead extends BlockchainEntityRead {
12
12
  * Get all unclaimed PLY reward of the user in all markets + all staking pools
13
13
  */
14
14
  getUnclaimedPlyReward(userAddress: Address): Promise<TokenAmount>;
15
- private getWeek;
15
+ getWeek(timestamp: number): number;
16
16
  /**
17
17
  * Get all locking details of the user in all markets + all staking pools
18
18
  */
@@ -0,0 +1,37 @@
1
+ import { TransactionResponse } from '@ethersproject/abstract-provider';
2
+ import { AuriEnv, BlockchainEntity, BlockchainEntityRead, Token, TokenAmount } from '../entities';
3
+ import { Address, NetworkConnection, PlyGameBetResult } from '../types';
4
+ export declare class PlyGameRead extends BlockchainEntityRead {
5
+ readonly plyToken: Token;
6
+ readonly pulpToken: Token;
7
+ readonly env: AuriEnv;
8
+ constructor(networkConnection: NetworkConnection);
9
+ private parseBetMakeEvent;
10
+ private attachTimestamp;
11
+ /**
12
+ * Get 100 most recent bets of the market users
13
+ */
14
+ getUserPlyGameHistory(user: Address): Promise<PlyGameBetResult[]>;
15
+ /**
16
+ * Get current jackpot amount
17
+ */
18
+ currentJackpotAmount(): Promise<TokenAmount>;
19
+ nextJackpotRevealTime(): Promise<number>;
20
+ earlyUnlockedPulpAmount(user: Address): Promise<TokenAmount>;
21
+ getPlyGameResultsInTransaction(txHash: Address): Promise<PlyGameBetResult[]>;
22
+ }
23
+ export declare class PlyGameReadWrite extends PlyGameRead {
24
+ /**
25
+ * makes "times" independent bets, but consecutively, of the same amount
26
+ */
27
+ makeBetMultiple(amount: TokenAmount, times: number): Promise<TransactionResponse>;
28
+ /**
29
+ * Make a single bet
30
+ */
31
+ makeBetOnce(amount: TokenAmount): Promise<TransactionResponse>;
32
+ }
33
+ export declare class PlyGame extends BlockchainEntity {
34
+ constructor();
35
+ read(networkConnection: NetworkConnection): PlyGameRead;
36
+ readWrite(networkConnection: NetworkConnection): PlyGameReadWrite;
37
+ }
@@ -2,5 +2,6 @@ export * from './Airdrop';
2
2
  export * from './misc';
3
3
  export * from './MoneyMarket';
4
4
  export * from './Papermill';
5
+ export * from './PlyGame';
5
6
  export * from './Referral';
6
7
  export * from './Staking';