File tree Expand file tree Collapse file tree 4 files changed +28
-7
lines changed Expand file tree Collapse file tree 4 files changed +28
-7
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' @moonbeam-network/xcm-config ' : patch
3
+ ' @moonbeam-network/xcm-sdk ' : patch
4
+ ---
5
+
6
+ Change how we get decimals from assets in destination and change vDOT transfers paying asset
Original file line number Diff line number Diff line change @@ -219,7 +219,7 @@ export const bifrostPolkadot = new Parachain({
219
219
name : 'Bifrost' ,
220
220
parachainId : 2030 ,
221
221
ss58Format : 6 ,
222
- ws : 'wss://hk.p. bifrost-rpc.liebi.com/ws' ,
222
+ ws : 'wss://eu. bifrost-polkadot -rpc.liebi.com/ws' ,
223
223
} ) ;
224
224
225
225
export const calamari = new Parachain ( {
Original file line number Diff line number Diff line change @@ -59,11 +59,11 @@ export const bifrostPolkadotConfig = new ChainConfig({
59
59
balance : BalanceBuilder ( ) . substrate ( ) . tokens ( ) . accounts ( ) ,
60
60
destination : moonbeam ,
61
61
destinationFee : {
62
- amount : 0.2 ,
63
- asset : bnc ,
64
- balance : BalanceBuilder ( ) . substrate ( ) . system ( ) . account ( ) ,
62
+ amount : 0.01 ,
63
+ asset : vdot ,
64
+ balance : BalanceBuilder ( ) . substrate ( ) . tokens ( ) . accounts ( ) ,
65
65
} ,
66
- extrinsic : ExtrinsicBuilder ( ) . xTokens ( ) . transferMultiCurrencies ( ) ,
66
+ extrinsic : ExtrinsicBuilder ( ) . xTokens ( ) . transfer ( ) ,
67
67
fee : {
68
68
asset : bnc ,
69
69
balance : BalanceBuilder ( ) . substrate ( ) . system ( ) . account ( ) ,
Original file line number Diff line number Diff line change @@ -46,7 +46,12 @@ export async function getDestinationData({
46
46
const balanceAmount = zeroAmount . copyWith ( { amount : balance } ) ;
47
47
const { existentialDeposit } = polkadot ;
48
48
49
- const feeAmount = await getFee ( { config : transferConfig , polkadot } ) ;
49
+ const feeAmount = await getFee ( {
50
+ address : destinationAddress ,
51
+ config : transferConfig ,
52
+ evmSigner,
53
+ polkadot,
54
+ } ) ;
50
55
const minAmount = zeroAmount . copyWith ( { amount : min } ) ;
51
56
52
57
return {
@@ -59,16 +64,26 @@ export async function getDestinationData({
59
64
}
60
65
61
66
export interface GetFeeParams {
67
+ address : string ;
62
68
config : TransferConfig ;
69
+ evmSigner ?: EvmSigner ;
63
70
polkadot : PolkadotService ;
64
71
}
65
72
66
73
export async function getFee ( {
74
+ address,
67
75
config,
76
+ evmSigner,
68
77
polkadot,
69
78
} : GetFeeParams ) : Promise < AssetAmount > {
70
79
const { amount, asset } = config . source . config . destinationFee ;
71
- const decimals = await polkadot . getAssetDecimals ( asset ) ;
80
+ const decimals = await getDecimals ( {
81
+ address,
82
+ asset,
83
+ config : config . destination . config ,
84
+ evmSigner,
85
+ polkadot,
86
+ } ) ;
72
87
const zeroAmount = AssetAmount . fromAsset ( asset , {
73
88
amount : 0n ,
74
89
decimals,
You can’t perform that action at this time.
0 commit comments