@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/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -382,11 +382,11 @@ var ChainConfig = {
|
|
|
382
382
|
rpcUrl: solanaMainNet.rpcUrls.default.http[0]
|
|
383
383
|
},
|
|
384
384
|
[suiTestNet.id]: {
|
|
385
|
-
contractAddress: "
|
|
385
|
+
contractAddress: "0xeb9691cd945745a89fd497746d30fb1a1e936865c6c514817d913fadef66df44",
|
|
386
386
|
rpcUrl: suiTestNet.rpcUrls.default.http[0]
|
|
387
387
|
},
|
|
388
388
|
[suiMainNet.id]: {
|
|
389
|
-
contractAddress: "",
|
|
389
|
+
contractAddress: "0x3f73ec78d3e8a99277496edb6183d6075490983c2a29542a1c3f709aa31169b5",
|
|
390
390
|
rpcUrl: suiMainNet.rpcUrls.default.http[0]
|
|
391
391
|
}
|
|
392
392
|
};
|
|
@@ -12476,7 +12476,6 @@ var SuiBaseDistributorClient = class extends SuiContractClientBase {
|
|
|
12476
12476
|
arguments: [tx.pure(projectIdBytes), tx.object(projectRegistryId)]
|
|
12477
12477
|
});
|
|
12478
12478
|
const result = await this.signAndExecute(tx);
|
|
12479
|
-
console.log(result, "res");
|
|
12480
12479
|
let distributorId;
|
|
12481
12480
|
if (result.effects?.created) {
|
|
12482
12481
|
const createdObj = result.effects.created.find(
|
|
@@ -12517,7 +12516,6 @@ var SuiBaseDistributorClient = class extends SuiContractClientBase {
|
|
|
12517
12516
|
return this.signAndExecute(tx);
|
|
12518
12517
|
}
|
|
12519
12518
|
async getDistributorInfo() {
|
|
12520
|
-
console.log(this.client, this.distributorId, "distributorId");
|
|
12521
12519
|
const res = await this.client.getObject({
|
|
12522
12520
|
id: this.distributorId,
|
|
12523
12521
|
options: { showContent: true }
|
|
@@ -12556,7 +12554,6 @@ var SuiBaseDistributorClient = class extends SuiContractClientBase {
|
|
|
12556
12554
|
[coinType],
|
|
12557
12555
|
[this.distributorId, claimIdsBytes]
|
|
12558
12556
|
);
|
|
12559
|
-
console.log(res, "claims");
|
|
12560
12557
|
const [data, type] = res;
|
|
12561
12558
|
if (type === "vector<bool>" && data) {
|
|
12562
12559
|
const uint8Array = new Uint8Array(data);
|
|
@@ -12570,7 +12567,6 @@ var SuiBaseDistributorClient = class extends SuiContractClientBase {
|
|
|
12570
12567
|
[],
|
|
12571
12568
|
[projectRegistryId, Array.from(Buffer.from(projectId, "utf8"))]
|
|
12572
12569
|
);
|
|
12573
|
-
console.log(distributorId, "id");
|
|
12574
12570
|
return distributorId.Some;
|
|
12575
12571
|
}
|
|
12576
12572
|
async getOwnerCapId() {
|
|
@@ -12580,7 +12576,6 @@ var SuiBaseDistributorClient = class extends SuiContractClientBase {
|
|
|
12580
12576
|
StructType: `${this.packageId}::ownable::OwnerCap`
|
|
12581
12577
|
}
|
|
12582
12578
|
});
|
|
12583
|
-
console.log(objects, "objects");
|
|
12584
12579
|
const ownerCapId = objects.data[0]?.data?.objectId;
|
|
12585
12580
|
return ownerCapId;
|
|
12586
12581
|
}
|
|
@@ -12610,7 +12605,6 @@ var SuiDistributorWithFeeClient = class extends SuiContractClientBase {
|
|
|
12610
12605
|
throw new Error(`Insufficient balance. Required: ${totalFeesStr}, Available coins: ${coins.data.length}`);
|
|
12611
12606
|
}
|
|
12612
12607
|
async claimWithFee(coinType, feeCollector, data) {
|
|
12613
|
-
console.log(data, feeCollector, this.distributorId, "data");
|
|
12614
12608
|
const recipients = data.map((item) => item.recipient);
|
|
12615
12609
|
const claimIds = data.map((item) => item.claimId);
|
|
12616
12610
|
const signatures = data.map((item) => item.signature);
|