@aurigami/sdk 1.3.4 → 1.4.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/README.md +6 -0
- package/dist/airdrop-lottery.d.ts +11 -1
- package/dist/constants.d.ts +6 -0
- package/dist/helpers.d.ts +1 -0
- package/dist/sdk.cjs.development.js +206 -38
- 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 +203 -39
- package/dist/sdk.esm.js.map +1 -1
- package/package.json +12 -3
- package/src/MoneyMarket.ts +13 -7
- package/src/airdrop-lottery.ts +58 -5
- package/src/constants.ts +17 -1
- package/src/decimals.ts +3 -2
- package/src/helpers.ts +16 -1
package/dist/sdk.esm.js
CHANGED
|
@@ -2,6 +2,7 @@ import BigNumber from 'bignumber.js';
|
|
|
2
2
|
import { BigNumber as BigNumber$1, utils, Contract, ethers } from 'ethers';
|
|
3
3
|
import { Logger } from 'ethers/lib/utils';
|
|
4
4
|
import { Signer } from '@ethersproject/abstract-signer';
|
|
5
|
+
import EIP20InterfaceABI from '@aurigami/contracts/artifacts/contracts/interfaces/EIP20Interface.sol/EIP20Interface.json';
|
|
5
6
|
import AuErc20ABI from '@aurigami/contracts/artifacts/contracts/AuErc20.sol/AuErc20.json';
|
|
6
7
|
import AuETHABI from '@aurigami/contracts/artifacts/contracts/AuETH.sol/AuETH.json';
|
|
7
8
|
import ComptrollerABI from '@aurigami/contracts/artifacts/contracts/Comptroller.sol/Comptroller.json';
|
|
@@ -12,6 +13,8 @@ import TokenLockABI from '@aurigami/contracts/artifacts/contracts/TokenLock.sol/
|
|
|
12
13
|
import AuriFairLaunchABI from '@aurigami/contracts/artifacts/contracts/AuriFairLaunch.sol/AuriFairLaunch.json';
|
|
13
14
|
import FaucetABI from '@aurigami/contracts/artifacts/contracts/mock/Faucet.sol/Faucet.json';
|
|
14
15
|
import AuTokenABI from '@aurigami/contracts/artifacts/contracts/AuToken.sol/AuToken.json';
|
|
16
|
+
import AuriAirdropABI from '@aurigami/contracts/artifacts/contracts/AuriAirdrop.sol/AuriAirdrop.json';
|
|
17
|
+
import assert from 'assert';
|
|
15
18
|
|
|
16
19
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
17
20
|
try {
|
|
@@ -960,7 +963,8 @@ var networkAddresses = {
|
|
|
960
963
|
AURIFAIRLAUNCH: /*#__PURE__*/"0x9F9ceE911509abC6Af899c12ED625B0A6580D6e6".toLowerCase(),
|
|
961
964
|
AURILENS: /*#__PURE__*/'0xC41a5C1625d492436600789469c1CE2eA20CEA6B'.toLowerCase(),
|
|
962
965
|
TOKENLOCK: /*#__PURE__*/'0xDACC02a4Ff16Ea3c1515AdbfdCeb7B1F448B79c8'.toLowerCase(),
|
|
963
|
-
ETHREPAYHELPER: /*#__PURE__*/"0xa308A5003fA1A25BFdD9418FcEE51d48Dbe441e6".toLowerCase()
|
|
966
|
+
ETHREPAYHELPER: /*#__PURE__*/"0xa308A5003fA1A25BFdD9418FcEE51d48Dbe441e6".toLowerCase(),
|
|
967
|
+
AURI_AIRDROP: /*#__PURE__*/"0x6C42aA5b128B62D6CCf357726D7d13F3888335EC".toLowerCase()
|
|
964
968
|
},
|
|
965
969
|
tokens: {
|
|
966
970
|
AURORA: /*#__PURE__*/"0x8bec47865ade3b172a928df8f990bc7f2a3b9f79".toLowerCase(),
|
|
@@ -981,6 +985,18 @@ var INF = /*#__PURE__*/BigNumber$1.from(2).pow(256).sub(1);
|
|
|
981
985
|
var AIRDROP_START_TIMESTAMP = 1649858400;
|
|
982
986
|
var AIRDROP_END_TIMESTAMP = 1651068000;
|
|
983
987
|
var AIRDROP_KEEP_THRESHOLD = 7 * 86400;
|
|
988
|
+
var DEPOSIT_NEAR_REWARDS_PER_WEEK = /*#__PURE__*/Object.fromEntries( /*#__PURE__*/Object.entries({
|
|
989
|
+
'0xb12bfca5a55806aaf64e99521918a4bf0fc40802': '36375',
|
|
990
|
+
'0x4988a896b1227218e4a686fde5eabdcabd91571f': '14550',
|
|
991
|
+
'0xf4eb217ba2454613b15dbdea6e5f22276410e89e': '3638',
|
|
992
|
+
'0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE': '14550',
|
|
993
|
+
'0xc42c30ac6cc15fac9bd938618bcaa1a1fae8501d': '3638'
|
|
994
|
+
}).map(function (_ref) {
|
|
995
|
+
var k = _ref[0],
|
|
996
|
+
v = _ref[1];
|
|
997
|
+
return [k.toLowerCase(), v];
|
|
998
|
+
}));
|
|
999
|
+
var BORROW_NEAR_REWARDS_PER_WEEK = {};
|
|
984
1000
|
|
|
985
1001
|
var decimalRecords = {
|
|
986
1002
|
'0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee': 18,
|
|
@@ -1001,7 +1017,8 @@ var decimalRecords = {
|
|
|
1001
1017
|
'0x8888682e24dd4df7b7ff2b91fccb575737e433bf': 8,
|
|
1002
1018
|
'0xae4fac24dcdae0132c6d04f564dcf059616e9423': 8,
|
|
1003
1019
|
'0xce4166363e3a584dac84a47bcd3414b43efcdd1c': 8,
|
|
1004
|
-
'0xf4eb217ba2454613b15dbdea6e5f22276410e89e': 8
|
|
1020
|
+
'0xf4eb217ba2454613b15dbdea6e5f22276410e89e': 8,
|
|
1021
|
+
'0xc21ff01229e982d7c8b8691163b0a3cb8f357453': 24
|
|
1005
1022
|
};
|
|
1006
1023
|
|
|
1007
1024
|
function formatObject(object) {
|
|
@@ -1026,6 +1043,40 @@ function validateAndParseAddress(address) {
|
|
|
1026
1043
|
function getDecimal(address) {
|
|
1027
1044
|
return decimalRecords[address.toLowerCase()];
|
|
1028
1045
|
}
|
|
1046
|
+
function getDecimalsViaContract(_x, _x2) {
|
|
1047
|
+
return _getDecimalsViaContract.apply(this, arguments);
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
function _getDecimalsViaContract() {
|
|
1051
|
+
_getDecimalsViaContract = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee(address, provider) {
|
|
1052
|
+
var result, token;
|
|
1053
|
+
return runtime_1.wrap(function _callee$(_context) {
|
|
1054
|
+
while (1) {
|
|
1055
|
+
switch (_context.prev = _context.next) {
|
|
1056
|
+
case 0:
|
|
1057
|
+
result = getDecimal(address);
|
|
1058
|
+
|
|
1059
|
+
if (!result) {
|
|
1060
|
+
_context.next = 3;
|
|
1061
|
+
break;
|
|
1062
|
+
}
|
|
1063
|
+
|
|
1064
|
+
return _context.abrupt("return", result);
|
|
1065
|
+
|
|
1066
|
+
case 3:
|
|
1067
|
+
token = new Contract(address, EIP20InterfaceABI.abi, provider);
|
|
1068
|
+
return _context.abrupt("return", token.decimals());
|
|
1069
|
+
|
|
1070
|
+
case 5:
|
|
1071
|
+
case "end":
|
|
1072
|
+
return _context.stop();
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
}, _callee);
|
|
1076
|
+
}));
|
|
1077
|
+
return _getDecimalsViaContract.apply(this, arguments);
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1029
1080
|
function calcLMRewardApr(rewardsValue, totalStakeValue, frequencyPerYear) {
|
|
1030
1081
|
if (totalStakeValue.lte(0)) {
|
|
1031
1082
|
return new BigNumber('999999999');
|
|
@@ -1033,71 +1084,71 @@ function calcLMRewardApr(rewardsValue, totalStakeValue, frequencyPerYear) {
|
|
|
1033
1084
|
|
|
1034
1085
|
return rewardsValue.multipliedBy(frequencyPerYear).dividedBy(totalStakeValue);
|
|
1035
1086
|
}
|
|
1036
|
-
function getBlockTimestamp(
|
|
1087
|
+
function getBlockTimestamp(_x3, _x4) {
|
|
1037
1088
|
return _getBlockTimestamp.apply(this, arguments);
|
|
1038
1089
|
}
|
|
1039
1090
|
|
|
1040
1091
|
function _getBlockTimestamp() {
|
|
1041
|
-
_getBlockTimestamp = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function
|
|
1092
|
+
_getBlockTimestamp = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee2(provider, blockNumber) {
|
|
1042
1093
|
var block;
|
|
1043
|
-
return runtime_1.wrap(function
|
|
1094
|
+
return runtime_1.wrap(function _callee2$(_context2) {
|
|
1044
1095
|
while (1) {
|
|
1045
|
-
switch (
|
|
1096
|
+
switch (_context2.prev = _context2.next) {
|
|
1046
1097
|
case 0:
|
|
1047
|
-
|
|
1098
|
+
_context2.next = 2;
|
|
1048
1099
|
return provider.getBlock(blockNumber);
|
|
1049
1100
|
|
|
1050
1101
|
case 2:
|
|
1051
|
-
block =
|
|
1052
|
-
return
|
|
1102
|
+
block = _context2.sent;
|
|
1103
|
+
return _context2.abrupt("return", block.timestamp);
|
|
1053
1104
|
|
|
1054
1105
|
case 4:
|
|
1055
1106
|
case "end":
|
|
1056
|
-
return
|
|
1107
|
+
return _context2.stop();
|
|
1057
1108
|
}
|
|
1058
1109
|
}
|
|
1059
|
-
},
|
|
1110
|
+
}, _callee2);
|
|
1060
1111
|
}));
|
|
1061
1112
|
return _getBlockTimestamp.apply(this, arguments);
|
|
1062
1113
|
}
|
|
1063
1114
|
|
|
1064
|
-
function getBlockBeforeTimestamp(
|
|
1115
|
+
function getBlockBeforeTimestamp(_x5, _x6, _x7) {
|
|
1065
1116
|
return _getBlockBeforeTimestamp.apply(this, arguments);
|
|
1066
1117
|
}
|
|
1067
1118
|
|
|
1068
1119
|
function _getBlockBeforeTimestamp() {
|
|
1069
|
-
_getBlockBeforeTimestamp = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function
|
|
1120
|
+
_getBlockBeforeTimestamp = _asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee3(provider, timestamp, startBlock) {
|
|
1070
1121
|
var blockThreshold, K, leftBlock, rightBlock, size, promises, i, blockTimestamps, nextLeftBlock, _i, _i2;
|
|
1071
1122
|
|
|
1072
|
-
return runtime_1.wrap(function
|
|
1123
|
+
return runtime_1.wrap(function _callee3$(_context3) {
|
|
1073
1124
|
while (1) {
|
|
1074
|
-
switch (
|
|
1125
|
+
switch (_context3.prev = _context3.next) {
|
|
1075
1126
|
case 0:
|
|
1076
1127
|
blockThreshold = 50 * 10;
|
|
1077
1128
|
K = 8;
|
|
1078
1129
|
leftBlock = startBlock || 1;
|
|
1079
|
-
|
|
1130
|
+
_context3.next = 5;
|
|
1080
1131
|
return provider.getBlockNumber();
|
|
1081
1132
|
|
|
1082
1133
|
case 5:
|
|
1083
|
-
rightBlock =
|
|
1084
|
-
|
|
1134
|
+
rightBlock = _context3.sent;
|
|
1135
|
+
_context3.next = 8;
|
|
1085
1136
|
return getBlockTimestamp(provider, rightBlock);
|
|
1086
1137
|
|
|
1087
1138
|
case 8:
|
|
1088
|
-
|
|
1089
|
-
|
|
1139
|
+
_context3.t0 = _context3.sent;
|
|
1140
|
+
_context3.t1 = timestamp;
|
|
1090
1141
|
|
|
1091
|
-
if (!(
|
|
1092
|
-
|
|
1142
|
+
if (!(_context3.t0 < _context3.t1)) {
|
|
1143
|
+
_context3.next = 12;
|
|
1093
1144
|
break;
|
|
1094
1145
|
}
|
|
1095
1146
|
|
|
1096
|
-
return
|
|
1147
|
+
return _context3.abrupt("return", rightBlock);
|
|
1097
1148
|
|
|
1098
1149
|
case 12:
|
|
1099
1150
|
if (!(rightBlock - leftBlock >= blockThreshold)) {
|
|
1100
|
-
|
|
1151
|
+
_context3.next = 25;
|
|
1101
1152
|
break;
|
|
1102
1153
|
}
|
|
1103
1154
|
|
|
@@ -1108,11 +1159,11 @@ function _getBlockBeforeTimestamp() {
|
|
|
1108
1159
|
promises.push(getBlockTimestamp(provider, leftBlock + i * size));
|
|
1109
1160
|
}
|
|
1110
1161
|
|
|
1111
|
-
|
|
1162
|
+
_context3.next = 18;
|
|
1112
1163
|
return Promise.all(promises);
|
|
1113
1164
|
|
|
1114
1165
|
case 18:
|
|
1115
|
-
blockTimestamps =
|
|
1166
|
+
blockTimestamps = _context3.sent;
|
|
1116
1167
|
nextLeftBlock = leftBlock;
|
|
1117
1168
|
|
|
1118
1169
|
for (_i = 1; _i < K; _i++) {
|
|
@@ -1128,18 +1179,18 @@ function _getBlockBeforeTimestamp() {
|
|
|
1128
1179
|
}
|
|
1129
1180
|
|
|
1130
1181
|
leftBlock = nextLeftBlock;
|
|
1131
|
-
|
|
1182
|
+
_context3.next = 12;
|
|
1132
1183
|
break;
|
|
1133
1184
|
|
|
1134
1185
|
case 25:
|
|
1135
|
-
return
|
|
1186
|
+
return _context3.abrupt("return", leftBlock);
|
|
1136
1187
|
|
|
1137
1188
|
case 26:
|
|
1138
1189
|
case "end":
|
|
1139
|
-
return
|
|
1190
|
+
return _context3.stop();
|
|
1140
1191
|
}
|
|
1141
1192
|
}
|
|
1142
|
-
},
|
|
1193
|
+
}, _callee3);
|
|
1143
1194
|
}));
|
|
1144
1195
|
return _getBlockBeforeTimestamp.apply(this, arguments);
|
|
1145
1196
|
}
|
|
@@ -2932,10 +2983,15 @@ var MoneyMarketRead = /*#__PURE__*/function (_BlockchainEntityRead) {
|
|
|
2932
2983
|
|
|
2933
2984
|
_proto.getDepositNEARRewardPerWeek = function getDepositNEARRewardPerWeek() {
|
|
2934
2985
|
var NEARToken = new Token(networkAddresses.tokens.WNEAR, getDecimal(networkAddresses.tokens.WNEAR));
|
|
2935
|
-
var
|
|
2986
|
+
var rewardStartTime = 1650636000;
|
|
2987
|
+
var rewardStopTime = 1651845600;
|
|
2988
|
+
var currentTime = getCurrentTimestamp();
|
|
2989
|
+
|
|
2990
|
+
if (currentTime <= rewardStopTime && currentTime > rewardStartTime) {
|
|
2991
|
+
var _DEPOSIT_NEAR_REWARDS;
|
|
2936
2992
|
|
|
2937
|
-
|
|
2938
|
-
return new TokenAmount(NEARToken,
|
|
2993
|
+
var reward = (_DEPOSIT_NEAR_REWARDS = DEPOSIT_NEAR_REWARDS_PER_WEEK[this.underlying.address.toLocaleLowerCase()]) != null ? _DEPOSIT_NEAR_REWARDS : "0";
|
|
2994
|
+
return new TokenAmount(NEARToken, reward, false);
|
|
2939
2995
|
} else {
|
|
2940
2996
|
return new TokenAmount(NEARToken, "0");
|
|
2941
2997
|
}
|
|
@@ -2943,10 +2999,15 @@ var MoneyMarketRead = /*#__PURE__*/function (_BlockchainEntityRead) {
|
|
|
2943
2999
|
|
|
2944
3000
|
_proto.getBorrowNEARRewardPerWeek = function getBorrowNEARRewardPerWeek() {
|
|
2945
3001
|
var NEARToken = new Token(networkAddresses.tokens.WNEAR, getDecimal(networkAddresses.tokens.WNEAR));
|
|
2946
|
-
var
|
|
3002
|
+
var rewardStartTime = 1650636000;
|
|
3003
|
+
var rewardStopTime = 1651845600;
|
|
3004
|
+
var currentTime = getCurrentTimestamp();
|
|
2947
3005
|
|
|
2948
|
-
if (
|
|
2949
|
-
|
|
3006
|
+
if (currentTime <= rewardStopTime && currentTime > rewardStartTime) {
|
|
3007
|
+
var _BORROW_NEAR_REWARDS_;
|
|
3008
|
+
|
|
3009
|
+
var reward = (_BORROW_NEAR_REWARDS_ = BORROW_NEAR_REWARDS_PER_WEEK[this.underlying.address.toLocaleLowerCase()]) != null ? _BORROW_NEAR_REWARDS_ : "0";
|
|
3010
|
+
return new TokenAmount(NEARToken, reward, false);
|
|
2950
3011
|
} else {
|
|
2951
3012
|
return new TokenAmount(NEARToken, "0");
|
|
2952
3013
|
}
|
|
@@ -106618,6 +106679,7 @@ var AirdropRead = /*#__PURE__*/function (_BlockchainEntityRead2) {
|
|
|
106618
106679
|
|
|
106619
106680
|
_this2 = _BlockchainEntityRead2.call(this, networkConnection) || this;
|
|
106620
106681
|
_this2.keepTrackers = [];
|
|
106682
|
+
_this2._airDrop = new Contract(networkAddresses.misc.AURI_AIRDROP, AuriAirdropABI.abi, networkConnection.provider);
|
|
106621
106683
|
_this2._whitelistedAddresses = new Set(AIRDROP_WHITELIST_ADDRESSES.map(function (e) {
|
|
106622
106684
|
return e.toLocaleLowerCase();
|
|
106623
106685
|
}));
|
|
@@ -106723,8 +106785,106 @@ var AirdropRead = /*#__PURE__*/function (_BlockchainEntityRead2) {
|
|
|
106723
106785
|
return hasCompletedChallenge;
|
|
106724
106786
|
}();
|
|
106725
106787
|
|
|
106788
|
+
_proto2.getRedeemableReward = /*#__PURE__*/function () {
|
|
106789
|
+
var _getRedeemableReward = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee5(campaign, token, user) {
|
|
106790
|
+
var tokenInstance, rewards;
|
|
106791
|
+
return runtime_1.wrap(function _callee5$(_context5) {
|
|
106792
|
+
while (1) {
|
|
106793
|
+
switch (_context5.prev = _context5.next) {
|
|
106794
|
+
case 0:
|
|
106795
|
+
tokenInstance = new Token(token, getDecimal(token));
|
|
106796
|
+
_context5.next = 3;
|
|
106797
|
+
return this._airDrop.getRedeemableReward(utils.formatBytes32String(campaign), token, user);
|
|
106798
|
+
|
|
106799
|
+
case 3:
|
|
106800
|
+
rewards = _context5.sent;
|
|
106801
|
+
return _context5.abrupt("return", new TokenAmount(tokenInstance, rewards.toString()));
|
|
106802
|
+
|
|
106803
|
+
case 5:
|
|
106804
|
+
case "end":
|
|
106805
|
+
return _context5.stop();
|
|
106806
|
+
}
|
|
106807
|
+
}
|
|
106808
|
+
}, _callee5, this);
|
|
106809
|
+
}));
|
|
106810
|
+
|
|
106811
|
+
function getRedeemableReward(_x5, _x6, _x7) {
|
|
106812
|
+
return _getRedeemableReward.apply(this, arguments);
|
|
106813
|
+
}
|
|
106814
|
+
|
|
106815
|
+
return getRedeemableReward;
|
|
106816
|
+
}();
|
|
106817
|
+
|
|
106726
106818
|
return AirdropRead;
|
|
106727
106819
|
}(BlockchainEntityRead);
|
|
106820
|
+
var AirdropReadWrite = /*#__PURE__*/function (_AirdropRead) {
|
|
106821
|
+
_inheritsLoose(AirdropReadWrite, _AirdropRead);
|
|
106822
|
+
|
|
106823
|
+
function AirdropReadWrite() {
|
|
106824
|
+
return _AirdropRead.apply(this, arguments) || this;
|
|
106825
|
+
}
|
|
106826
|
+
|
|
106827
|
+
var _proto3 = AirdropReadWrite.prototype;
|
|
106828
|
+
|
|
106829
|
+
_proto3.redeemMultiple = /*#__PURE__*/function () {
|
|
106830
|
+
var _redeemMultiple = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee6(campaigns, tokens) {
|
|
106831
|
+
return runtime_1.wrap(function _callee6$(_context6) {
|
|
106832
|
+
while (1) {
|
|
106833
|
+
switch (_context6.prev = _context6.next) {
|
|
106834
|
+
case 0:
|
|
106835
|
+
assert(campaigns.length == tokens.length, "campaigns and tokens must have the same length");
|
|
106836
|
+
_context6.t0 = this._airDrop.connect(this._networkConnection.signer);
|
|
106837
|
+
_context6.t1 = campaigns.map(function (e) {
|
|
106838
|
+
return utils.formatBytes32String(e);
|
|
106839
|
+
});
|
|
106840
|
+
_context6.t2 = tokens;
|
|
106841
|
+
_context6.next = 6;
|
|
106842
|
+
return this._networkConnection.signer.getAddress();
|
|
106843
|
+
|
|
106844
|
+
case 6:
|
|
106845
|
+
_context6.t3 = _context6.sent;
|
|
106846
|
+
return _context6.abrupt("return", _context6.t0.redeem.call(_context6.t0, _context6.t1, _context6.t2, _context6.t3));
|
|
106847
|
+
|
|
106848
|
+
case 8:
|
|
106849
|
+
case "end":
|
|
106850
|
+
return _context6.stop();
|
|
106851
|
+
}
|
|
106852
|
+
}
|
|
106853
|
+
}, _callee6, this);
|
|
106854
|
+
}));
|
|
106855
|
+
|
|
106856
|
+
function redeemMultiple(_x8, _x9) {
|
|
106857
|
+
return _redeemMultiple.apply(this, arguments);
|
|
106858
|
+
}
|
|
106859
|
+
|
|
106860
|
+
return redeemMultiple;
|
|
106861
|
+
}();
|
|
106862
|
+
|
|
106863
|
+
_proto3.redeemSingle = /*#__PURE__*/function () {
|
|
106864
|
+
var _redeemSingle = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/runtime_1.mark(function _callee7(campaign, token) {
|
|
106865
|
+
return runtime_1.wrap(function _callee7$(_context7) {
|
|
106866
|
+
while (1) {
|
|
106867
|
+
switch (_context7.prev = _context7.next) {
|
|
106868
|
+
case 0:
|
|
106869
|
+
return _context7.abrupt("return", this.redeemMultiple([campaign], [token]));
|
|
106870
|
+
|
|
106871
|
+
case 1:
|
|
106872
|
+
case "end":
|
|
106873
|
+
return _context7.stop();
|
|
106874
|
+
}
|
|
106875
|
+
}
|
|
106876
|
+
}, _callee7, this);
|
|
106877
|
+
}));
|
|
106878
|
+
|
|
106879
|
+
function redeemSingle(_x10, _x11) {
|
|
106880
|
+
return _redeemSingle.apply(this, arguments);
|
|
106881
|
+
}
|
|
106882
|
+
|
|
106883
|
+
return redeemSingle;
|
|
106884
|
+
}();
|
|
106885
|
+
|
|
106886
|
+
return AirdropReadWrite;
|
|
106887
|
+
}(AirdropRead);
|
|
106728
106888
|
var Airdrop = /*#__PURE__*/function (_BlockchainEntity) {
|
|
106729
106889
|
_inheritsLoose(Airdrop, _BlockchainEntity);
|
|
106730
106890
|
|
|
@@ -106732,12 +106892,16 @@ var Airdrop = /*#__PURE__*/function (_BlockchainEntity) {
|
|
|
106732
106892
|
return _BlockchainEntity.call(this) || this;
|
|
106733
106893
|
}
|
|
106734
106894
|
|
|
106735
|
-
var
|
|
106895
|
+
var _proto4 = Airdrop.prototype;
|
|
106736
106896
|
|
|
106737
|
-
|
|
106897
|
+
_proto4.read = function read(networkConnection) {
|
|
106738
106898
|
return new AirdropRead(networkConnection);
|
|
106739
106899
|
};
|
|
106740
106900
|
|
|
106901
|
+
_proto4.readWrite = function readWrite(networkConnection) {
|
|
106902
|
+
return new AirdropReadWrite(networkConnection);
|
|
106903
|
+
};
|
|
106904
|
+
|
|
106741
106905
|
return Airdrop;
|
|
106742
106906
|
}(BlockchainEntity);
|
|
106743
106907
|
|
|
@@ -106746,5 +106910,5 @@ BigNumber.config({
|
|
|
106746
106910
|
DECIMAL_PLACES: 50
|
|
106747
106911
|
});
|
|
106748
106912
|
|
|
106749
|
-
export { AIRDROP_END_TIMESTAMP, AIRDROP_KEEP_THRESHOLD, AIRDROP_START_TIMESTAMP, AURORA_CHAINID, AURPLYToken, Airdrop, AirdropRead, AurPlyPid, BORROW_LIMIT_BUFFER, BlockchainEntity, BlockchainEntityRead, BlockchainEntityReadWrite, ComptrollerRewardType, DECIMAL_PRECISION, ETHAddress, INF, MarketAction, MoneyMarket, MoneyMarketRead, MoneyMarketReadWrite, ONE_DAY, ONE_YEAR, PLYToken, REWARDCLAIMSTART, SDK, SdkRead, SdkReadWrite, Token, TokenAmount, TransferEventQuery, calcLMRewardApr, calcValuation, decimalFactor, dummyAddress, dummyMarketAddress, dummyPly, dummyPlyAurora, dummyToken, dummyTokenAmount, dummyTokenAmount2, dummyTokenAmount3, dummyUserMarketDetails, dummyZeroTokenAmount, fetchLPPositions, fetchLPPrice, fetchPrice, fetchPriceFromCoingecko, fetchPriceFromCoingeckoAPI, fetchPriceFromOracle, fetchStNEARPrice, fetchUnderlyingTokensPrices, fetchValuation, formatObject, getBlockBeforeTimestamp, getBlockTimestamp, getCurrentTimestamp, getDecimal, isSameAddress, networkAddresses, validateAndParseAddress };
|
|
106913
|
+
export { AIRDROP_END_TIMESTAMP, AIRDROP_KEEP_THRESHOLD, AIRDROP_START_TIMESTAMP, AURORA_CHAINID, AURPLYToken, Airdrop, AirdropRead, AirdropReadWrite, AurPlyPid, BORROW_LIMIT_BUFFER, BORROW_NEAR_REWARDS_PER_WEEK, BlockchainEntity, BlockchainEntityRead, BlockchainEntityReadWrite, ComptrollerRewardType, DECIMAL_PRECISION, DEPOSIT_NEAR_REWARDS_PER_WEEK, ETHAddress, INF, MarketAction, MoneyMarket, MoneyMarketRead, MoneyMarketReadWrite, ONE_DAY, ONE_YEAR, PLYToken, REWARDCLAIMSTART, SDK, SdkRead, SdkReadWrite, Token, TokenAmount, TransferEventQuery, calcLMRewardApr, calcValuation, decimalFactor, dummyAddress, dummyMarketAddress, dummyPly, dummyPlyAurora, dummyToken, dummyTokenAmount, dummyTokenAmount2, dummyTokenAmount3, dummyUserMarketDetails, dummyZeroTokenAmount, fetchLPPositions, fetchLPPrice, fetchPrice, fetchPriceFromCoingecko, fetchPriceFromCoingeckoAPI, fetchPriceFromOracle, fetchStNEARPrice, fetchUnderlyingTokensPrices, fetchValuation, formatObject, getBlockBeforeTimestamp, getBlockTimestamp, getCurrentTimestamp, getDecimal, getDecimalsViaContract, isSameAddress, networkAddresses, validateAndParseAddress };
|
|
106750
106914
|
//# sourceMappingURL=sdk.esm.js.map
|