Skip to content

Commit

Permalink
chore: rename useArbTokenBridge to parent/child
Browse files Browse the repository at this point in the history
  • Loading branch information
douglance committed Oct 22, 2024
1 parent 5730043 commit f1c5739
Show file tree
Hide file tree
Showing 8 changed files with 146 additions and 135 deletions.
4 changes: 2 additions & 2 deletions packages/arb-token-bridge-ui/src/components/App/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ const ArbTokenBridgeStoreSyncWrapper = (): JSX.Element | null => {
}

setTokenBridgeParams({
l1: {
parent: {
network: parentChain,
provider: parentChainProvider
},
l2: {
child: {
network: childChain,
provider: childChainProvider
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ function TokensPanel({

try {
// Try to add the token as an L2-native token
token.addL2NativeToken(newToken)
token.addChildNativeToken(newToken)
isSuccessful = true
} catch (error) {
//
Expand Down
14 changes: 7 additions & 7 deletions packages/arb-token-bridge-ui/src/hooks/arbTokenBridge.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ export type NodeBlockDeadlineStatus =
| NodeBlockDeadlineStatusTypes.NODE_NOT_CREATED
| NodeBlockDeadlineStatusTypes.EXECUTE_CALL_EXCEPTION

export type L2ToL1EventResult = ChildToParentTransactionEvent
export type ChildToParentEventResult = ChildToParentTransactionEvent

export type L2ToL1EventResultPlus = L2ToL1EventResult & {
export type ChildToParentEventResultPlus = ChildToParentEventResult & {
sender?: string
destinationAddress?: string
l2TxHash?: string
Expand Down Expand Up @@ -139,20 +139,20 @@ export type DepositGasEstimates = GasEstimates & {

export interface ArbTokenBridgeEth {
triggerOutbox: (params: {
event: L2ToL1EventResultPlus
l1Signer: Signer
event: ChildToParentEventResultPlus
parentSigner: Signer
}) => Promise<void | ContractReceipt>
}

export interface ArbTokenBridgeToken {
add: (erc20L1orL2Address: string) => Promise<void>
addL2NativeToken: (erc20L2Address: string) => void
addChildNativeToken: (erc20L2Address: string) => void
addTokensFromList: (tokenList: TokenList, listID: number) => void
removeTokensFromList: (listID: number) => void
updateTokenData: (l1Address: string) => Promise<void>
triggerOutbox: (params: {
event: L2ToL1EventResultPlus
l1Signer: Signer
event: ChildToParentEventResultPlus
parentSigner: Signer
}) => Promise<void | ContractReceipt>
}

Expand Down
Loading

0 comments on commit f1c5739

Please sign in to comment.