@agoric/orchestration 0.2.0 → 0.2.1-upgrade-23-dev-bd79330.0.bd79330
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/index.js +0 -4
- package/package.json +27 -27
- package/src/axelar-types.d.ts +2 -0
- package/src/axelar-types.d.ts.map +1 -1
- package/src/axelar-types.js +2 -0
- package/src/cctp-chain-info.js +4 -1
- package/src/chain-info.d.ts +21 -6
- package/src/chain-info.d.ts.map +1 -1
- package/src/chain-info.js +9 -8
- package/src/cosmos-api.d.ts +102 -29
- package/src/cosmos-api.d.ts.map +1 -1
- package/src/cosmos-api.js +585 -0
- package/src/{ethereum-api.ts → ethereum-api.js} +1 -1
- package/src/examples/auto-stake-it-tap-kit.d.ts +4 -3
- package/src/examples/auto-stake-it-tap-kit.d.ts.map +1 -1
- package/src/examples/auto-stake-it-tap-kit.js +3 -4
- package/src/examples/auto-stake-it.contract.d.ts +6 -4
- package/src/examples/auto-stake-it.contract.d.ts.map +1 -1
- package/src/examples/auto-stake-it.contract.js +3 -1
- package/src/examples/auto-stake-it.flows.d.ts +2 -1
- package/src/examples/auto-stake-it.flows.d.ts.map +1 -1
- package/src/examples/auto-stake-it.flows.js +1 -0
- package/src/examples/axelar-gmp-account-kit.d.ts +6 -4
- package/src/examples/axelar-gmp-account-kit.d.ts.map +1 -1
- package/src/examples/axelar-gmp-account-kit.js +4 -2
- package/src/examples/axelar-gmp.contract.d.ts +8 -8
- package/src/examples/axelar-gmp.contract.d.ts.map +1 -1
- package/src/examples/axelar-gmp.contract.js +2 -2
- package/src/examples/axelar-gmp.flows.d.ts +1 -1
- package/src/examples/basic-flows.contract.d.ts +7 -5
- package/src/examples/basic-flows.contract.d.ts.map +1 -1
- package/src/examples/basic-flows.contract.js +3 -1
- package/src/examples/basic-flows.flows.d.ts +2 -1
- package/src/examples/basic-flows.flows.d.ts.map +1 -1
- package/src/examples/basic-flows.flows.js +1 -0
- package/src/examples/send-anywhere.contract.d.ts +12 -6
- package/src/examples/send-anywhere.contract.d.ts.map +1 -1
- package/src/examples/send-anywhere.contract.js +4 -1
- package/src/examples/send-anywhere.flows.d.ts +3 -2
- package/src/examples/send-anywhere.flows.d.ts.map +1 -1
- package/src/examples/send-anywhere.flows.js +3 -6
- package/src/examples/stake-bld.contract.d.ts +206 -25
- package/src/examples/stake-bld.contract.d.ts.map +1 -1
- package/src/examples/stake-bld.contract.js +19 -4
- package/src/examples/stake-ica.contract.d.ts +434 -71
- package/src/examples/stake-ica.contract.d.ts.map +1 -1
- package/src/examples/stake-ica.contract.js +28 -6
- package/src/examples/staking-combinations.contract.d.ts +4 -2
- package/src/examples/staking-combinations.contract.d.ts.map +1 -1
- package/src/examples/staking-combinations.contract.js +5 -3
- package/src/examples/staking-combinations.flows.d.ts +3 -2
- package/src/examples/staking-combinations.flows.d.ts.map +1 -1
- package/src/examples/staking-combinations.flows.js +7 -6
- package/src/examples/swap-anything.contract.d.ts +14 -7
- package/src/examples/swap-anything.contract.d.ts.map +1 -1
- package/src/examples/swap-anything.contract.js +12 -8
- package/src/examples/swap.contract.d.ts +18 -6
- package/src/examples/swap.contract.d.ts.map +1 -1
- package/src/examples/swap.contract.js +9 -3
- package/src/examples/swap.flows.d.ts +2 -0
- package/src/examples/swap.flows.d.ts.map +1 -1
- package/src/examples/swap.flows.js +2 -0
- package/src/examples/unbond.contract.d.ts +7 -4
- package/src/examples/unbond.contract.d.ts.map +1 -1
- package/src/examples/unbond.contract.js +6 -3
- package/src/exos/chain-hub-admin.d.ts +1 -19
- package/src/exos/chain-hub-admin.d.ts.map +1 -1
- package/src/exos/chain-hub-admin.js +1 -1
- package/src/exos/chain-hub.d.ts +4 -2
- package/src/exos/chain-hub.d.ts.map +1 -1
- package/src/exos/chain-hub.js +2 -1
- package/src/exos/combine-invitation-makers.d.ts +2 -1
- package/src/exos/combine-invitation-makers.d.ts.map +1 -1
- package/src/exos/combine-invitation-makers.js +2 -1
- package/src/exos/cosmos-orchestration-account.d.ts +615 -98
- package/src/exos/cosmos-orchestration-account.d.ts.map +1 -1
- package/src/exos/cosmos-orchestration-account.js +695 -306
- package/src/exos/exo-interfaces.js +35 -0
- package/src/exos/ibc-packet.d.ts +11 -9
- package/src/exos/ibc-packet.d.ts.map +1 -1
- package/src/exos/ibc-packet.js +33 -8
- package/src/exos/ica-account-kit.d.ts +4 -9
- package/src/exos/ica-account-kit.d.ts.map +1 -1
- package/src/exos/ica-account-kit.js +10 -7
- package/src/exos/icq-connection-kit.d.ts +1 -1
- package/src/exos/local-chain-facade.d.ts +1542 -5
- package/src/exos/local-chain-facade.d.ts.map +1 -1
- package/src/exos/local-chain-facade.js +4 -2
- package/src/exos/local-orchestration-account.d.ts +201 -56
- package/src/exos/local-orchestration-account.d.ts.map +1 -1
- package/src/exos/local-orchestration-account.js +260 -51
- package/src/exos/orchestrator.d.ts +35813 -73
- package/src/exos/orchestrator.d.ts.map +1 -1
- package/src/exos/orchestrator.js +7 -10
- package/src/exos/packet-tools.d.ts +19 -8
- package/src/exos/packet-tools.d.ts.map +1 -1
- package/src/exos/packet-tools.js +92 -9
- package/src/exos/portfolio-holder-kit.d.ts +90 -2
- package/src/exos/portfolio-holder-kit.d.ts.map +1 -1
- package/src/exos/remote-chain-facade.d.ts +1499 -1
- package/src/exos/remote-chain-facade.d.ts.map +1 -1
- package/src/exos/remote-chain-facade.js +8 -3
- package/src/facade.d.ts +1 -0
- package/src/facade.d.ts.map +1 -1
- package/src/facade.js +4 -6
- package/src/fixtures/query-flows.contract.d.ts +8 -6
- package/src/fixtures/query-flows.contract.d.ts.map +1 -1
- package/src/fixtures/query-flows.contract.js +3 -1
- package/src/fixtures/query-flows.flows.d.ts +1 -0
- package/src/fixtures/query-flows.flows.d.ts.map +1 -1
- package/src/fixtures/query-flows.flows.js +1 -0
- package/src/orchestration-api.d.ts +46 -16
- package/src/orchestration-api.d.ts.map +1 -1
- package/src/orchestration-api.js +410 -0
- package/src/proposals/init-chain-info.js +10 -2
- package/src/proposals/orchestration-proposal.js +3 -0
- package/src/proposals/revise-chain-info.js +4 -1
- package/src/proposals/start-auto-stake-it.js +1 -0
- package/src/proposals/start-axelar-gmp.js +2 -2
- package/src/proposals/start-basic-flows.js +5 -0
- package/src/proposals/start-send-anywhere.js +4 -2
- package/src/proposals/start-stakeAtom.js +5 -4
- package/src/proposals/start-stakeBld.js +8 -6
- package/src/proposals/start-stakeOsmo.js +5 -4
- package/src/proposals/start-swap-anything.js +4 -2
- package/src/stubs/{viem-abi.d.ts → viem-typedData.js} +10 -4
- package/src/typeGuards.d.ts +38 -5
- package/src/typeGuards.d.ts.map +1 -1
- package/src/typeGuards.js +92 -22
- package/src/types.d.ts +1 -0
- package/src/types.d.ts.map +1 -1
- package/src/types.js +27 -0
- package/src/utils/abitype.d.ts +6 -0
- package/src/utils/abitype.d.ts.map +1 -0
- package/src/utils/abitype.js +13 -0
- package/src/utils/address.d.ts +3 -1
- package/src/utils/address.d.ts.map +1 -1
- package/src/utils/address.js +24 -2
- package/src/utils/agd-lib.d.ts +1 -51
- package/src/utils/agd-lib.d.ts.map +1 -1
- package/src/utils/agd-lib.js +1 -1
- package/src/utils/amounts.d.ts +1 -0
- package/src/utils/amounts.d.ts.map +1 -1
- package/src/utils/amounts.js +1 -0
- package/src/utils/asset.d.ts +1 -0
- package/src/utils/asset.d.ts.map +1 -1
- package/src/utils/asset.js +1 -0
- package/src/utils/chain-hub-helper.d.ts +1 -0
- package/src/utils/chain-hub-helper.d.ts.map +1 -1
- package/src/utils/chain-hub-helper.js +1 -0
- package/src/utils/codecs.d.ts +145 -0
- package/src/utils/codecs.d.ts.map +1 -0
- package/src/utils/codecs.js +206 -0
- package/src/utils/cosmos.d.ts +5 -4
- package/src/utils/cosmos.d.ts.map +1 -1
- package/src/utils/cosmos.js +29 -9
- package/src/utils/exo-helpers.d.ts +156 -0
- package/src/utils/exo-helpers.d.ts.map +1 -0
- package/src/utils/exo-helpers.js +241 -0
- package/src/utils/gmp.d.ts +2 -2
- package/src/utils/gmp.d.ts.map +1 -1
- package/src/utils/gmp.js +31 -15
- package/src/utils/orchestrationAccount.d.ts +79 -0
- package/src/utils/orchestrationAccount.d.ts.map +1 -1
- package/src/utils/orchestrationAccount.js +210 -6
- package/src/utils/packet.d.ts.map +1 -1
- package/src/utils/packet.js +5 -0
- package/src/utils/permit2/signatureTransfer.d.ts +221 -0
- package/src/utils/permit2/signatureTransfer.d.ts.map +1 -0
- package/src/utils/permit2/signatureTransfer.js +265 -0
- package/src/utils/permit2/signatureTransferHelpers.d.ts +334 -0
- package/src/utils/permit2/signatureTransferHelpers.d.ts.map +1 -0
- package/src/utils/permit2/signatureTransferHelpers.js +270 -0
- package/src/utils/permit2.d.ts +11 -0
- package/src/utils/permit2.d.ts.map +1 -0
- package/src/utils/permit2.js +11 -0
- package/src/utils/progress.d.ts +41 -0
- package/src/utils/progress.d.ts.map +1 -0
- package/src/utils/progress.js +180 -0
- package/src/utils/start-helper.d.ts +28 -10
- package/src/utils/start-helper.d.ts.map +1 -1
- package/src/utils/start-helper.js +30 -7
- package/src/utils/time.d.ts +2 -2
- package/src/utils/time.d.ts.map +1 -1
- package/src/utils/time.js +1 -1
- package/src/utils/viem-utils/hashTypedData.d.ts +21 -0
- package/src/utils/viem-utils/hashTypedData.d.ts.map +1 -0
- package/src/utils/viem-utils/hashTypedData.js +61 -0
- package/src/utils/viem-utils/types.d.ts +6 -0
- package/src/utils/viem-utils/types.d.ts.map +1 -0
- package/src/utils/viem-utils/types.js +18 -0
- package/src/utils/viem.d.ts +11 -0
- package/src/utils/viem.d.ts.map +1 -0
- package/src/utils/viem.js +11 -0
- package/src/utils/zcf-tools.d.ts +15 -1
- package/src/utils/zcf-tools.d.ts.map +1 -1
- package/src/utils/zcf-tools.js +19 -3
- package/src/utils/zoe-tools.d.ts +5 -2
- package/src/utils/zoe-tools.d.ts.map +1 -1
- package/src/utils/zoe-tools.js +8 -2
- package/src/vat-orchestration.d.ts +5 -3
- package/src/vat-orchestration.d.ts.map +1 -1
- package/src/vat-orchestration.js +4 -3
- package/src/vendor/viem/{_esm-YOAV66U4.js → _esm-OKAICHVC.js} +2 -2
- package/src/vendor/viem/{ccip-AAQDZF3N.js → ccip-34BSSMV5.js} +1 -2
- package/src/vendor/viem/{chunk-4EF4K2MH.js → chunk-GCI53Z2G.js} +35 -1
- package/src/vendor/viem/chunk-ZKSIP2AM.js +326 -0
- package/src/vendor/viem/viem-abi.js +2 -2
- package/src/vendor/viem/viem-typedData.d.ts +19 -0
- package/src/vendor/viem/viem-typedData.js +59 -0
- package/tools/contract-tests.d.ts +34 -19
- package/tools/contract-tests.d.ts.map +1 -1
- package/tools/contract-tests.ts +15 -3
- package/tools/ibc-mock-fixtures.d.ts +49 -0
- package/tools/ibc-mock-fixtures.d.ts.map +1 -0
- package/tools/ibc-mock-fixtures.ts +161 -0
- package/tools/ibc-mocks.d.ts +2 -3
- package/tools/ibc-mocks.d.ts.map +1 -1
- package/tools/ibc-mocks.ts +2 -1
- package/tools/make-test-address.d.ts +1 -1
- package/tools/make-test-address.d.ts.map +1 -1
- package/tools/make-test-address.js +1 -2
- package/tools/network-fakes.d.ts +142 -0
- package/tools/network-fakes.d.ts.map +1 -0
- package/tools/network-fakes.ts +388 -0
- package/tsup.config.ts +3 -1
- package/src/cosmos-api.ts +0 -469
- package/src/exos/exo-interfaces.ts +0 -35
- package/src/orchestration-api.ts +0 -365
- package/src/stubs/viem-abi.d.ts.map +0 -1
- package/src/types.ts +0 -26
- package/src/vendor/viem/chunk-XN4LUOIH.js +0 -253
- package/src/vendor/viem/secp256k1-WHBDSQB2.js +0 -1914
- /package/src/stubs/{viem-abi.ts → viem-abi.js} +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { MsgTransfer } from '@agoric/cosmic-proto/ibc/applications/transfer/v1/tx.js';
|
|
2
|
-
import {
|
|
2
|
+
import type { StorageMessage } from '@agoric/internal/src/lib-chainStorage.js';
|
|
3
|
+
import { type IBCChannelID, type VTransferIBCEvent } from '@agoric/vats';
|
|
3
4
|
import type { ExecutionContext } from 'ava';
|
|
4
5
|
import { type ChainInfo } from '../index.js';
|
|
5
6
|
export declare const ROOT_STORAGE_PATH = "orchtest";
|
|
@@ -18,19 +19,19 @@ export declare const setupOrchestrationTest: ({ log, chains, }: {
|
|
|
18
19
|
agoricNames: import("@agoric/vats").NameHub<any>;
|
|
19
20
|
agoricNamesAdmin: import("@agoric/vats").NameAdmin;
|
|
20
21
|
bankManager: import("@endo/exo").Guarded<{
|
|
21
|
-
getAssetSubscription(): IterableEachTopic<AssetDescriptor>;
|
|
22
|
-
getRewardDistributorDepositFacet(denom: string, feeKit: AssetIssuerKit): ERef<import("
|
|
22
|
+
getAssetSubscription(): import("@agoric/notifier").IterableEachTopic<AssetDescriptor>;
|
|
23
|
+
getRewardDistributorDepositFacet(denom: string, feeKit: AssetIssuerKit): import("@endo/far").ERef<import("@endo/far").EOnly<import("@agoric/ertp").DepositFacet>>;
|
|
23
24
|
getModuleAccountAddress(moduleName: string): Promise<string | null>;
|
|
24
25
|
addAsset(denom: string, issuerName: string, proposedName: string, kit: AssetIssuerKit & {
|
|
25
|
-
payment?: ERef<Payment<"nat">>;
|
|
26
|
+
payment?: import("@endo/far").ERef<import("@agoric/ertp").Payment<"nat">>;
|
|
26
27
|
}): Promise<void>;
|
|
27
28
|
getBankForAddress(address: string): Promise<Bank>;
|
|
28
29
|
}>;
|
|
29
30
|
board: import("@endo/exo").Guarded<{
|
|
30
|
-
getId(value: RemotableObject): string;
|
|
31
|
-
getValue(id: BoardId): RemotableObject;
|
|
31
|
+
getId(value: import("@endo/pass-style").RemotableObject): string;
|
|
32
|
+
getValue(id: BoardId): import("@endo/pass-style").RemotableObject;
|
|
32
33
|
lookup(...path: string[]): Promise<any>;
|
|
33
|
-
has(val: RemotableObject): boolean;
|
|
34
|
+
has(val: import("@endo/pass-style").RemotableObject): boolean;
|
|
34
35
|
ids(): string[];
|
|
35
36
|
getPublishingMarshaller(): import("@endo/exo").Guarded<{
|
|
36
37
|
toCapData(val: any): import("@endo/marshal").CapData<string>;
|
|
@@ -53,7 +54,7 @@ export declare const setupOrchestrationTest: ({ log, chains, }: {
|
|
|
53
54
|
}>(request: T): import("@agoric/vow").PromiseVow<import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto").ResponseTo<T>>>;
|
|
54
55
|
queryMany(requests: {
|
|
55
56
|
'@type': string;
|
|
56
|
-
}[]): import("@agoric/
|
|
57
|
+
}[]): import("@agoric/vow").PromiseVow<{
|
|
57
58
|
error?: string | undefined;
|
|
58
59
|
reply: {
|
|
59
60
|
'@type': string;
|
|
@@ -69,6 +70,10 @@ export declare const setupOrchestrationTest: ({ log, chains, }: {
|
|
|
69
70
|
* Read pure data (CapData that has no slots) from the storage path
|
|
70
71
|
*/
|
|
71
72
|
getDeserialized(path: string): unknown[];
|
|
73
|
+
storageUpdates: {
|
|
74
|
+
[Symbol.asyncIterator](): AsyncGenerator<StorageMessage | undefined, void, unknown>;
|
|
75
|
+
};
|
|
76
|
+
cancelStorageUpdates: () => boolean;
|
|
72
77
|
rootNode: import("@endo/exo").Guarded<{
|
|
73
78
|
getPath(): string;
|
|
74
79
|
getStoreKey(): Promise<VStorageKey>;
|
|
@@ -80,11 +85,11 @@ export declare const setupOrchestrationTest: ({ log, chains, }: {
|
|
|
80
85
|
data: Map<string, string>;
|
|
81
86
|
updateNewCellBlockHeight: (blockHeight?: number) => void;
|
|
82
87
|
getValues: (path: string) => string[];
|
|
83
|
-
messages:
|
|
84
|
-
toStorage: ((message:
|
|
88
|
+
messages: StorageMessage[];
|
|
89
|
+
toStorage: ((message: StorageMessage) => string | number | true | any[] | {
|
|
85
90
|
storeName: string;
|
|
86
91
|
storeSubkey: string;
|
|
87
|
-
} | null) & RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, (message:
|
|
92
|
+
} | null) & import("@endo/pass-style").RemotableObject<`Alleged: ${string}`> & import("@endo/eventual-send").RemotableBrand<{}, (message: StorageMessage) => string | number | true | any[] | {
|
|
88
93
|
storeName: string;
|
|
89
94
|
storeSubkey: string;
|
|
90
95
|
} | null>;
|
|
@@ -111,7 +116,7 @@ export declare const setupOrchestrationTest: ({ log, chains, }: {
|
|
|
111
116
|
}>(request: T): import("@agoric/vow").PromiseVow<import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto").ResponseTo<T>>>;
|
|
112
117
|
queryMany(requests: {
|
|
113
118
|
'@type': string;
|
|
114
|
-
}[]): import("@agoric/
|
|
119
|
+
}[]): import("@agoric/vow").PromiseVow<{
|
|
115
120
|
error?: string | undefined;
|
|
116
121
|
reply: {
|
|
117
122
|
'@type': string;
|
|
@@ -130,7 +135,7 @@ export declare const setupOrchestrationTest: ({ log, chains, }: {
|
|
|
130
135
|
}): StorageNode;
|
|
131
136
|
setValue(value: string): Promise<void>;
|
|
132
137
|
}>;
|
|
133
|
-
poolMetricsNode:
|
|
138
|
+
poolMetricsNode: import("@agoric/internal/src/lib-chainStorage.js").StorageNode;
|
|
134
139
|
marshaller: import("@endo/exo").Guarded<{
|
|
135
140
|
toCapData(val: any): import("@endo/marshal").CapData<string>;
|
|
136
141
|
fromCapData(data: any): any;
|
|
@@ -1766,7 +1771,7 @@ export declare const setupOrchestrationTest: ({ log, chains, }: {
|
|
|
1766
1771
|
registerAsset(denom: import("../index.js").Denom, detail: DenomDetail): void;
|
|
1767
1772
|
updateAsset(denom: import("../index.js").Denom, detail: DenomDetail): void;
|
|
1768
1773
|
getAsset(denom: import("../index.js").Denom, srcChainName: string): DenomDetail | undefined;
|
|
1769
|
-
getDenom(brand: Brand): import("../index.js").Denom | undefined;
|
|
1774
|
+
getDenom(brand: import("@agoric/ertp").Brand): import("../index.js").Denom | undefined;
|
|
1770
1775
|
resolveAccountId(partialId: import("../index.js").AccountId | import("../index.js").Bech32Address): import("../index.js").AccountId;
|
|
1771
1776
|
coerceCosmosAddress(partialId: import("../index.js").AccountIdArg | import("../index.js").Bech32Address): import("../index.js").CosmosChainAddress;
|
|
1772
1777
|
makeTransferRoute(destination: import("../index.js").AccountIdArg | import("../index.js").Bech32Address, denomAmount: import("../index.js").DenomAmount, srcChainName: string, forwardOpts?: import("../index.js").IBCMsgTransferOptions["forwardOpts"]): import("../index.js").TransferRoute;
|
|
@@ -1779,7 +1784,7 @@ export declare const setupOrchestrationTest: ({ log, chains, }: {
|
|
|
1779
1784
|
}>(request: T): import("@agoric/vow").PromiseVow<import("@agoric/cosmic-proto").JsonSafe<import("@agoric/cosmic-proto").ResponseTo<T>>>;
|
|
1780
1785
|
queryMany(requests: {
|
|
1781
1786
|
'@type': string;
|
|
1782
|
-
}[]): import("@agoric/
|
|
1787
|
+
}[]): import("@agoric/vow").PromiseVow<{
|
|
1783
1788
|
error?: string | undefined;
|
|
1784
1789
|
reply: {
|
|
1785
1790
|
'@type': string;
|
|
@@ -1793,8 +1798,8 @@ export declare const setupOrchestrationTest: ({ log, chains, }: {
|
|
|
1793
1798
|
timerService: import("@agoric/zoe/tools/manualTimer.js").ZoeManualTimer;
|
|
1794
1799
|
};
|
|
1795
1800
|
utils: {
|
|
1796
|
-
contractZone: import("@agoric/
|
|
1797
|
-
pourPayment: (amount: Amount<"nat">) => Promise<Payment<"nat">>;
|
|
1801
|
+
contractZone: import("@agoric/zone").Zone;
|
|
1802
|
+
pourPayment: (amount: import("@agoric/ertp").Amount<"nat">) => Promise<import("@agoric/ertp").Payment<"nat">>;
|
|
1798
1803
|
inspectLocalBridge: () => BridgeObject[];
|
|
1799
1804
|
inspectDibcBridge: () => Promise<{
|
|
1800
1805
|
bridgeEvents: (import("@agoric/vats").IBCEvent<"channelOpenAck"> | import("@agoric/vats").IBCEvent<"acknowledgementPacket"> | import("@agoric/vats").IBCEvent<"channelCloseConfirm"> | import("@agoric/vats").IBCEvent<"sendPacket">)[];
|
|
@@ -1805,12 +1810,22 @@ export declare const setupOrchestrationTest: ({ log, chains, }: {
|
|
|
1805
1810
|
message: MsgTransfer;
|
|
1806
1811
|
sequence: bigint;
|
|
1807
1812
|
};
|
|
1808
|
-
rootZone: import("@agoric/
|
|
1813
|
+
rootZone: import("@agoric/zone").Zone;
|
|
1809
1814
|
transmitVTransferEvent: (event: VTransferIBCEvent["event"], query: number | {
|
|
1810
1815
|
message: MsgTransfer;
|
|
1811
1816
|
sequence: bigint;
|
|
1812
|
-
}, acknowledgementError?: string) => Promise<
|
|
1817
|
+
}, acknowledgementError?: string) => Promise<{
|
|
1818
|
+
receiver: string;
|
|
1819
|
+
sender: string;
|
|
1820
|
+
target: string;
|
|
1821
|
+
sourceChannel: IBCChannelID;
|
|
1822
|
+
sequence: bigint;
|
|
1823
|
+
amount: bigint;
|
|
1824
|
+
denom: string;
|
|
1825
|
+
memo: string;
|
|
1826
|
+
}>;
|
|
1813
1827
|
vowTools: import("@agoric/vow").VowTools;
|
|
1828
|
+
wellKnownSpaces: import("@agoric/vats/src/core/types.js").WellKnownSpaces;
|
|
1814
1829
|
};
|
|
1815
1830
|
}>;
|
|
1816
1831
|
//# sourceMappingURL=contract-tests.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract-tests.d.ts","sourceRoot":"","sources":["contract-tests.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yDAAyD,CAAC;
|
|
1
|
+
{"version":3,"file":"contract-tests.d.ts","sourceRoot":"","sources":["contract-tests.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yDAAyD,CAAC;AAE3F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAS/E,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACvB,MAAM,cAAc,CAAC;AAmBtB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAyB,KAAK,SAAS,EAAE,MAAM,aAAa,CAAC;AAQpE,eAAO,MAAM,iBAA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;;;;;;;;;;;;;;;;QAgJH,kGAAkG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAnJnE,MAAM;qBAT9B,WAAW;sBACV,MAAM;;;wCA2DT,iBAAiB,CAAC,OAAO,CAAC,SAC1B,MAAM,GAAG;YAAE,OAAO,EAAE,WAAW,CAAC;YAAC,QAAQ,EAAE,MAAM,CAAA;SAAE,yBACnC,MAAM;;;;2BAcS,YAAY;;;;;;;;;EAmGrD,CAAC"}
|
package/tools/contract-tests.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import type { MsgTransfer } from '@agoric/cosmic-proto/ibc/applications/transfer/v1/tx.js';
|
|
2
2
|
import { VTRANSFER_IBC_EVENT } from '@agoric/internal/src/action-types.js';
|
|
3
|
+
import type { StorageMessage } from '@agoric/internal/src/lib-chainStorage.js';
|
|
3
4
|
import {
|
|
4
5
|
defaultSerializer,
|
|
6
|
+
makeAsyncQueue,
|
|
5
7
|
makeFakeStorageKit,
|
|
6
8
|
} from '@agoric/internal/src/storage-test-utils.js';
|
|
9
|
+
import { setupFakeNetwork } from '@agoric/orchestration/tools/network-fakes.js';
|
|
7
10
|
import { eventLoopIteration } from '@agoric/internal/src/testing-utils.js';
|
|
8
|
-
import { setupFakeNetwork } from '@agoric/orchestration/test/network-fakes.js';
|
|
9
11
|
import { buildVTransferEvent } from '@agoric/orchestration/tools/ibc-mocks.js';
|
|
10
12
|
import {
|
|
11
13
|
makeNameHubKit,
|
|
@@ -71,7 +73,7 @@ export const setupOrchestrationTest = async ({
|
|
|
71
73
|
});
|
|
72
74
|
// XXX real bankManager does this. fake should too?
|
|
73
75
|
// TODO https://github.com/Agoric/agoric-sdk/issues/9966
|
|
74
|
-
await makeWellKnownSpaces(agoricNamesAdmin, log, [
|
|
76
|
+
const wellKnownSpaces = await makeWellKnownSpaces(agoricNamesAdmin, log, [
|
|
75
77
|
'installation',
|
|
76
78
|
'instance',
|
|
77
79
|
'vbankAsset',
|
|
@@ -131,7 +133,12 @@ export const setupOrchestrationTest = async ({
|
|
|
131
133
|
const timer = buildZoeManualTimer(log);
|
|
132
134
|
const board = makeFakeBoard();
|
|
133
135
|
const marshaller = board.getPublishingMarshaller();
|
|
134
|
-
const
|
|
136
|
+
const storageQueue = makeAsyncQueue<StorageMessage>();
|
|
137
|
+
const storage = makeFakeStorageKit(
|
|
138
|
+
ROOT_STORAGE_PATH,
|
|
139
|
+
{ sequence: true },
|
|
140
|
+
{ eachMessage: storageQueue.enqueue },
|
|
141
|
+
);
|
|
135
142
|
|
|
136
143
|
const { portAllocator, setupIBCProtocol, ibcBridge } = setupFakeNetwork(
|
|
137
144
|
rootZone.subZone('network'),
|
|
@@ -243,6 +250,8 @@ export const setupOrchestrationTest = async ({
|
|
|
243
250
|
);
|
|
244
251
|
// let the bridge handler finish
|
|
245
252
|
await eventLoopIteration();
|
|
253
|
+
|
|
254
|
+
return base;
|
|
246
255
|
};
|
|
247
256
|
|
|
248
257
|
/** A chainHub for Exo tests, distinct from the one a contract makes within `withOrchestration` */
|
|
@@ -285,6 +294,8 @@ export const setupOrchestrationTest = async ({
|
|
|
285
294
|
getDeserialized(path: string): unknown[] {
|
|
286
295
|
return storage.getValues(path).map(defaultSerializer.parse);
|
|
287
296
|
},
|
|
297
|
+
storageUpdates: storageQueue.iterable,
|
|
298
|
+
cancelStorageUpdates: storageQueue.cancel,
|
|
288
299
|
},
|
|
289
300
|
},
|
|
290
301
|
mocks: {
|
|
@@ -319,6 +330,7 @@ export const setupOrchestrationTest = async ({
|
|
|
319
330
|
rootZone,
|
|
320
331
|
transmitVTransferEvent,
|
|
321
332
|
vowTools,
|
|
333
|
+
wellKnownSpaces,
|
|
322
334
|
},
|
|
323
335
|
};
|
|
324
336
|
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TODO: provide mappings to cosmos error codes (and module specific error codes)
|
|
3
|
+
* see https://github.com/Agoric/agoric-sdk/issues/9629 for more details about
|
|
4
|
+
* error messages over ibc
|
|
5
|
+
*/
|
|
6
|
+
export declare const errorAcknowledgments: {
|
|
7
|
+
error5: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const UNBOND_PERIOD_SECONDS = 5n;
|
|
10
|
+
export declare const protoMsgMocks: {
|
|
11
|
+
delegate: {
|
|
12
|
+
msg: string;
|
|
13
|
+
ack: string;
|
|
14
|
+
};
|
|
15
|
+
undelegate: {
|
|
16
|
+
msg: string;
|
|
17
|
+
ack: string;
|
|
18
|
+
};
|
|
19
|
+
redelegate: {
|
|
20
|
+
msg: string;
|
|
21
|
+
ack: string;
|
|
22
|
+
};
|
|
23
|
+
withdrawReward: {
|
|
24
|
+
msg: string;
|
|
25
|
+
ack: string;
|
|
26
|
+
};
|
|
27
|
+
queryBalance: {
|
|
28
|
+
msg: string;
|
|
29
|
+
ack: string;
|
|
30
|
+
};
|
|
31
|
+
bankSend: {
|
|
32
|
+
msg: string;
|
|
33
|
+
ack: string;
|
|
34
|
+
};
|
|
35
|
+
bankSendMulti: {
|
|
36
|
+
msg: string;
|
|
37
|
+
ack: string;
|
|
38
|
+
};
|
|
39
|
+
depositForBurn: {
|
|
40
|
+
msg: string;
|
|
41
|
+
ack: string;
|
|
42
|
+
};
|
|
43
|
+
depositForBurnForBase: {
|
|
44
|
+
msg: string;
|
|
45
|
+
ack: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export declare const defaultMockAckMap: Record<string, string>;
|
|
49
|
+
//# sourceMappingURL=ibc-mock-fixtures.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ibc-mock-fixtures.d.ts","sourceRoot":"","sources":["ibc-mock-fixtures.ts"],"names":[],"mappings":"AAoCA;;;;GAIG;AACH,eAAO,MAAM,oBAAoB;;CAIhC,CAAC;AAiCF,eAAO,MAAM,qBAAqB,KAAK,CAAC;AAOxC,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwEzB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CACpB,CAAC"}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
/** @file Canned IBC message and acknowledgement fixtures for tests and fakes */
|
|
2
|
+
import {
|
|
3
|
+
QueryBalanceRequest,
|
|
4
|
+
QueryBalanceResponse,
|
|
5
|
+
} from '@agoric/cosmic-proto/cosmos/bank/v1beta1/query.js';
|
|
6
|
+
import {
|
|
7
|
+
MsgSend,
|
|
8
|
+
MsgSendResponse,
|
|
9
|
+
} from '@agoric/cosmic-proto/cosmos/bank/v1beta1/tx.js';
|
|
10
|
+
import {
|
|
11
|
+
MsgDepositForBurn,
|
|
12
|
+
MsgDepositForBurnResponse,
|
|
13
|
+
} from '@agoric/cosmic-proto/circle/cctp/v1/tx.js';
|
|
14
|
+
import {
|
|
15
|
+
MsgWithdrawDelegatorReward,
|
|
16
|
+
MsgWithdrawDelegatorRewardResponse,
|
|
17
|
+
} from '@agoric/cosmic-proto/cosmos/distribution/v1beta1/tx.js';
|
|
18
|
+
import type { Timestamp } from '@agoric/cosmic-proto/google/protobuf/timestamp.js';
|
|
19
|
+
import {
|
|
20
|
+
MsgBeginRedelegate,
|
|
21
|
+
MsgBeginRedelegateResponse,
|
|
22
|
+
MsgDelegate,
|
|
23
|
+
MsgDelegateResponse,
|
|
24
|
+
MsgUndelegate,
|
|
25
|
+
MsgUndelegateResponse,
|
|
26
|
+
} from '@agoric/cosmic-proto/cosmos/staking/v1beta1/tx.js';
|
|
27
|
+
import {
|
|
28
|
+
buildMsgErrorString,
|
|
29
|
+
buildMsgResponseString,
|
|
30
|
+
buildQueryPacketString,
|
|
31
|
+
buildQueryResponseString,
|
|
32
|
+
buildTxPacketString,
|
|
33
|
+
createMockAckMap,
|
|
34
|
+
} from './ibc-mocks.js';
|
|
35
|
+
import { leftPadEthAddressTo32Bytes } from '../src/utils/address.js';
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* TODO: provide mappings to cosmos error codes (and module specific error codes)
|
|
39
|
+
* see https://github.com/Agoric/agoric-sdk/issues/9629 for more details about
|
|
40
|
+
* error messages over ibc
|
|
41
|
+
*/
|
|
42
|
+
export const errorAcknowledgments = {
|
|
43
|
+
error5: buildMsgErrorString(
|
|
44
|
+
'ABCI code: 5: error handling packet: see events for details',
|
|
45
|
+
),
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const delegation = {
|
|
49
|
+
amount: {
|
|
50
|
+
denom: 'uatom',
|
|
51
|
+
amount: '10',
|
|
52
|
+
},
|
|
53
|
+
delegatorAddress: 'cosmos1test',
|
|
54
|
+
validatorAddress: 'cosmosvaloper1test',
|
|
55
|
+
};
|
|
56
|
+
const redelegation = {
|
|
57
|
+
delegatorAddress: 'cosmos1test',
|
|
58
|
+
validatorSrcAddress: 'cosmosvaloper1test',
|
|
59
|
+
validatorDstAddress: 'cosmosvaloper2test',
|
|
60
|
+
amount: {
|
|
61
|
+
denom: 'uatom',
|
|
62
|
+
amount: '10',
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
const bankSend = {
|
|
66
|
+
fromAddress: 'cosmos1test',
|
|
67
|
+
toAddress: 'cosmos1testrecipient',
|
|
68
|
+
amount: [{ denom: 'uatom', amount: '10' }],
|
|
69
|
+
};
|
|
70
|
+
const bankSendMulti = {
|
|
71
|
+
fromAddress: 'cosmos1test',
|
|
72
|
+
toAddress: 'cosmos1testrecipient',
|
|
73
|
+
amount: [
|
|
74
|
+
{ denom: 'uatom', amount: '10' },
|
|
75
|
+
{ denom: 'ibc/1234', amount: '10' },
|
|
76
|
+
],
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export const UNBOND_PERIOD_SECONDS = 5n;
|
|
80
|
+
|
|
81
|
+
const getUnbondingTime = (): Timestamp => ({
|
|
82
|
+
seconds: UNBOND_PERIOD_SECONDS,
|
|
83
|
+
nanos: 0,
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
export const protoMsgMocks = {
|
|
87
|
+
delegate: {
|
|
88
|
+
msg: buildTxPacketString([MsgDelegate.toProtoMsg(delegation)]),
|
|
89
|
+
ack: buildMsgResponseString(MsgDelegateResponse, {}),
|
|
90
|
+
},
|
|
91
|
+
undelegate: {
|
|
92
|
+
msg: buildTxPacketString([MsgUndelegate.toProtoMsg(delegation)]),
|
|
93
|
+
ack: buildMsgResponseString(MsgUndelegateResponse, {
|
|
94
|
+
completionTime: getUnbondingTime(),
|
|
95
|
+
}),
|
|
96
|
+
},
|
|
97
|
+
redelegate: {
|
|
98
|
+
msg: buildTxPacketString([MsgBeginRedelegate.toProtoMsg(redelegation)]),
|
|
99
|
+
ack: buildMsgResponseString(MsgBeginRedelegateResponse, {
|
|
100
|
+
completionTime: getUnbondingTime(),
|
|
101
|
+
}),
|
|
102
|
+
},
|
|
103
|
+
withdrawReward: {
|
|
104
|
+
msg: buildTxPacketString([
|
|
105
|
+
MsgWithdrawDelegatorReward.toProtoMsg(delegation),
|
|
106
|
+
]),
|
|
107
|
+
ack: buildMsgResponseString(MsgWithdrawDelegatorRewardResponse, {
|
|
108
|
+
amount: [{ amount: '1', denom: 'uatom' }],
|
|
109
|
+
}),
|
|
110
|
+
},
|
|
111
|
+
queryBalance: {
|
|
112
|
+
msg: buildQueryPacketString([
|
|
113
|
+
QueryBalanceRequest.toProtoMsg({
|
|
114
|
+
address: 'cosmos1test',
|
|
115
|
+
denom: 'uatom',
|
|
116
|
+
}),
|
|
117
|
+
]),
|
|
118
|
+
ack: buildQueryResponseString(QueryBalanceResponse, {
|
|
119
|
+
balance: { amount: '0', denom: 'uatom' },
|
|
120
|
+
}),
|
|
121
|
+
},
|
|
122
|
+
bankSend: {
|
|
123
|
+
msg: buildTxPacketString([MsgSend.toProtoMsg(bankSend)]),
|
|
124
|
+
ack: buildMsgResponseString(MsgSendResponse, {}),
|
|
125
|
+
},
|
|
126
|
+
bankSendMulti: {
|
|
127
|
+
msg: buildTxPacketString([MsgSend.toProtoMsg(bankSendMulti)]),
|
|
128
|
+
ack: buildMsgResponseString(MsgSendResponse, {}),
|
|
129
|
+
},
|
|
130
|
+
depositForBurn: {
|
|
131
|
+
msg: buildTxPacketString([
|
|
132
|
+
MsgDepositForBurn.toProtoMsg({
|
|
133
|
+
amount: '4250000',
|
|
134
|
+
burnToken: 'uusdc',
|
|
135
|
+
from: 'cosmos1test',
|
|
136
|
+
destinationDomain: 6,
|
|
137
|
+
mintRecipient: leftPadEthAddressTo32Bytes(
|
|
138
|
+
'0x20E68F6c276AC6E297aC46c84Ab260928276691D',
|
|
139
|
+
),
|
|
140
|
+
}),
|
|
141
|
+
]),
|
|
142
|
+
ack: buildMsgResponseString(MsgDepositForBurnResponse, {}),
|
|
143
|
+
},
|
|
144
|
+
depositForBurnForBase: {
|
|
145
|
+
msg: buildTxPacketString([
|
|
146
|
+
MsgDepositForBurn.toProtoMsg({
|
|
147
|
+
amount: '10',
|
|
148
|
+
burnToken: 'uusdc',
|
|
149
|
+
from: 'cosmos1test',
|
|
150
|
+
destinationDomain: 0,
|
|
151
|
+
mintRecipient: leftPadEthAddressTo32Bytes(
|
|
152
|
+
'0xe0d43135EBd2593907F8f56c25ADC1Bf94FCf993',
|
|
153
|
+
),
|
|
154
|
+
}),
|
|
155
|
+
]),
|
|
156
|
+
ack: buildMsgResponseString(MsgDepositForBurnResponse, {}),
|
|
157
|
+
},
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
export const defaultMockAckMap: Record<string, string> =
|
|
161
|
+
createMockAckMap(protoMsgMocks);
|
package/tools/ibc-mocks.d.ts
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/** @file Tools to support making IBC mocks */
|
|
2
2
|
import { type JsonSafe, type Proto3Codec } from '@agoric/cosmic-proto';
|
|
3
|
-
import { TxBody as TxBodyType } from '@agoric/cosmic-proto/cosmos/tx/v1beta1/tx.js';
|
|
4
3
|
import { Any as AnyType } from '@agoric/cosmic-proto/google/protobuf/any.js';
|
|
5
4
|
import type { PacketSDKType } from '@agoric/cosmic-proto/ibc/core/channel/v1/channel.js';
|
|
6
5
|
import { type RequestQuery as RequestQueryType, ResponseQuery as ResponseQueryType } from '@agoric/cosmic-proto/tendermint/abci/types.js';
|
|
7
6
|
import type { IBCChannelID, IBCEvent, VTransferIBCEvent } from '@agoric/vats';
|
|
8
7
|
import type { CosmosChainAddress, Denom } from '../src/orchestration-api.js';
|
|
9
|
-
type EncoderCommon<T> = Proto3Codec<string
|
|
8
|
+
type EncoderCommon<T> = T extends Proto3Codec<infer TU> ? Proto3Codec<TU> : Proto3Codec<string>;
|
|
10
9
|
/**
|
|
11
10
|
* Build a response "packet bytes string" we'd expect to see from a
|
|
12
11
|
* Response to a Tx carrying a single Msg.
|
|
@@ -66,7 +65,7 @@ export declare function buildTxPacketString(msgs: {
|
|
|
66
65
|
*
|
|
67
66
|
* @param b64 base64 encoded string
|
|
68
67
|
*/
|
|
69
|
-
export declare const parseOutgoingTxPacket: (b64: string) =>
|
|
68
|
+
export declare const parseOutgoingTxPacket: (b64: string) => import("@agoric/cosmic-proto").MessageBody<"/cosmos.tx.v1beta1.TxBody">;
|
|
70
69
|
/**
|
|
71
70
|
* Build a query packet string for the mocked dibc bridge handler
|
|
72
71
|
* @param msgs
|
package/tools/ibc-mocks.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ibc-mocks.d.ts","sourceRoot":"","sources":["ibc-mocks.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,WAAW,EAGjB,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"ibc-mocks.d.ts","sourceRoot":"","sources":["ibc-mocks.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,WAAW,EAGjB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAAE,GAAG,I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,6BAA6B,GAAI,yBAG3C,OAAO,CAAC,QAAQ,CAAC,qBAAqB,CAAC,CAAM,KAAG,OAAO,CACxD,QAAQ,CAAC,qBAAqB,CAAC,CAQ/B,CAAC"}
|
package/tools/ibc-mocks.ts
CHANGED
|
@@ -37,7 +37,8 @@ const FungibleTokenPacketData = CodecHelper(FungibleTokenPacketDataType);
|
|
|
37
37
|
const CosmosResponse = CodecHelper(CosmosResponseType);
|
|
38
38
|
const ResponseQuery = CodecHelper(ResponseQueryType);
|
|
39
39
|
|
|
40
|
-
type EncoderCommon<T> =
|
|
40
|
+
type EncoderCommon<T> =
|
|
41
|
+
T extends Proto3Codec<infer TU> ? Proto3Codec<TU> : Proto3Codec<string>;
|
|
41
42
|
|
|
42
43
|
const toPacket = (obj: Record<string, any>): string =>
|
|
43
44
|
btoa(JSON.stringify(obj));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"make-test-address.d.ts","sourceRoot":"","sources":["make-test-address.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"make-test-address.d.ts","sourceRoot":"","sources":["make-test-address.js"],"names":[],"mappings":"AAYO,wCALI,MAAM,WACN,MAAM,eACN,MAAM,GACJ,aAAa,CAazB;mCApB+B,sBAAsB"}
|