@@ -5,83 +5,13 @@ import { assert, isValidAddress } from '@hyperlane-xyz/utils';
55import { useAccountAddressForChain } from '@hyperlane-xyz/widgets' ;
66import { useQuery } from '@tanstack/react-query' ;
77import { toast } from 'react-toastify' ;
8- import { defineChain } from 'viem' ;
9- import * as viemChains from 'viem/chains' ;
10- import { chainConfig } from 'viem/op-stack' ;
118import { useToastError } from '../../components/toast/useToastError' ;
129import { logger } from '../../utils/logger' ;
1310import { useMultiProvider } from '../chains/hooks' ;
1411import { getChainDisplayName } from '../chains/utils' ;
1512import { TransferFormValues } from '../transfer/types' ;
1613import { useTokenByIndex } from './hooks' ;
1714
18- const artela = defineChain ( {
19- id : 11820 ,
20- name : 'artela' ,
21- nativeCurrency : {
22- decimals : 18 ,
23- name : 'Artela' ,
24- symbol : 'ART' ,
25- } ,
26- rpcUrls : {
27- default : {
28- http : [ 'https://node-euro.artela.network/rpc' , 'https://node-hongkong.artela.network/rpc' ] ,
29- } ,
30- } ,
31- blockExplorers : {
32- default : {
33- name : 'Artela Explorer' ,
34- url : 'https://artscan.artela.network' ,
35- apiUrl : 'https://artscan.artela.network/api' ,
36- } ,
37- } ,
38- } ) ;
39-
40- const sourceId = 1 ;
41- const unichain = defineChain ( {
42- ...chainConfig ,
43- id : 130 ,
44- name : 'Unichain' ,
45- nativeCurrency : { name : 'Ether' , symbol : 'ETH' , decimals : 18 } ,
46- rpcUrls : {
47- default : {
48- http : [ 'https://mainnet.unichain.org/' ] ,
49- } ,
50- } ,
51- blockExplorers : {
52- default : {
53- name : 'Unichain Explorer' ,
54- url : 'https://uniscan.xyz' ,
55- apiUrl : 'https://api.uniscan.xyz/api' ,
56- } ,
57- } ,
58- contracts : {
59- ...chainConfig . contracts ,
60- multicall3 : {
61- address : '0xca11bde05977b3631167028862be2a173976ca11' ,
62- blockCreated : 0 ,
63- } ,
64- disputeGameFactory : {
65- [ sourceId ] : {
66- address : '0x2F12d621a16e2d3285929C9996f478508951dFe4' ,
67- } ,
68- } ,
69- portal : {
70- [ sourceId ] : {
71- address : '0x0bd48f6B86a26D3a217d0Fa6FfE2B491B956A7a2' ,
72- } ,
73- } ,
74- l1StandardBridge : {
75- [ sourceId ] : {
76- address : '0x81014F44b0a345033bB2b3B21C7a1A308B35fEeA' ,
77- } ,
78- } ,
79- } ,
80- sourceId,
81- } ) ;
82-
83- const chains = { artela, unichain, ...viemChains } ;
84-
8515export function useBalance ( chain ?: ChainName , token ?: IToken , address ?: Address ) {
8616 const multiProvider = useMultiProvider ( ) ;
8717 const { isLoading, isError, error, data } = useQuery ( {
@@ -134,18 +64,6 @@ export async function getDestinationNativeBalance(
13464 }
13565}
13666
137- const abi = [
138- {
139- type : 'event' ,
140- name : 'Filled' ,
141- inputs : [
142- { indexed : false , name : 'orderId' , type : 'bytes32' } ,
143- { indexed : false , name : 'originData' , type : 'bytes' } ,
144- { indexed : false , name : 'fillerData' , type : 'bytes' } ,
145- ] ,
146- } ,
147- ] as const ;
148-
14967export async function checkOrderFilled ( {
15068 destination,
15169 orderId,
0 commit comments