@upcoming/multichain-library 0.7.0 → 0.7.1
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.
|
@@ -10,4 +10,8 @@ export interface CreateBatchGnosisOptions {
|
|
|
10
10
|
immutable: boolean;
|
|
11
11
|
nonce?: number;
|
|
12
12
|
}
|
|
13
|
-
export
|
|
13
|
+
export interface CreateBatchResult {
|
|
14
|
+
transactionHash: `0x${string}`;
|
|
15
|
+
batchId: `0x${string}`;
|
|
16
|
+
}
|
|
17
|
+
export declare function createBatchGnosis(options: CreateBatchGnosisOptions, settings: MultichainLibrarySettings, jsonRpcProvider: RollingValueProvider<string>): Promise<CreateBatchResult>;
|
|
@@ -18,7 +18,7 @@ async function createBatchGnosis(options, settings, jsonRpcProvider) {
|
|
|
18
18
|
});
|
|
19
19
|
for (let i = 0; i < 4; i++) {
|
|
20
20
|
try {
|
|
21
|
-
const
|
|
21
|
+
const transactionHash = await client.writeContract({
|
|
22
22
|
account,
|
|
23
23
|
abi: GnosisPostageStampAbi_1.GnosisPostageStampABI,
|
|
24
24
|
address: Constants_1.Constants.postageStampGnosisAddress,
|
|
@@ -37,7 +37,7 @@ async function createBatchGnosis(options, settings, jsonRpcProvider) {
|
|
|
37
37
|
chain: chains_1.gnosis,
|
|
38
38
|
nonce: options.nonce ?? (await (0, GnosisTransactionCount_1.getGnosisTransactionCount)(account.address, settings, jsonRpcProvider))
|
|
39
39
|
});
|
|
40
|
-
const payload = { jsonrpc: '2.0', id: 1, method: 'eth_getTransactionReceipt', params: [
|
|
40
|
+
const payload = { jsonrpc: '2.0', id: 1, method: 'eth_getTransactionReceipt', params: [transactionHash] };
|
|
41
41
|
for (let j = 0; j < 4; j++) {
|
|
42
42
|
try {
|
|
43
43
|
await cafe_utility_1.System.sleepMillis(cafe_utility_1.Dates.seconds(5));
|
|
@@ -52,7 +52,10 @@ async function createBatchGnosis(options, settings, jsonRpcProvider) {
|
|
|
52
52
|
if (event) {
|
|
53
53
|
const topics = cafe_utility_1.Types.asArray(event.topics);
|
|
54
54
|
if (topics[1]) {
|
|
55
|
-
return
|
|
55
|
+
return {
|
|
56
|
+
transactionHash,
|
|
57
|
+
batchId: cafe_utility_1.Types.asHexString(topics[1])
|
|
58
|
+
};
|
|
56
59
|
}
|
|
57
60
|
}
|
|
58
61
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { Constants } from './Constants';
|
|
|
3
3
|
import { ApproveGnosisBzzOptions } from './GnosisBzzApprove';
|
|
4
4
|
import { TransferGnosisBzzOptions } from './GnosisBzzTransfer';
|
|
5
5
|
import { TransferGnosisNativeOptions } from './GnosisNativeTransfer';
|
|
6
|
-
import { CreateBatchGnosisOptions } from './GnosisPostageStampCreateBatch';
|
|
6
|
+
import { CreateBatchGnosisOptions, CreateBatchResult } from './GnosisPostageStampCreateBatch';
|
|
7
7
|
import { GnosisSwapAutoOptions, GnosisSwapCustomOptions } from './GnosisSwap';
|
|
8
8
|
import { GnosisTransaction } from './GnosisTransaction';
|
|
9
9
|
import { MultiTransferGnosisNativeOptions, MultiTransferGnosisNativeResult } from './MultiGnosisNativeTransfer';
|
|
@@ -26,7 +26,7 @@ export declare class MultichainLibrary {
|
|
|
26
26
|
multiTransferGnosisNative(options: MultiTransferGnosisNativeOptions): Promise<MultiTransferGnosisNativeResult>;
|
|
27
27
|
transferGnosisBzz(options: TransferGnosisBzzOptions): Promise<`0x${string}`>;
|
|
28
28
|
approveGnosisBzz(options: ApproveGnosisBzzOptions): Promise<`0x${string}`>;
|
|
29
|
-
createBatchGnosis(options: CreateBatchGnosisOptions): Promise
|
|
29
|
+
createBatchGnosis(options: CreateBatchGnosisOptions): Promise<CreateBatchResult>;
|
|
30
30
|
getStoragePriceGnosis(): Promise<bigint>;
|
|
31
31
|
waitForGnosisBzzBalanceToIncrease(address: string, initialBalance: bigint): Promise<void>;
|
|
32
32
|
waitForGnosisNativeBalanceToDecrease(address: `0x${string}`, initialBalance: bigint): Promise<void>;
|