diff --git a/.env b/.env index e56226f..90b346f 100644 --- a/.env +++ b/.env @@ -1,2 +1,3 @@ REACT_APP_CONTRACT_ADDRESS=0x5fbdb2315678afecb367f032d93f642f64180aa3 -REACT_APP_NETWORK=0 \ No newline at end of file +REACT_APP_NETWORK=0 +REACT_APP_L1_EXPLORER_BASE_URL=http://18.180.248.43:4000/ \ No newline at end of file diff --git a/.env.goerli b/.env.goerli index 0accee9..385d83b 100644 --- a/.env.goerli +++ b/.env.goerli @@ -1 +1,2 @@ -REACT_APP_NETWORK=5 \ No newline at end of file +REACT_APP_NETWORK=5 +REACT_APP_L1_EXPLORER_BASE_URL=https://goerli.etherscan.io/ \ No newline at end of file diff --git a/.env.kovan b/.env.kovan new file mode 100644 index 0000000..fbb5e5e --- /dev/null +++ b/.env.kovan @@ -0,0 +1,2 @@ +REACT_APP_NETWORK=42 +REACT_APP_L1_EXPLORER_BASE_URL=https://kovan.etherscan.io/ \ No newline at end of file diff --git a/.env.mainnet b/.env.mainnet new file mode 100644 index 0000000..b484935 --- /dev/null +++ b/.env.mainnet @@ -0,0 +1,2 @@ +REACT_APP_NETWORK=1 +REACT_APP_L1_EXPLORER_BASE_URL=https://etherscan.io/ \ No newline at end of file diff --git a/.env.rinkeby b/.env.rinkeby new file mode 100644 index 0000000..b568b1b --- /dev/null +++ b/.env.rinkeby @@ -0,0 +1,2 @@ +REACT_APP_NETWORK=4 +REACT_APP_L1_EXPLORER_BASE_URL=https://rinkeby.etherscan.io/ \ No newline at end of file diff --git a/.env.ropsten b/.env.ropsten new file mode 100644 index 0000000..93b4e34 --- /dev/null +++ b/.env.ropsten @@ -0,0 +1,2 @@ +REACT_APP_NETWORK=3 +REACT_APP_L1_EXPLORER_BASE_URL=https://ropsten.etherscan.io/ \ No newline at end of file diff --git a/src/containers/Layer2Explorer/block/index.js b/src/containers/Layer2Explorer/block/index.js index 8847b30..c156f91 100644 --- a/src/containers/Layer2Explorer/block/index.js +++ b/src/containers/Layer2Explorer/block/index.js @@ -17,6 +17,7 @@ export const TYPE_MAP = { TRANSFER: "transfer_tx", NOP: "nop", }; + class BlockDetail extends Component { state = { activeExpanedRow: null, @@ -95,6 +96,7 @@ class BlockDetail extends Component { render() { const { lang, blockId } = this.props; const { loading, blockInfo } = this.state; + const L1_EXPLORER_BASE_URL = process.env.REACT_APP_L1_EXPLORER_BASE_URL; const columns = [ { key: "hash", @@ -171,7 +173,16 @@ class BlockDetail extends Component {