File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed
components/SubgraphEditor/SubgraphConfig/SelectedContract Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,21 @@ const ActionButton = styled.button`
8989 font-weight: bold;
9090`
9191
92+ const EtherscanLink = styled . a `
93+ display: inline-block;
94+ background-image: url(/etherscan-logo-light-circle.svg);
95+ height: 16px;
96+ width: 16px;
97+ opacity: 0.5;
98+ background-size: 100%;
99+ margin-left: 6px;
100+ vertical-align: middle;
101+
102+ &:hover {
103+ opacity: 0.8;
104+ }
105+ `
106+
92107const CHAIN_ID = 1
93108
94109function parseEventsFromAbi ( abi : any [ ] ) {
@@ -261,7 +276,10 @@ export const SelectedContract = (props: SelectedContractProps) => {
261276 </ div >
262277 { ! isTemplate && (
263278 < >
264- < span className = "address" > { addresses [ CHAIN_ID ] } </ span >
279+ < span className = "address" >
280+ { addresses [ CHAIN_ID ] }
281+ < EtherscanLink href = { `https://etherscan.io/address/${ addresses [ CHAIN_ID ] } ` } target = "etherscan" />
282+ </ span >
265283 { metadataLoading ? < span > Fetching contract metadata...</ span > : null }
266284 { startBlocks [ CHAIN_ID ] ? (
267285 < span className = "address" > Deployed on block { startBlocks [ CHAIN_ID ] } </ span >
You can’t perform that action at this time.
0 commit comments