File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,22 +13,18 @@ const chain = baseSepolia;
1313const main = async ( ) => {
1414 const relayer = createGelatoEvmRelayerClient ( { apiKey : GELATO_API_KEY , testnet : chain . testnet } ) ;
1515
16- const id = await relayer . sendTransaction ( {
16+ const result = await relayer . sendTransactionSync ( {
1717 chainId : chain . id ,
1818 data : '0xd09de08a' ,
1919 payment : sponsored ( ) ,
2020 to : '0xE27C1359cf02B49acC6474311Bd79d1f10b1f8De'
2121 } ) ;
2222
23- console . log ( `Gelato transaction id: ${ id } ` ) ;
24-
25- const status = await relayer . waitForStatus ( { id } ) ;
26-
27- if ( status . status === StatusCode . Included ) {
28- console . log ( `Transaction hash: ${ status . receipt . transactionHash } ` ) ;
23+ if ( result . status === StatusCode . Included ) {
24+ console . log ( `Transaction hash: ${ result . receipt . transactionHash } ` ) ;
2925 process . exit ( 0 ) ;
3026 } else {
31- console . log ( `Transaction failed, message: ${ status . message } , data: ${ status . data } ` ) ;
27+ console . log ( `Transaction failed, message: ${ result . message } , data: ${ result . data } ` ) ;
3228 process . exit ( 1 ) ;
3329 }
3430} ;
You can’t perform that action at this time.
0 commit comments