sacredrealm-sdk 1.0.4 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sacredrealm-sdk",
3
- "version": "1.0.4",
3
+ "version": "1.0.8",
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.4"
26
+ "sacredrealm-core": "^1.0.8"
27
27
  },
28
28
  "devDependencies": {
29
29
  "tsdx": "^0.14.1"
package/src/constant.ts CHANGED
@@ -11,10 +11,10 @@ export function token(env?: string) {
11
11
  }
12
12
  } else {
13
13
  return {
14
- SB: '0x',
15
- SN: '0x',
14
+ SB: '0xa844b28aBf7aF74438131A1aF642Ef0CCAa8C166',
15
+ SN: '0xb2761cd8EFD9f436Efa1b205dEB1dC957300Ede5',
16
16
  ST: '0x',
17
- SR: '0x',
17
+ SR: '0x7c3323f3d283b46514600cD9AD3F5e821F679b7f',
18
18
  BUSD: '0x78867BbEeF44f2326bF8DDd1941a4439382EF2A7',
19
19
  WBNB: '0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd',
20
20
  };
@@ -25,12 +25,20 @@ export function contract(env?: string) {
25
25
  const environment = env || process.env.NODE_ENV;
26
26
  if (environment === 'production') {
27
27
  return {
28
+ Inviting: '0x',
28
29
  BondDepository: '0x',
30
+ STStaking: '0x',
31
+ SRDeposit: '0x',
32
+ SRWithdraw: '0x',
29
33
  PancakeRouter: '0x10ED43C718714eb63d5aA57B78B54704E256024E',
30
34
  };
31
35
  } else {
32
36
  return {
37
+ Inviting: '0x',
33
38
  BondDepository: '0x',
39
+ STStaking: '0x',
40
+ SRDeposit: '0x2e8d3785b157104Fa0cF8436499367A64bE0caf1',
41
+ SRWithdraw: '0x2Bb766e8b9C14Ea8C8aD182D5861cc8D809B77c6',
34
42
  PancakeRouter: '0x9Ac64Cc6e4415144C455BD8E4837Fea55603e5c3',
35
43
  };
36
44
  }
package/src/index.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './pool';
2
2
  export * from './token';
3
+ export * from './tool';
3
4
  export * from './constant';
4
5
  export * from './utils';
@@ -0,0 +1,6 @@
1
+ import { ERC20__factory } from 'sacredrealm-core/typechain-types'
2
+ import { rpcProvider } from '../utils';
3
+
4
+ export function erc20(tokenAddr: string) {
5
+ return ERC20__factory.connect(tokenAddr, rpcProvider);
6
+ }
@@ -1,3 +1,4 @@
1
+ export * from './ERC20';
1
2
  export * from './SB';
2
3
  export * from './SN';
3
4
  export * from './ST';
@@ -0,0 +1,7 @@
1
+ import { SRDeposit__factory } from 'sacredrealm-core/typechain-types'
2
+ import { rpcProvider } from '../utils';
3
+ import { contract } from '../constant';
4
+
5
+ export function srDeposit() {
6
+ return SRDeposit__factory.connect(contract().SRDeposit, rpcProvider);
7
+ }
@@ -0,0 +1,7 @@
1
+ import { SRWithdraw__factory } from 'sacredrealm-core/typechain-types'
2
+ import { rpcProvider } from '../utils';
3
+ import { contract } from '../constant';
4
+
5
+ export function srWithdraw() {
6
+ return SRWithdraw__factory.connect(contract().SRWithdraw, rpcProvider);
7
+ }
@@ -0,0 +1,2 @@
1
+ export * from './SRDeposit';
2
+ export * from './SRWithdraw';