File tree 2 files changed +4
-6
lines changed
2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ const cliArgs = parseArgs({
38
38
39
39
const PRIVATE_KEY = cliArgs . values [ "private-key" ]
40
40
const MUNO_DENOM = "muno"
41
- const AMOUNT = 1n
41
+ const AMOUNT = 12n
42
42
const RECEIVER = toHex ( "bbn1xe0rnlh3u05qkwytkwmyzl86a0mvpwfxgf2t7u" )
43
43
const SOURCE_CHAIN_ID = "union-testnet-9"
44
44
const DESTINATION_CHAIN_ID = "bbn-test-5"
@@ -56,6 +56,7 @@ if (channel === null) {
56
56
consola . info ( "channel" , channel )
57
57
58
58
consola . info ( "base token" , baseToken )
59
+
59
60
const quoteToken = await getQuoteToken ( SOURCE_CHAIN_ID , baseToken , channel )
60
61
if ( quoteToken . isErr ( ) ) {
61
62
consola . info ( "could not get quote token" )
Original file line number Diff line number Diff line change @@ -108,14 +108,12 @@ export const getQuoteToken = async (
108
108
109
109
let client = publicClient . value
110
110
111
- let baseToken = isAddress ( base_token ) ? base_token : toHex ( base_token )
112
-
113
111
let predictedQuoteToken = await ResultAsync . fromPromise (
114
112
client . queryContractSmart ( fromHex ( `0x${ channel . destination_port_id } ` , "string" ) , {
115
113
predict_wrapped_token : {
116
114
path : "0" ,
117
115
channel : channel . destination_channel_id ,
118
- token : baseToken
116
+ token : base_token
119
117
}
120
118
} ) ,
121
119
error => {
@@ -143,14 +141,13 @@ export const getQuoteToken = async (
143
141
144
142
// We need to predict the askToken denom based on the sentToken (denomAddress in the transferAssetFromEvm args)
145
143
// we do this by calling the ucs03 instance on the counterparty chain.
146
- let baseToken = isAddress ( base_token ) ? base_token : toHex ( base_token )
147
144
148
145
const predictedQuoteToken = await ResultAsync . fromPromise (
149
146
destinationChainClient . readContract ( {
150
147
address : `0x${ channel . destination_port_id } ` ,
151
148
abi : ucs03ZkgmAbi ,
152
149
functionName : "predictWrappedToken" ,
153
- args : [ 0 , channel . destination_channel_id , baseToken ]
150
+ args : [ 0 , channel . destination_channel_id , base_token ]
154
151
} ) ,
155
152
error => {
156
153
return new Error ( "failed to get predict token using evm call" , { cause : error } )
You can’t perform that action at this time.
0 commit comments