Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
bc44650f
Commit
bc44650f
authored
Feb 17, 2023
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
contract code fixes
parent
4737b3cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
ContractCode.tsx
ui/address/contract/ContractCode.tsx
+7
-6
No files found.
ui/address/contract/ContractCode.tsx
View file @
bc44650f
...
@@ -4,6 +4,7 @@ import { route } from 'nextjs-routes';
...
@@ -4,6 +4,7 @@ import { route } from 'nextjs-routes';
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
dayjs
from
'
lib/date/dayjs
'
;
import
getQueryParamString
from
'
lib/router/getQueryParamString
'
;
import
getQueryParamString
from
'
lib/router/getQueryParamString
'
;
import
Address
from
'
ui/shared/address/Address
'
;
import
Address
from
'
ui/shared/address/Address
'
;
import
AddressIcon
from
'
ui/shared/address/AddressIcon
'
;
import
AddressIcon
from
'
ui/shared/address/AddressIcon
'
;
...
@@ -15,12 +16,12 @@ import RawDataSnippet from 'ui/shared/RawDataSnippet';
...
@@ -15,12 +16,12 @@ import RawDataSnippet from 'ui/shared/RawDataSnippet';
import
ContractSourceCode
from
'
./ContractSourceCode
'
;
import
ContractSourceCode
from
'
./ContractSourceCode
'
;
const
InfoItem
=
({
label
,
value
}:
{
label
:
string
;
value
:
string
})
=>
(
const
InfoItem
=
chakra
(({
label
,
value
,
className
}:
{
label
:
string
;
value
:
string
;
className
?
:
string
})
=>
(
<
GridItem
display=
"flex"
columnGap=
{
6
}
>
<
GridItem
display=
"flex"
columnGap=
{
6
}
wordBreak=
"break-all"
className=
{
className
}
>
<
Text
w=
"170px"
flexShrink=
{
0
}
fontWeight=
{
500
}
>
{
label
}
</
Text
>
<
Text
w=
"170px"
flexShrink=
{
0
}
fontWeight=
{
500
}
>
{
label
}
</
Text
>
<
Text
wordBreak=
"break-all"
>
{
value
}
</
Text
>
<
Text
>
{
value
}
</
Text
>
</
GridItem
>
</
GridItem
>
);
)
)
;
const
ContractCode
=
()
=>
{
const
ContractCode
=
()
=>
{
const
router
=
useRouter
();
const
router
=
useRouter
();
...
@@ -153,10 +154,10 @@ const ContractCode = () => {
...
@@ -153,10 +154,10 @@ const ContractCode = () => {
<
Grid
templateColumns=
{
{
base
:
'
1fr
'
,
lg
:
'
1fr 1fr
'
}
}
rowGap=
{
4
}
columnGap=
{
6
}
mb=
{
8
}
>
<
Grid
templateColumns=
{
{
base
:
'
1fr
'
,
lg
:
'
1fr 1fr
'
}
}
rowGap=
{
4
}
columnGap=
{
6
}
mb=
{
8
}
>
{
data
.
name
&&
<
InfoItem
label=
"Contract name"
value=
{
data
.
name
}
/>
}
{
data
.
name
&&
<
InfoItem
label=
"Contract name"
value=
{
data
.
name
}
/>
}
{
data
.
compiler_version
&&
<
InfoItem
label=
"Compiler version"
value=
{
data
.
compiler_version
}
/>
}
{
data
.
compiler_version
&&
<
InfoItem
label=
"Compiler version"
value=
{
data
.
compiler_version
}
/>
}
{
data
.
evm_version
&&
<
InfoItem
label=
"EVM version"
value=
{
data
.
evm_version
}
/>
}
{
data
.
evm_version
&&
<
InfoItem
label=
"EVM version"
value=
{
data
.
evm_version
}
textTransform=
"capitalize"
/>
}
{
typeof
data
.
optimization_enabled
===
'
boolean
'
&&
<
InfoItem
label=
"Optimization enabled"
value=
{
data
.
optimization_enabled
?
'
true
'
:
'
false
'
}
/>
}
{
typeof
data
.
optimization_enabled
===
'
boolean
'
&&
<
InfoItem
label=
"Optimization enabled"
value=
{
data
.
optimization_enabled
?
'
true
'
:
'
false
'
}
/>
}
{
data
.
optimization_runs
&&
<
InfoItem
label=
"Optimization runs"
value=
{
String
(
data
.
optimization_runs
)
}
/>
}
{
data
.
optimization_runs
&&
<
InfoItem
label=
"Optimization runs"
value=
{
String
(
data
.
optimization_runs
)
}
/>
}
{
data
.
verified_at
&&
<
InfoItem
label=
"Verified at"
value=
{
da
ta
.
verified_at
}
/>
}
{
data
.
verified_at
&&
<
InfoItem
label=
"Verified at"
value=
{
da
yjs
(
data
.
verified_at
).
format
(
'
LLLL
'
)
}
wordBreak=
"break-word"
/>
}
</
Grid
>
</
Grid
>
)
}
)
}
<
Flex
flexDir=
"column"
rowGap=
{
6
}
>
<
Flex
flexDir=
"column"
rowGap=
{
6
}
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment