@galacticcouncil/xc-cfg 0.6.2 → 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.
- package/build/index.cjs +1 -1
- package/build/index.mjs +1 -1
- package/build/types/builders/ContractBuilder.d.ts +2 -2
- package/build/types/builders/contracts/PolkadotXcm.d.ts +5 -0
- package/build/types/builders/extrinsics/xcm/polkadotXcm.utils.d.ts +1 -1
- package/build/types/builders/extrinsics/xcm/utils/instructions.d.ts +1 -1
- package/build/types/configs/polkadot/hydration/templates.d.ts +2 -1
- package/package.json +2 -2
- package/build/types/builders/contracts/Xtokens.d.ts +0 -5
- package/build/types/builders/contracts/Xtokens.utils.d.ts +0 -45
|
@@ -2,7 +2,7 @@ import { Parachain, TxWeight } from '@galacticcouncil/xc-core';
|
|
|
2
2
|
import { Binary } from 'polkadot-api';
|
|
3
3
|
import { XcmV3Junctions, XcmV3Junction, XcmV3MultiassetFungibility, XcmV4Instruction, XcmV4AssetAssetFilter, XcmV3WeightLimit, XcmV2OriginKind } from '@galacticcouncil/descriptors';
|
|
4
4
|
import { XcmTransferType, XcmVersion } from './types';
|
|
5
|
-
export declare const isSnowbridgeTransfer: (assetLocation: any) =>
|
|
5
|
+
export declare const isSnowbridgeTransfer: (assetLocation: any) => boolean;
|
|
6
6
|
export declare const toDest: (version: XcmVersion, source: Parachain, destination: Parachain) => {
|
|
7
7
|
type: XcmVersion;
|
|
8
8
|
value: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { XcmV3Junction } from '@galacticcouncil/descriptors';
|
|
2
2
|
export declare const ETHER_TOKEN_ADDRESS = "0x0000000000000000000000000000000000000000";
|
|
3
|
-
export declare function
|
|
3
|
+
export declare function ethereumLocation(ethChainId: number): {
|
|
4
4
|
parents: number;
|
|
5
5
|
interior: {
|
|
6
6
|
type: "X1";
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { AnyChain, Asset, AssetRoute, ExtrinsicConfigBuilder, Parachain } from '@galacticcouncil/xc-core';
|
|
2
|
+
import { XcmTransferType } from '../../../builders';
|
|
2
3
|
export declare const MRL_EXECUTION_FEE = 0.9;
|
|
3
4
|
export declare const MRL_XCM_FEE = 1;
|
|
4
5
|
export declare const CEX_EXECUTION_FEE = 0.03;
|
|
5
6
|
export declare function toTransferTemplate(asset: Asset, destination: AnyChain, reserve?: Parachain): AssetRoute;
|
|
6
7
|
export declare function toHubExtTemplate(asset: Asset): AssetRoute;
|
|
7
8
|
export declare function toHubWithCexFwdTemplate(asset: Asset, hubFee: number, hubTransfer: ExtrinsicConfigBuilder): AssetRoute;
|
|
8
|
-
export declare function toParaErc20Template(asset: Asset, destination:
|
|
9
|
+
export declare function toParaErc20Template(asset: Asset, destination: Parachain, transferType?: XcmTransferType): AssetRoute;
|
|
9
10
|
export declare function toMoonbeamErc20Template(asset: Asset): AssetRoute;
|
|
10
11
|
export declare function toZeitgeistErc20Template(asset: Asset): AssetRoute;
|
|
11
12
|
export declare function viaWormholeBridgeTemplate(assetIn: Asset, assetOut: Asset, to: AnyChain): AssetRoute;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacticcouncil/xc-cfg",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "Cross-chain hydradx & basilisk dapp configuration",
|
|
5
5
|
"author": "GalacticCouncil",
|
|
6
6
|
"repository": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"test": "NODE_NO_WARNINGS=1 NODE_OPTIONS=--experimental-vm-modules jest --silent"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@galacticcouncil/xc-core": "^0.
|
|
34
|
+
"@galacticcouncil/xc-core": "^0.7.0"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@galacticcouncil/sdk-next": ">=0.20.0 <1.0.0"
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { Parachain } from '@galacticcouncil/xc-core';
|
|
2
|
-
type DestinationMultilocation = [
|
|
3
|
-
/**
|
|
4
|
-
* 1 - if transaction is going through a relay chain
|
|
5
|
-
*/
|
|
6
|
-
1,
|
|
7
|
-
([
|
|
8
|
-
/**
|
|
9
|
-
* example '0x00000007DC'
|
|
10
|
-
* 7DC - parachain id in hex
|
|
11
|
-
* can be found here:
|
|
12
|
-
* - https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Fkusama-rpc.polkadot.io#/parachains
|
|
13
|
-
* - https://polkadot.js.org/apps/?rpc=wss%3A%2F%2Frpc.polkadot.io#/parachains
|
|
14
|
-
*/
|
|
15
|
-
string,
|
|
16
|
-
/**
|
|
17
|
-
* example '0x01%account%00',
|
|
18
|
-
* enum = 01 (AccountId32)
|
|
19
|
-
* networkId = 00 (any)
|
|
20
|
-
*/
|
|
21
|
-
string
|
|
22
|
-
] | [
|
|
23
|
-
/**
|
|
24
|
-
* example '0x01%account%00',
|
|
25
|
-
* enum = 01 (AccountId32)
|
|
26
|
-
* networkId = 00 (any)
|
|
27
|
-
*/
|
|
28
|
-
string
|
|
29
|
-
])
|
|
30
|
-
];
|
|
31
|
-
/**
|
|
32
|
-
* Build destination multilocation
|
|
33
|
-
*
|
|
34
|
-
* 01: AccountId32
|
|
35
|
-
* 03: AccountKey20
|
|
36
|
-
*
|
|
37
|
-
* @see https://docs.moonbeam.network/builders/interoperability/xcm/xc20/xtokens/#building-the-precompile-multilocation
|
|
38
|
-
*
|
|
39
|
-
* @param address - destination address
|
|
40
|
-
* @param destination - destination chain
|
|
41
|
-
* @returns multilocation
|
|
42
|
-
*/
|
|
43
|
-
export declare function getDestinationMultilocation(address: string, destination: Parachain): DestinationMultilocation;
|
|
44
|
-
export declare function formatAssetIdToERC20(id: string): string;
|
|
45
|
-
export {};
|