@sign-global/tokentable-core 1.2.1 → 1.2.2
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 +6 -0
- package/dist/index.js +2 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/constants/chain-config.ts +2 -2
- package/src/contracts/sui/BaseDistributorClient.ts +0 -7
- package/src/contracts/sui/DistributorWithFeeClient.ts +0 -1
package/package.json
CHANGED
|
@@ -107,11 +107,11 @@ export const ChainConfig = {
|
|
|
107
107
|
rpcUrl: solanaMainNet.rpcUrls.default.http[0]
|
|
108
108
|
},
|
|
109
109
|
[suiTestNet.id]: {
|
|
110
|
-
contractAddress: '
|
|
110
|
+
contractAddress: '0xeb9691cd945745a89fd497746d30fb1a1e936865c6c514817d913fadef66df44',
|
|
111
111
|
rpcUrl: suiTestNet.rpcUrls.default.http[0]
|
|
112
112
|
},
|
|
113
113
|
[suiMainNet.id]: {
|
|
114
|
-
contractAddress: '',
|
|
114
|
+
contractAddress: '0x3f73ec78d3e8a99277496edb6183d6075490983c2a29542a1c3f709aa31169b5',
|
|
115
115
|
rpcUrl: suiMainNet.rpcUrls.default.http[0]
|
|
116
116
|
}
|
|
117
117
|
};
|
|
@@ -20,8 +20,6 @@ export class SuiBaseDistributorClient extends SuiContractClientBase {
|
|
|
20
20
|
|
|
21
21
|
const result = await this.signAndExecute(tx);
|
|
22
22
|
|
|
23
|
-
console.log(result, 'res');
|
|
24
|
-
|
|
25
23
|
let distributorId: string | undefined;
|
|
26
24
|
if (result.effects?.created) {
|
|
27
25
|
const createdObj = result.effects.created.find(
|
|
@@ -71,7 +69,6 @@ export class SuiBaseDistributorClient extends SuiContractClientBase {
|
|
|
71
69
|
}
|
|
72
70
|
|
|
73
71
|
async getDistributorInfo() {
|
|
74
|
-
console.log(this.client, this.distributorId, 'distributorId');
|
|
75
72
|
const res = await this.client.getObject({
|
|
76
73
|
id: this.distributorId!,
|
|
77
74
|
options: { showContent: true }
|
|
@@ -121,7 +118,6 @@ export class SuiBaseDistributorClient extends SuiContractClientBase {
|
|
|
121
118
|
[coinType],
|
|
122
119
|
[this.distributorId!, claimIdsBytes]
|
|
123
120
|
);
|
|
124
|
-
console.log(res, 'claims');
|
|
125
121
|
|
|
126
122
|
const [data, type] = res;
|
|
127
123
|
|
|
@@ -140,7 +136,6 @@ export class SuiBaseDistributorClient extends SuiContractClientBase {
|
|
|
140
136
|
[],
|
|
141
137
|
[projectRegistryId, Array.from(Buffer.from(projectId, 'utf8'))]
|
|
142
138
|
);
|
|
143
|
-
console.log(distributorId, 'id');
|
|
144
139
|
return distributorId.Some;
|
|
145
140
|
}
|
|
146
141
|
|
|
@@ -152,8 +147,6 @@ export class SuiBaseDistributorClient extends SuiContractClientBase {
|
|
|
152
147
|
}
|
|
153
148
|
});
|
|
154
149
|
|
|
155
|
-
console.log(objects, 'objects');
|
|
156
|
-
|
|
157
150
|
// 获取 OwnerCap 对象ID
|
|
158
151
|
const ownerCapId = objects.data[0]?.data?.objectId;
|
|
159
152
|
|
|
@@ -36,7 +36,6 @@ export class SuiDistributorWithFeeClient extends SuiContractClientBase {
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
async claimWithFee(coinType: string, feeCollector: string, data: ISignatureClaimData[]) {
|
|
39
|
-
console.log(data, feeCollector, this.distributorId, 'data');
|
|
40
39
|
const recipients = data.map((item) => item.recipient);
|
|
41
40
|
const claimIds = data.map((item) => item.claimId);
|
|
42
41
|
const signatures = data.map((item) => item.signature);
|