-
Notifications
You must be signed in to change notification settings - Fork 540
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
1,538 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ on: | |
type: choice | ||
options: | ||
- none | ||
- arbitrum | ||
- base | ||
- gnosis | ||
- eth | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Set of ENVs for Optimism (dev only) | ||
# https://optimism.blockscout.com/ | ||
|
||
# app configuration | ||
NEXT_PUBLIC_APP_PROTOCOL=http | ||
NEXT_PUBLIC_APP_HOST=localhost | ||
NEXT_PUBLIC_APP_PORT=3000 | ||
|
||
# blockchain parameters | ||
NEXT_PUBLIC_NETWORK_NAME=Arbitrum One Nitro | ||
NEXT_PUBLIC_NETWORK_SHORT_NAME=Arbitrum One Nitro | ||
NEXT_PUBLIC_NETWORK_ID=42161 | ||
NEXT_PUBLIC_NETWORK_CURRENCY_NAME=Ether | ||
NEXT_PUBLIC_NETWORK_CURRENCY_SYMBOL=ETH | ||
NEXT_PUBLIC_NETWORK_CURRENCY_DECIMALS=18 | ||
|
||
# api configuration | ||
NEXT_PUBLIC_API_HOST=arbitrum.blockscout.com | ||
NEXT_PUBLIC_API_BASE_PATH=/ | ||
|
||
# ui config | ||
## homepage | ||
NEXT_PUBLIC_HOMEPAGE_CHARTS=['daily_txs'] | ||
## views | ||
NEXT_PUBLIC_CONTRACT_CODE_IDES=[{'title':'Remix IDE','url':'https://remix.ethereum.org/?address={hash}&blockscout={domain}','icon_url':'https://raw.githubusercontent.com/blockscout/frontend-configs/main/configs/ide-icons/remix.png'}] | ||
# app features | ||
NEXT_PUBLIC_APP_INSTANCE=local | ||
NEXT_PUBLIC_APP_ENV=development | ||
NEXT_PUBLIC_GRAPHIQL_TRANSACTION=0xf7d4972356e6ae44ae948d0cf19ef2beaf0e574c180997e969a2837da15e349d | ||
NEXT_PUBLIC_IS_ACCOUNT_SUPPORTED=true | ||
NEXT_PUBLIC_AUTH_URL=http://localhost:3000/login | ||
NEXT_PUBLIC_API_WEBSOCKET_PROTOCOL=ws | ||
NEXT_PUBLIC_LOGOUT_URL=https://blockscoutcom.us.auth0.com/v2/logout | ||
NEXT_PUBLIC_VISUALIZE_API_HOST=https://visualizer.services.blockscout.com | ||
NEXT_PUBLIC_TRANSACTION_INTERPRETATION_PROVIDER=blockscout | ||
# rollup | ||
NEXT_PUBLIC_ROLLUP_TYPE=arbitrum | ||
NEXT_PUBLIC_ROLLUP_L1_BASE_URL=https://eth.blockscout.com | ||
NEXT_PUBLIC_AD_BANNER_PROVIDER=hype |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import type { ArbitrumBatchStatus, ArbitrumL2TxData } from 'types/api/arbitrumL2'; | ||
|
||
type Args = { | ||
status: ArbitrumBatchStatus; | ||
commitment_transaction: ArbitrumL2TxData; | ||
confirmation_transaction: ArbitrumL2TxData; | ||
} | ||
|
||
export default function getArbitrumVerificationStepStatus({ | ||
status, | ||
commitment_transaction: commitTx, | ||
confirmation_transaction: confirmTx, | ||
}: Args) { | ||
if (status === 'Sent to base') { | ||
if (commitTx.status === 'unfinalized') { | ||
return 'pending'; | ||
} | ||
} | ||
if (status === 'Confirmed on base') { | ||
if (confirmTx.status === 'unfinalized') { | ||
return 'pending'; | ||
} | ||
} | ||
return 'finalized'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import type { ArbitrumL2TxnBatchesItem, ArbitrumL2TxnBatch, ArbitrumL2MessagesItem } from 'types/api/arbitrumL2'; | ||
|
||
import { ADDRESS_HASH } from './addressParams'; | ||
import { TX_HASH } from './tx'; | ||
|
||
export const ARBITRUM_MESSAGES_ITEM: ArbitrumL2MessagesItem = { | ||
completion_transaction_hash: TX_HASH, | ||
id: 181920, | ||
origination_address: ADDRESS_HASH, | ||
origination_transaction_block_number: 123456, | ||
origination_transaction_hash: TX_HASH, | ||
origination_timestamp: '2023-06-01T14:46:48.000000Z', | ||
status: 'relayed', | ||
}; | ||
|
||
export const ARBITRUM_L2_TXN_BATCHES_ITEM: ArbitrumL2TxnBatchesItem = { | ||
number: 12345, | ||
block_count: 12345, | ||
transactions_count: 10000, | ||
commitment_transaction: { | ||
block_number: 12345, | ||
timestamp: '2024-04-17T08:51:58.000000Z', | ||
hash: TX_HASH, | ||
status: 'finalized', | ||
}, | ||
}; | ||
|
||
export const ARBITRUM_L2_TXN_BATCH: ArbitrumL2TxnBatch = { | ||
...ARBITRUM_L2_TXN_BATCHES_ITEM, | ||
after_acc: '0xcd064f3409015e8e6407e492e5275a185e492c6b43ccf127f22092d8057a9ffb', | ||
before_acc: '0x2ed7c4985eb778d76ec400a43805e7feecc8c2afcdb492dbe5caf227de6d37bc', | ||
start_block: 1245209, | ||
end_block: 1245490, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
import type { Block } from './block'; | ||
import type { Transaction } from './transaction'; | ||
|
||
export type ArbitrumL2MessagesItem = { | ||
completion_transaction_hash: string | null; | ||
id: number; | ||
origination_address: string; | ||
origination_timestamp: string | null; | ||
origination_transaction_block_number: number; | ||
origination_transaction_hash: string; | ||
status: string; | ||
} | ||
|
||
export type ArbitrumL2MessagesResponse = { | ||
items: Array<ArbitrumL2MessagesItem>; | ||
next_page_params: { | ||
direction: string; | ||
id: number; | ||
items_count: number; | ||
}; | ||
} | ||
|
||
export type ArbitrumL2TxData = { | ||
hash: string | null; | ||
status: string | null; | ||
timestamp: string | null; | ||
} | ||
|
||
type ArbitrumL2BatchCommitmentTx = { | ||
block_number: number; | ||
hash: string; | ||
status: string; | ||
timestamp: string; | ||
} | ||
|
||
export type ArbitrumL2TxnBatchesItem = { | ||
block_count: number; | ||
commitment_transaction: ArbitrumL2BatchCommitmentTx; | ||
number: number; | ||
transactions_count: number; | ||
} | ||
|
||
export type ArbitrumL2TxnBatchesResponse = { | ||
items: Array<ArbitrumL2TxnBatchesItem>; | ||
next_page_params: { | ||
number: number; | ||
items_count: number; | ||
} | null; | ||
} | ||
|
||
export type ArbitrumL2TxnBatch = { | ||
after_acc: string; | ||
before_acc: string; | ||
commitment_transaction: ArbitrumL2BatchCommitmentTx; | ||
end_block: number; | ||
start_block: number; | ||
number: number; | ||
transactions_count: number; | ||
} | ||
|
||
export type ArbitrumL2BatchTxs = { | ||
items: Array<Transaction>; | ||
next_page_params: { | ||
batch_number: string; | ||
block_number: number; | ||
index: number; | ||
items_count: number; | ||
} | null; | ||
} | ||
|
||
export type ArbitrumL2BatchBlocks = { | ||
items: Array<Block>; | ||
next_page_params: { | ||
batch_number: string; | ||
block_number: number; | ||
items_count: number; | ||
} | null; | ||
} | ||
|
||
export const ARBITRUM_L2_TX_BATCH_STATUSES = [ | ||
'Processed on rollup' as const, | ||
'Sent to base' as const, | ||
'Confirmed on base' as const, | ||
]; | ||
|
||
export type ArbitrumBatchStatus = typeof ARBITRUM_L2_TX_BATCH_STATUSES[number]; |
Oops, something went wrong.