sacredrealm-sdk 1.0.2 → 1.0.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/package.json +2 -2
- package/src/constant.ts +7 -3
- package/src/index.ts +3 -1
- package/src/pool/BondDepository.ts +7 -0
- package/src/pool/index.ts +1 -0
- package/src/token/ERC20.ts +6 -0
- package/src/token/index.ts +1 -0
- package/src/utils.ts +2 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "sacredrealm-sdk",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.6",
|
4
4
|
"description": "",
|
5
5
|
"main": "src/index.ts",
|
6
6
|
"scripts": {
|
@@ -23,7 +23,7 @@
|
|
23
23
|
"@walletconnect/web3-provider": "^1.7.5",
|
24
24
|
"ethers": "^5.6.1",
|
25
25
|
"graphql": "^16.3.0",
|
26
|
-
"sacredrealm-core": "^1.0.
|
26
|
+
"sacredrealm-core": "^1.0.4"
|
27
27
|
},
|
28
28
|
"devDependencies": {
|
29
29
|
"tsdx": "^0.14.1"
|
package/src/constant.ts
CHANGED
@@ -7,14 +7,16 @@ export function token(env?: string) {
|
|
7
7
|
ST: '0x',
|
8
8
|
SR: '0x',
|
9
9
|
BUSD: '0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56',
|
10
|
+
WBNB: '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c',
|
10
11
|
}
|
11
12
|
} else {
|
12
13
|
return {
|
13
|
-
SB: '
|
14
|
-
SN: '
|
14
|
+
SB: '0xa844b28aBf7aF74438131A1aF642Ef0CCAa8C166',
|
15
|
+
SN: '0xb2761cd8EFD9f436Efa1b205dEB1dC957300Ede5',
|
15
16
|
ST: '0x',
|
16
17
|
SR: '0x',
|
17
|
-
BUSD: '
|
18
|
+
BUSD: '0x78867BbEeF44f2326bF8DDd1941a4439382EF2A7',
|
19
|
+
WBNB: '0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd',
|
18
20
|
};
|
19
21
|
}
|
20
22
|
};
|
@@ -23,10 +25,12 @@ export function contract(env?: string) {
|
|
23
25
|
const environment = env || process.env.NODE_ENV;
|
24
26
|
if (environment === 'production') {
|
25
27
|
return {
|
28
|
+
BondDepository: '0x',
|
26
29
|
PancakeRouter: '0x10ED43C718714eb63d5aA57B78B54704E256024E',
|
27
30
|
};
|
28
31
|
} else {
|
29
32
|
return {
|
33
|
+
BondDepository: '0x',
|
30
34
|
PancakeRouter: '0x9Ac64Cc6e4415144C455BD8E4837Fea55603e5c3',
|
31
35
|
};
|
32
36
|
}
|
package/src/index.ts
CHANGED
@@ -0,0 +1,7 @@
|
|
1
|
+
import { BondDepository__factory } from 'sacredrealm-core/typechain-types'
|
2
|
+
import { rpcProvider } from '../utils';
|
3
|
+
import { contract } from '../constant';
|
4
|
+
|
5
|
+
export function bondDepository() {
|
6
|
+
return BondDepository__factory.connect(contract().BondDepository, rpcProvider);
|
7
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './BondDepository';
|
package/src/token/index.ts
CHANGED
package/src/utils.ts
CHANGED
@@ -4,6 +4,7 @@ import { token, network } from './constant';
|
|
4
4
|
|
5
5
|
export const util = utils;
|
6
6
|
export const constant = constants;
|
7
|
+
export const bn = BigNumber;
|
7
8
|
|
8
9
|
export const rpcProvider = new ethers.providers.JsonRpcProvider(network().rpcUrls[0]);
|
9
10
|
let web3Provider = newWeb3Provider(localStorage.getItem('walletType'));
|
@@ -103,7 +104,7 @@ export function getRandomNumber(snId: number, slot: string, base: number, range:
|
|
103
104
|
}
|
104
105
|
|
105
106
|
export function getSourceUrl(attr: number[]) {
|
106
|
-
const cdn = '//cdn.sealemlab.
|
107
|
+
const cdn = '//cdn.sealemlab.com/nft';
|
107
108
|
|
108
109
|
const starArr = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11'];
|
109
110
|
const snClassArr = ['Gl', 'As', 'Wi', 'Fi'];
|