File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ const cliArgs = parseArgs({
3838
3939const PRIVATE_KEY = cliArgs . values [ "private-key" ]
4040const MUNO_DENOM = "muno"
41- const AMOUNT = 1n
41+ const AMOUNT = 12n
4242const RECEIVER = toHex ( "bbn1xe0rnlh3u05qkwytkwmyzl86a0mvpwfxgf2t7u" )
4343const SOURCE_CHAIN_ID = "union-testnet-9"
4444const DESTINATION_CHAIN_ID = "bbn-test-5"
@@ -56,6 +56,7 @@ if (channel === null) {
5656consola . info ( "channel" , channel )
5757
5858consola . info ( "base token" , baseToken )
59+
5960const quoteToken = await getQuoteToken ( SOURCE_CHAIN_ID , baseToken , channel )
6061if ( quoteToken . isErr ( ) ) {
6162 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 (
108108
109109 let client = publicClient . value
110110
111- let baseToken = isAddress ( base_token ) ? base_token : toHex ( base_token )
112-
113111 let predictedQuoteToken = await ResultAsync . fromPromise (
114112 client . queryContractSmart ( fromHex ( `0x${ channel . destination_port_id } ` , "string" ) , {
115113 predict_wrapped_token : {
116114 path : "0" ,
117115 channel : channel . destination_channel_id ,
118- token : baseToken
116+ token : base_token
119117 }
120118 } ) ,
121119 error => {
@@ -143,14 +141,13 @@ export const getQuoteToken = async (
143141
144142 // We need to predict the askToken denom based on the sentToken (denomAddress in the transferAssetFromEvm args)
145143 // we do this by calling the ucs03 instance on the counterparty chain.
146- let baseToken = isAddress ( base_token ) ? base_token : toHex ( base_token )
147144
148145 const predictedQuoteToken = await ResultAsync . fromPromise (
149146 destinationChainClient . readContract ( {
150147 address : `0x${ channel . destination_port_id } ` ,
151148 abi : ucs03ZkgmAbi ,
152149 functionName : "predictWrappedToken" ,
153- args : [ 0 , channel . destination_channel_id , baseToken ]
150+ args : [ 0 , channel . destination_channel_id , base_token ]
154151 } ) ,
155152 error => {
156153 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