@aurigami/sdk 1.12.0-beta5 → 1.12.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/dist/abis/index.d.ts +2 -2
- package/dist/entities/auriEnv.d.ts +3 -3
- package/dist/sdk.cjs.development.js +18 -18
- 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 +18 -18
- package/dist/sdk.esm.js.map +1 -1
- package/package.json +3 -3
- package/src/a.ts.log +29 -0
- package/src/abis/index.ts +2 -2
- package/src/consts/constants.ts +0 -1
- package/src/entities/auriEnv.ts +8 -8
- package/src/interactors/Referral.ts +8 -14
package/dist/sdk.esm.js
CHANGED
|
@@ -15,7 +15,7 @@ import abis$d from '@aurigami/contracts/artifacts/contracts/mock/AuriInternalLen
|
|
|
15
15
|
import IUniswapV2PairABI from '@aurigami/contracts/artifacts/contracts/mock/IUniswapV2Pair.sol/IUniswapV2Pair.json';
|
|
16
16
|
import abis$b from '@aurigami/contracts/artifacts/contracts/mock/Multicall2.sol/Multicall2.json';
|
|
17
17
|
import abis$c from '@aurigami/contracts/artifacts/contracts/PULP.sol/PULP.json';
|
|
18
|
-
import abis$7 from '@aurigami/contracts/artifacts/contracts/
|
|
18
|
+
import abis$7 from '@aurigami/contracts/artifacts/contracts/ReferralDirectory.sol/ReferralDirectory.json';
|
|
19
19
|
import abis$e from '@aurigami/contracts/artifacts/contracts/plygame/PlyGame.sol/PlyGame.json';
|
|
20
20
|
import MAINNET_ADDRESSES from '@aurigami/contracts/deployments/aurora_mainnet.json';
|
|
21
21
|
export { default as MAINNET_ADDRESSES } from '@aurigami/contracts/deployments/aurora_mainnet.json';
|
|
@@ -35,7 +35,7 @@ var index = {
|
|
|
35
35
|
AuriLensABI: abis$4,
|
|
36
36
|
ComptrollerABI: abis$5,
|
|
37
37
|
EIP20InterfaceABI: abis$6,
|
|
38
|
-
|
|
38
|
+
ReferralDirectoryABI: abis$7,
|
|
39
39
|
AuErc20ABI: abis$8,
|
|
40
40
|
AuETHABI: abis$9,
|
|
41
41
|
EthRepayHelperABI: abis$a,
|
|
@@ -110,7 +110,6 @@ var networkAddresses = {
|
|
|
110
110
|
PULP_CONTRACT: /*#__PURE__*/'0x04ac48711bcdc45b4d223fb021e09da73c71095e'.toLowerCase(),
|
|
111
111
|
PLY_TOKEN_LOCK: /*#__PURE__*/MAINNET_ADDRESSES.plyTokenLock.toLowerCase(),
|
|
112
112
|
REFERRAL: /*#__PURE__*/MAINNET_ADDRESSES.referralDirectory.toLowerCase(),
|
|
113
|
-
REFERRAL_V2: /*#__PURE__*/'0xCECd147409B2d64A9A2E5418e3E471E8af19E0bd'.toLowerCase(),
|
|
114
113
|
AURI_INTERNAL_LENS: /*#__PURE__*/MAINNET_ADDRESSES.auriInternalLens.toLowerCase(),
|
|
115
114
|
PLYGAME: /*#__PURE__*/MAINNET_ADDRESSES.plyGame.toLowerCase()
|
|
116
115
|
},
|
|
@@ -1572,7 +1571,7 @@ var AuriEnv = /*#__PURE__*/function (_BlockchainEntityRead) {
|
|
|
1572
1571
|
_this._pulp = null;
|
|
1573
1572
|
_this._auriInternalLens = null;
|
|
1574
1573
|
_this._auriAirdrop = null;
|
|
1575
|
-
_this.
|
|
1574
|
+
_this._referralDirectory = null;
|
|
1576
1575
|
_this._oracle = null;
|
|
1577
1576
|
_this._plygame = null;
|
|
1578
1577
|
return _this;
|
|
@@ -1683,13 +1682,13 @@ var AuriEnv = /*#__PURE__*/function (_BlockchainEntityRead) {
|
|
|
1683
1682
|
return this._auriAirdrop;
|
|
1684
1683
|
}
|
|
1685
1684
|
}, {
|
|
1686
|
-
key: "
|
|
1685
|
+
key: "referralDirectory",
|
|
1687
1686
|
get: function get() {
|
|
1688
|
-
if (!this.
|
|
1689
|
-
this.
|
|
1687
|
+
if (!this._referralDirectory) {
|
|
1688
|
+
this._referralDirectory = this.getContract(networkAddresses.misc.REFERRAL, abis$7.abi);
|
|
1690
1689
|
}
|
|
1691
1690
|
|
|
1692
|
-
return this.
|
|
1691
|
+
return this._referralDirectory;
|
|
1693
1692
|
}
|
|
1694
1693
|
}, {
|
|
1695
1694
|
key: "oracle",
|
|
@@ -5111,7 +5110,7 @@ var ReferralRead = /*#__PURE__*/function (_BlockchainEntityRead) {
|
|
|
5111
5110
|
switch (_context.prev = _context.next) {
|
|
5112
5111
|
case 0:
|
|
5113
5112
|
_context.next = 2;
|
|
5114
|
-
return this.env.
|
|
5113
|
+
return this.env.referralDirectory.userReferralCode(userAddr);
|
|
5115
5114
|
|
|
5116
5115
|
case 2:
|
|
5117
5116
|
result = _context.sent;
|
|
@@ -5146,7 +5145,7 @@ var ReferralRead = /*#__PURE__*/function (_BlockchainEntityRead) {
|
|
|
5146
5145
|
switch (_context2.prev = _context2.next) {
|
|
5147
5146
|
case 0:
|
|
5148
5147
|
_context2.next = 2;
|
|
5149
|
-
return this.env.
|
|
5148
|
+
return this.env.referralDirectory.referralCodeUsed(userAddr);
|
|
5150
5149
|
|
|
5151
5150
|
case 2:
|
|
5152
5151
|
result = _context2.sent;
|
|
@@ -5181,7 +5180,7 @@ var ReferralRead = /*#__PURE__*/function (_BlockchainEntityRead) {
|
|
|
5181
5180
|
switch (_context3.prev = _context3.next) {
|
|
5182
5181
|
case 0:
|
|
5183
5182
|
referralCode = ethers.utils.formatBytes32String(code);
|
|
5184
|
-
return _context3.abrupt("return", this.env.
|
|
5183
|
+
return _context3.abrupt("return", this.env.referralDirectory.referralCodeOwner(referralCode));
|
|
5185
5184
|
|
|
5186
5185
|
case 2:
|
|
5187
5186
|
case "end":
|
|
@@ -5283,10 +5282,9 @@ var ReferralRead = /*#__PURE__*/function (_BlockchainEntityRead) {
|
|
|
5283
5282
|
refereeAddress: null
|
|
5284
5283
|
};
|
|
5285
5284
|
});
|
|
5286
|
-
items = [referralRewardDummy1, referralRewardDummy2].concat(items);
|
|
5287
5285
|
return _context5.abrupt("return", items);
|
|
5288
5286
|
|
|
5289
|
-
case
|
|
5287
|
+
case 5:
|
|
5290
5288
|
case "end":
|
|
5291
5289
|
return _context5.stop();
|
|
5292
5290
|
}
|
|
@@ -5455,18 +5453,20 @@ var ReferralRead = /*#__PURE__*/function (_BlockchainEntityRead) {
|
|
|
5455
5453
|
switch (_context9.prev = _context9.next) {
|
|
5456
5454
|
case 0:
|
|
5457
5455
|
_context9.next = 2;
|
|
5458
|
-
return
|
|
5456
|
+
return getApi('/referral/whitelisted', {
|
|
5457
|
+
address: address
|
|
5458
|
+
});
|
|
5459
5459
|
|
|
5460
5460
|
case 2:
|
|
5461
5461
|
result = _context9.sent;
|
|
5462
|
-
return _context9.abrupt("return", result.
|
|
5462
|
+
return _context9.abrupt("return", result.isWhitelisted);
|
|
5463
5463
|
|
|
5464
5464
|
case 4:
|
|
5465
5465
|
case "end":
|
|
5466
5466
|
return _context9.stop();
|
|
5467
5467
|
}
|
|
5468
5468
|
}
|
|
5469
|
-
}, _callee9
|
|
5469
|
+
}, _callee9);
|
|
5470
5470
|
}));
|
|
5471
5471
|
|
|
5472
5472
|
function isWhitelistedAddress(_x9) {
|
|
@@ -5593,7 +5593,7 @@ var ReferralReadWrite = /*#__PURE__*/function (_ReferralRead) {
|
|
|
5593
5593
|
switch (_context13.prev = _context13.next) {
|
|
5594
5594
|
case 0:
|
|
5595
5595
|
referralCode = ethers.utils.formatBytes32String(this.generateReferralCode());
|
|
5596
|
-
return _context13.abrupt("return", this.env.
|
|
5596
|
+
return _context13.abrupt("return", this.env.referralDirectory.connect(this._networkConnection.signer).registerNewUserReferralCode(referralCode));
|
|
5597
5597
|
|
|
5598
5598
|
case 2:
|
|
5599
5599
|
case "end":
|
|
@@ -5624,7 +5624,7 @@ var ReferralReadWrite = /*#__PURE__*/function (_ReferralRead) {
|
|
|
5624
5624
|
switch (_context14.prev = _context14.next) {
|
|
5625
5625
|
case 0:
|
|
5626
5626
|
referralCode = ethers.utils.formatBytes32String(code);
|
|
5627
|
-
return _context14.abrupt("return", this.env.
|
|
5627
|
+
return _context14.abrupt("return", this.env.referralDirectory.connect(this._networkConnection.signer).registerReferralCodeUsed(referralCode));
|
|
5628
5628
|
|
|
5629
5629
|
case 2:
|
|
5630
5630
|
case "end":
|