@aurigami/sdk 1.6.5 → 1.6.6
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 +4 -0
- package/dist/contracts/Airdrop.d.ts +1 -1
- package/dist/contracts/MoneyMarket.d.ts +1 -1
- package/dist/contracts/Multicall.d.ts +1 -1
- package/dist/contracts/Papermill.d.ts +3 -3
- package/dist/contracts/Referral.d.ts +1 -1
- package/dist/contracts/Staking.d.ts +1 -1
- package/dist/contracts/misc.d.ts +2 -2
- package/dist/sdk.cjs.development.js +12 -12
- package/dist/sdk.cjs.development.js.map +1 -1
- package/dist/sdk.cjs.production.min.js +1 -1
- package/dist/sdk.cjs.production.min.js.map +1 -1
- package/dist/sdk.esm.js +12 -12
- package/dist/sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/contracts/Airdrop.ts +4 -4
- package/src/contracts/MoneyMarket.ts +1 -1
- package/src/contracts/Multicall.ts +3 -3
- package/src/contracts/Papermill.ts +3 -3
- package/src/contracts/Referral.ts +7 -7
- package/src/contracts/Staking.ts +1 -1
- package/src/contracts/misc.ts +3 -3
package/ChangeLog.md
CHANGED
|
@@ -3,7 +3,7 @@ import { TransactionResponse } from '@ethersproject/abstract-provider';
|
|
|
3
3
|
import { BlockchainEntity, BlockchainEntityRead, TokenAmount } from '../entities';
|
|
4
4
|
import { Address, NetworkConnection } from '../types';
|
|
5
5
|
export declare class AirdropRead extends BlockchainEntityRead {
|
|
6
|
-
|
|
6
|
+
readonly airDrop: AuriAirdrop;
|
|
7
7
|
constructor(networkConnection: NetworkConnection);
|
|
8
8
|
/**
|
|
9
9
|
* Get redeemable rewards amount of user
|
|
@@ -13,7 +13,7 @@ declare type RewardSpeeds = {
|
|
|
13
13
|
export declare class MoneyMarketRead extends BlockchainEntityRead {
|
|
14
14
|
underlying: Token;
|
|
15
15
|
auToken: AuErc20 | AuETH;
|
|
16
|
-
|
|
16
|
+
readonly env: AuriEnv;
|
|
17
17
|
constructor(networkConnection: NetworkConnection, auToken: Address, underlyingAsset: Address);
|
|
18
18
|
protected getRewardSpeeds(): Promise<RewardSpeeds>;
|
|
19
19
|
getTotalTokenBorrowed(): Promise<TokenAmount>;
|
|
@@ -4,7 +4,7 @@ import { Result } from 'ethers/lib/utils';
|
|
|
4
4
|
import { BlockchainEntityRead } from '../entities';
|
|
5
5
|
import { NetworkConnection } from '../types';
|
|
6
6
|
export declare class MulticallRead extends BlockchainEntityRead {
|
|
7
|
-
|
|
7
|
+
readonly multicall: Multicall2;
|
|
8
8
|
constructor(networkConnection: NetworkConnection);
|
|
9
9
|
/**
|
|
10
10
|
* Run multiple calls via multicall contract
|
|
@@ -2,9 +2,9 @@ import { TransactionResponse } from '@ethersproject/abstract-provider';
|
|
|
2
2
|
import { AuriEnv, BlockchainEntity, BlockchainEntityRead, Token, TokenAmount } from '../entities';
|
|
3
3
|
import { Address, NetworkConnection, UserLockingDetails } from '../types';
|
|
4
4
|
export declare class PapermillRead extends BlockchainEntityRead {
|
|
5
|
-
plyToken: Token;
|
|
6
|
-
pulpToken: Token;
|
|
7
|
-
|
|
5
|
+
readonly plyToken: Token;
|
|
6
|
+
readonly pulpToken: Token;
|
|
7
|
+
readonly env: AuriEnv;
|
|
8
8
|
constructor(networkConnection: NetworkConnection);
|
|
9
9
|
getPlyBalance(userAddress: Address): Promise<TokenAmount>;
|
|
10
10
|
getPulpBalance(userAddress: Address): Promise<TokenAmount>;
|
|
@@ -3,7 +3,7 @@ import { TransactionResponse } from '@ethersproject/abstract-provider';
|
|
|
3
3
|
import { BlockchainEntity, BlockchainEntityRead } from '../entities';
|
|
4
4
|
import { Address, NetworkConnection } from '../types';
|
|
5
5
|
export declare class ReferralRead extends BlockchainEntityRead {
|
|
6
|
-
|
|
6
|
+
readonly referral: ReferralDirectory;
|
|
7
7
|
constructor(networkConnection: NetworkConnection);
|
|
8
8
|
/**
|
|
9
9
|
* Generate a 10-character referral code
|
|
@@ -2,7 +2,7 @@ import { TransactionResponse } from '@ethersproject/abstract-provider';
|
|
|
2
2
|
import { AuriEnv, BlockchainEntity, BlockchainEntityRead, TokenAmount } from '../entities';
|
|
3
3
|
import { NetworkConnection, PLYWNEARPoolDetails } from '../types';
|
|
4
4
|
export declare class StakingRead extends BlockchainEntityRead {
|
|
5
|
-
|
|
5
|
+
readonly env: AuriEnv;
|
|
6
6
|
constructor(networkConnection: NetworkConnection);
|
|
7
7
|
getPLYWNEARPoolDetails(): Promise<PLYWNEARPoolDetails>;
|
|
8
8
|
/**
|
package/dist/contracts/misc.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import { StakingRead } from '../contracts';
|
|
|
2
2
|
import { AuriEnv, BlockchainEntityRead, Token, TokenAmount } from '../entities';
|
|
3
3
|
import * as types from '../types';
|
|
4
4
|
export declare class MiscRead extends BlockchainEntityRead {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
readonly env: AuriEnv;
|
|
6
|
+
readonly stakingRead: StakingRead;
|
|
7
7
|
constructor(networkConnection: types.NetworkConnection);
|
|
8
8
|
getUserDetails(userAddress: string): Promise<types.UserDetails>;
|
|
9
9
|
getTokenPrice(token: Token): Promise<types.CurrencyAmount>;
|
|
@@ -2062,7 +2062,7 @@ var AirdropRead = /*#__PURE__*/function (_BlockchainEntityRead) {
|
|
|
2062
2062
|
var _this;
|
|
2063
2063
|
|
|
2064
2064
|
_this = _BlockchainEntityRead.call(this, networkConnection) || this;
|
|
2065
|
-
_this.
|
|
2065
|
+
_this.airDrop = new ethers.Contract(networkAddresses.misc.AURI_AIRDROP, AuriAirdropABI.abi, networkConnection.provider);
|
|
2066
2066
|
return _this;
|
|
2067
2067
|
}
|
|
2068
2068
|
/**
|
|
@@ -2083,7 +2083,7 @@ var AirdropRead = /*#__PURE__*/function (_BlockchainEntityRead) {
|
|
|
2083
2083
|
case 0:
|
|
2084
2084
|
tokenInstance = new Token(token, getDecimal(token));
|
|
2085
2085
|
_context.next = 3;
|
|
2086
|
-
return this.
|
|
2086
|
+
return this.airDrop.getRedeemableReward(ethers.utils.formatBytes32String(campaign), token, user);
|
|
2087
2087
|
|
|
2088
2088
|
case 3:
|
|
2089
2089
|
rewards = _context.sent;
|
|
@@ -2127,7 +2127,7 @@ var AirdropReadWrite = /*#__PURE__*/function (_AirdropRead) {
|
|
|
2127
2127
|
switch (_context2.prev = _context2.next) {
|
|
2128
2128
|
case 0:
|
|
2129
2129
|
assert(campaigns.length == tokens.length, 'campaigns and tokens must have the same length');
|
|
2130
|
-
_context2.t0 = this.
|
|
2130
|
+
_context2.t0 = this.airDrop.connect(this._networkConnection.signer);
|
|
2131
2131
|
_context2.t1 = campaigns.map(function (e) {
|
|
2132
2132
|
return ethers.utils.formatBytes32String(e);
|
|
2133
2133
|
});
|
|
@@ -2212,7 +2212,7 @@ var MulticallRead = /*#__PURE__*/function (_BlockchainEntityRead) {
|
|
|
2212
2212
|
var _this;
|
|
2213
2213
|
|
|
2214
2214
|
_this = _BlockchainEntityRead.call(this, networkConnection) || this;
|
|
2215
|
-
_this.
|
|
2215
|
+
_this.multicall = new ethers.Contract(networkAddresses.misc.MULTICALL, abis$7.abi, networkConnection.provider);
|
|
2216
2216
|
return _this;
|
|
2217
2217
|
}
|
|
2218
2218
|
/**
|
|
@@ -2260,7 +2260,7 @@ var MulticallRead = /*#__PURE__*/function (_BlockchainEntityRead) {
|
|
|
2260
2260
|
|
|
2261
2261
|
case 11:
|
|
2262
2262
|
_context.next = 13;
|
|
2263
|
-
return this.
|
|
2263
|
+
return this.multicall.callStatic.aggregate(txns);
|
|
2264
2264
|
|
|
2265
2265
|
case 13:
|
|
2266
2266
|
response = _context.sent;
|
|
@@ -2312,7 +2312,7 @@ var MiscRead = /*#__PURE__*/function (_BlockchainEntityRead) {
|
|
|
2312
2312
|
var _this;
|
|
2313
2313
|
|
|
2314
2314
|
_this = _BlockchainEntityRead.call(this, networkConnection) || this;
|
|
2315
|
-
_this.
|
|
2315
|
+
_this.stakingRead = new StakingRead(networkConnection);
|
|
2316
2316
|
_this.env = new AuriEnv(networkConnection);
|
|
2317
2317
|
return _this;
|
|
2318
2318
|
}
|
|
@@ -3662,7 +3662,7 @@ var ReferralRead = /*#__PURE__*/function (_BlockchainEntityRead) {
|
|
|
3662
3662
|
var _this;
|
|
3663
3663
|
|
|
3664
3664
|
_this = _BlockchainEntityRead.call(this, networkConnection) || this;
|
|
3665
|
-
_this.
|
|
3665
|
+
_this.referral = new ethers.Contract(networkAddresses.misc.REFERRAL, abis$9.abi, networkConnection.provider);
|
|
3666
3666
|
return _this;
|
|
3667
3667
|
}
|
|
3668
3668
|
/**
|
|
@@ -3702,7 +3702,7 @@ var ReferralRead = /*#__PURE__*/function (_BlockchainEntityRead) {
|
|
|
3702
3702
|
switch (_context.prev = _context.next) {
|
|
3703
3703
|
case 0:
|
|
3704
3704
|
_context.next = 2;
|
|
3705
|
-
return this.
|
|
3705
|
+
return this.referral.userReferralCode(userAddr);
|
|
3706
3706
|
|
|
3707
3707
|
case 2:
|
|
3708
3708
|
result = _context.sent;
|
|
@@ -3737,7 +3737,7 @@ var ReferralRead = /*#__PURE__*/function (_BlockchainEntityRead) {
|
|
|
3737
3737
|
switch (_context2.prev = _context2.next) {
|
|
3738
3738
|
case 0:
|
|
3739
3739
|
_context2.next = 2;
|
|
3740
|
-
return this.
|
|
3740
|
+
return this.referral.referralCodeUsed(userAddr);
|
|
3741
3741
|
|
|
3742
3742
|
case 2:
|
|
3743
3743
|
result = _context2.sent;
|
|
@@ -3772,7 +3772,7 @@ var ReferralRead = /*#__PURE__*/function (_BlockchainEntityRead) {
|
|
|
3772
3772
|
switch (_context3.prev = _context3.next) {
|
|
3773
3773
|
case 0:
|
|
3774
3774
|
referralCode = ethers.ethers.utils.formatBytes32String(code);
|
|
3775
|
-
return _context3.abrupt("return", this.
|
|
3775
|
+
return _context3.abrupt("return", this.referral.referralCodeOwner(referralCode));
|
|
3776
3776
|
|
|
3777
3777
|
case 2:
|
|
3778
3778
|
case "end":
|
|
@@ -3815,7 +3815,7 @@ var ReferralReadWrite = /*#__PURE__*/function (_ReferralRead) {
|
|
|
3815
3815
|
switch (_context4.prev = _context4.next) {
|
|
3816
3816
|
case 0:
|
|
3817
3817
|
referralCode = ethers.ethers.utils.formatBytes32String(this.generateReferralCode());
|
|
3818
|
-
return _context4.abrupt("return", this.
|
|
3818
|
+
return _context4.abrupt("return", this.referral.connect(this._networkConnection.signer).registerNewUserReferralCode(referralCode));
|
|
3819
3819
|
|
|
3820
3820
|
case 2:
|
|
3821
3821
|
case "end":
|
|
@@ -3846,7 +3846,7 @@ var ReferralReadWrite = /*#__PURE__*/function (_ReferralRead) {
|
|
|
3846
3846
|
switch (_context5.prev = _context5.next) {
|
|
3847
3847
|
case 0:
|
|
3848
3848
|
referralCode = ethers.ethers.utils.formatBytes32String(code);
|
|
3849
|
-
return _context5.abrupt("return", this.
|
|
3849
|
+
return _context5.abrupt("return", this.referral.connect(this._networkConnection.signer).registerReferralCodeUsed(referralCode));
|
|
3850
3850
|
|
|
3851
3851
|
case 2:
|
|
3852
3852
|
case "end":
|