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
fef3aa38
Commit
fef3aa38
authored
Oct 24, 2024
by
isstuev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add more robust addresses
parent
89af39c6
Changes
15
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
42 additions
and
17 deletions
+42
-17
address.ts
types/api/address.ts
+4
-3
contract.ts
types/api/contract.ts
+1
-0
search.ts
types/api/search.ts
+4
-0
token.ts
types/api/token.ts
+1
-0
AddressDetails.tsx
ui/address/AddressDetails.tsx
+6
-2
ContractDetailsAlerts.tsx
ui/address/contract/alerts/ContractDetailsAlerts.tsx
+1
-1
SearchResultListItem.tsx
ui/searchResults/SearchResultListItem.tsx
+6
-3
SearchResultTableItem.tsx
ui/searchResults/SearchResultTableItem.tsx
+6
-3
SearchBarSuggestAddress.tsx
...ts/searchBar/SearchBarSuggest/SearchBarSuggestAddress.tsx
+1
-1
SearchBarSuggestDomain.tsx
...ets/searchBar/SearchBarSuggest/SearchBarSuggestDomain.tsx
+1
-1
SearchBarSuggestLabel.tsx
...pets/searchBar/SearchBarSuggest/SearchBarSuggestLabel.tsx
+1
-1
SearchBarSuggestToken.tsx
...pets/searchBar/SearchBarSuggest/SearchBarSuggestToken.tsx
+1
-1
TokenInstanceCreatorAddress.tsx
ui/tokenInstance/details/TokenInstanceCreatorAddress.tsx
+3
-0
TokensListItem.tsx
ui/tokens/TokensListItem.tsx
+2
-1
TokensTableItem.tsx
ui/tokens/TokensTableItem.tsx
+4
-0
No files found.
types/api/address.ts
View file @
fef3aa38
...
...
@@ -11,6 +11,7 @@ export interface Address extends UserTags {
block_number_balance_updated_at
:
number
|
null
;
coin_balance
:
string
|
null
;
creator_address_hash
:
string
|
null
;
creator_filecoin_robust_address
?:
string
|
null
;
creation_tx_hash
:
string
|
null
;
exchange_rate
:
string
|
null
;
ens_domain_name
:
string
|
null
;
...
...
@@ -271,9 +272,9 @@ export type AddressEpochRewardsItem = {
}
export
type
AddressFilecoinParams
=
{
actor_type
:
FilecoinActorType
;
id
:
string
;
robust
:
string
;
actor_type
?
:
FilecoinActorType
;
id
?:
string
|
null
;
robust
?:
string
|
null
;
}
export
type
FilecoinActorType
=
...
...
types/api/contract.ts
View file @
fef3aa38
...
...
@@ -67,6 +67,7 @@ export interface SmartContract {
remappings
?:
Array
<
string
>
;
};
verified_twin_address_hash
:
string
|
null
;
verified_twin_filecoin_robust_address
?:
string
|
null
;
proxy_type
:
SmartContractProxyType
|
null
;
language
:
string
|
null
;
license_type
:
SmartContractLicenseType
|
null
;
...
...
types/api/search.ts
View file @
fef3aa38
...
...
@@ -15,6 +15,7 @@ export interface SearchResultToken {
total_supply
:
string
|
null
;
is_verified_via_admin_panel
:
boolean
;
is_smart_contract_verified
:
boolean
;
filecoin_robust_address
?:
string
|
null
;
}
export
interface
SearchResultAddressOrContract
{
...
...
@@ -23,6 +24,7 @@ export interface SearchResultAddressOrContract {
address
:
string
;
is_smart_contract_verified
:
boolean
;
certified
?:
true
;
filecoin_robust_address
?:
string
|
null
;
url
?:
string
;
// not used by the frontend, we build the url ourselves
ens_info
?:
{
address_hash
:
string
;
...
...
@@ -36,6 +38,7 @@ export interface SearchResultDomain {
type
:
'
ens_domain
'
;
name
:
string
|
null
;
address
:
string
;
filecoin_robust_address
?:
string
|
null
;
is_smart_contract_verified
:
boolean
;
url
?:
string
;
// not used by the frontend, we build the url ourselves
ens_info
:
{
...
...
@@ -49,6 +52,7 @@ export interface SearchResultDomain {
export
interface
SearchResultLabel
{
type
:
'
label
'
;
address
:
string
;
filecoin_robust_address
?:
string
|
null
;
name
:
string
;
is_smart_contract_verified
:
boolean
;
url
?:
string
;
// not used by the frontend, we build the url ourselves
...
...
types/api/token.ts
View file @
fef3aa38
...
...
@@ -20,6 +20,7 @@ export interface TokenInfo<T extends TokenType = TokenType> {
bridge_type
?:
string
|
null
;
origin_chain_id
?:
string
|
null
;
foreign_address
?:
string
|
null
;
filecoin_robust_address
?:
string
|
null
;
}
export
interface
TokenCounters
{
...
...
ui/address/AddressDetails.tsx
View file @
fef3aa38
...
...
@@ -67,6 +67,8 @@ const AddressDetails = ({ addressQuery, scrollRef }: Props) => {
has_token_transfers
:
true
,
has_validated_blocks
:
false
,
filecoin
:
undefined
,
creator_filecoin_robust_address
:
null
,
creator_address_hash
:
null
,
}),
[
addressHash
]);
// error handling (except 404 codes)
...
...
@@ -87,6 +89,8 @@ const AddressDetails = ({ addressQuery, scrollRef }: Props) => {
return
null
;
}
const
creatorAddressHash
=
data
.
creator_address_hash
;
return
(
<>
{
addressQuery
.
isDegradedData
&&
<
ServiceDegradationWarning
isLoading=
{
addressQuery
.
isPlaceholderData
}
mb=
{
6
}
/>
}
...
...
@@ -140,7 +144,7 @@ const AddressDetails = ({ addressQuery, scrollRef }: Props) => {
<
AddressNameInfo
data=
{
data
}
isLoading=
{
addressQuery
.
isPlaceholderData
}
/>
{
data
.
is_contract
&&
data
.
creation_tx_hash
&&
data
.
creator_address_hash
&&
(
{
data
.
is_contract
&&
data
.
creation_tx_hash
&&
(
creatorAddressHash
)
&&
(
<>
<
DetailsInfoItem
.
Label
hint=
"Transaction and address of creation"
...
...
@@ -150,7 +154,7 @@ const AddressDetails = ({ addressQuery, scrollRef }: Props) => {
</
DetailsInfoItem
.
Label
>
<
DetailsInfoItem
.
Value
>
<
AddressEntity
address=
{
{
hash
:
data
.
creator_address_hash
}
}
address=
{
{
hash
:
creatorAddressHash
,
filecoin
:
{
robust
:
data
.
creator_filecoin_robust_address
}
}
}
truncation=
"constant"
noIcon
/>
...
...
ui/address/contract/alerts/ContractDetailsAlerts.tsx
View file @
fef3aa38
...
...
@@ -72,7 +72,7 @@ const ContractDetailsAlerts = ({ data, isLoading, addressHash, channel }: Props)
<
Alert
status=
"warning"
whiteSpace=
"pre-wrap"
flexWrap=
"wrap"
>
<
span
>
Contract is not verified. However, we found a verified contract with the same bytecode in Blockscout DB
</
span
>
<
AddressEntity
address=
{
{
hash
:
data
.
verified_twin_address_hash
,
is_contract
:
true
}
}
address=
{
{
hash
:
data
.
verified_twin_address_hash
,
filecoin
:
{
robust
:
data
.
verified_twin_filecoin_robust_address
},
is_contract
:
true
}
}
truncation=
"constant"
fontSize=
"sm"
fontWeight=
"500"
...
...
ui/searchResults/SearchResultListItem.tsx
View file @
fef3aa38
...
...
@@ -80,6 +80,9 @@ const SearchResultListItem = ({ data, searchTerm, isLoading }: Props) => {
const
shouldHighlightHash
=
ADDRESS_REGEXP
.
test
(
searchTerm
);
const
address
=
{
hash
:
data
.
address
,
filecoin
:
{
robust
:
data
.
filecoin_robust_address
,
},
is_contract
:
data
.
type
===
'
contract
'
,
is_verified
:
data
.
is_smart_contract_verified
,
name
:
null
,
...
...
@@ -288,7 +291,7 @@ const SearchResultListItem = ({ data, searchTerm, isLoading }: Props) => {
<
Grid
templateColumns=
{
templateCols
}
alignItems=
"center"
gap=
{
2
}
>
<
Skeleton
isLoaded=
{
!
isLoading
}
overflow=
"hidden"
display=
"flex"
alignItems=
"center"
>
<
Text
whiteSpace=
"nowrap"
overflow=
"hidden"
>
<
HashStringShortenDynamic
hash=
{
data
.
address
}
isTooltipDisabled
/>
<
HashStringShortenDynamic
hash=
{
data
.
filecoin_robust_address
||
data
.
address
}
isTooltipDisabled
/>
</
Text
>
{
data
.
is_smart_contract_verified
&&
<
IconSvg
name=
"status/success"
boxSize=
"14px"
color=
"green.500"
ml=
{
1
}
flexShrink=
{
0
}
/>
}
</
Skeleton
>
...
...
@@ -333,7 +336,7 @@ const SearchResultListItem = ({ data, searchTerm, isLoading }: Props) => {
return
(
<
Flex
alignItems=
"center"
>
<
Box
overflow=
"hidden"
>
<
HashStringShortenDynamic
hash=
{
data
.
address
}
/>
<
HashStringShortenDynamic
hash=
{
data
.
filecoin_robust_address
||
data
.
address
}
/>
</
Box
>
{
data
.
is_smart_contract_verified
&&
<
IconSvg
name=
"status/success"
boxSize=
"14px"
color=
"green.500"
ml=
{
1
}
flexShrink=
{
0
}
/>
}
</
Flex
>
...
...
@@ -384,7 +387,7 @@ const SearchResultListItem = ({ data, searchTerm, isLoading }: Props) => {
return
(
<
Flex
alignItems=
"center"
gap=
{
3
}
>
<
Box
overflow=
"hidden"
>
<
HashStringShortenDynamic
hash=
{
data
.
address
}
/>
<
HashStringShortenDynamic
hash=
{
data
.
filecoin_robust_address
||
data
.
address
}
/>
</
Box
>
{
data
.
ens_info
.
names_count
>
1
?
...
...
ui/searchResults/SearchResultTableItem.tsx
View file @
fef3aa38
...
...
@@ -77,7 +77,7 @@ const SearchResultTableItem = ({ data, searchTerm, isLoading }: Props) => {
<
Td
fontSize=
"sm"
verticalAlign=
"middle"
>
<
Skeleton
isLoaded=
{
!
isLoading
}
whiteSpace=
"nowrap"
overflow=
"hidden"
display=
"flex"
alignItems=
"center"
>
<
Box
overflow=
"hidden"
whiteSpace=
"nowrap"
w=
{
data
.
is_smart_contract_verified
?
'
calc(100%-28px)
'
:
'
unset
'
}
>
<
HashStringShortenDynamic
hash=
{
data
.
address
}
/>
<
HashStringShortenDynamic
hash=
{
data
.
filecoin_robust_address
||
data
.
address
}
/>
</
Box
>
{
data
.
is_smart_contract_verified
&&
<
IconSvg
name=
"status/success"
boxSize=
"14px"
color=
"green.500"
ml=
{
1
}
flexShrink=
{
0
}
/>
}
</
Skeleton
>
...
...
@@ -100,6 +100,9 @@ const SearchResultTableItem = ({ data, searchTerm, isLoading }: Props) => {
const
addressName
=
data
.
name
||
data
.
ens_info
?.
name
;
const
address
=
{
hash
:
data
.
address
,
filecoin
:
{
robust
:
data
.
filecoin_robust_address
,
},
is_contract
:
data
.
type
===
'
contract
'
,
is_verified
:
data
.
is_smart_contract_verified
,
name
:
null
,
...
...
@@ -174,7 +177,7 @@ const SearchResultTableItem = ({ data, searchTerm, isLoading }: Props) => {
<
Td
fontSize=
"sm"
verticalAlign=
"middle"
>
<
Flex
alignItems=
"center"
overflow=
"hidden"
>
<
Box
overflow=
"hidden"
whiteSpace=
"nowrap"
w=
{
data
.
is_smart_contract_verified
?
'
calc(100%-28px)
'
:
'
unset
'
}
>
<
HashStringShortenDynamic
hash=
{
data
.
address
}
/>
<
HashStringShortenDynamic
hash=
{
data
.
filecoin_robust_address
||
data
.
address
}
/>
</
Box
>
{
data
.
is_smart_contract_verified
&&
<
IconSvg
name=
"status/success"
boxSize=
"14px"
color=
"green.500"
ml=
{
1
}
flexShrink=
{
0
}
/>
}
</
Flex
>
...
...
@@ -392,7 +395,7 @@ const SearchResultTableItem = ({ data, searchTerm, isLoading }: Props) => {
<
Td
>
<
Flex
alignItems=
"center"
overflow=
"hidden"
>
<
Box
overflow=
"hidden"
whiteSpace=
"nowrap"
w=
{
data
.
is_smart_contract_verified
?
'
calc(100%-28px)
'
:
'
unset
'
}
>
<
HashStringShortenDynamic
hash=
{
data
.
address
}
/>
<
HashStringShortenDynamic
hash=
{
data
.
filecoin_robust_address
||
data
.
address
}
/>
</
Box
>
{
data
.
is_smart_contract_verified
&&
<
IconSvg
name=
"status/success"
boxSize=
"14px"
color=
"green.500"
ml=
{
1
}
flexShrink=
{
0
}
/>
}
</
Flex
>
...
...
ui/snippets/searchBar/SearchBarSuggest/SearchBarSuggestAddress.tsx
View file @
fef3aa38
...
...
@@ -52,7 +52,7 @@ const SearchBarSuggestAddress = ({ data, isMobile, searchTerm }: Props) => {
{
data
.
certified
&&
<
ContractCertifiedLabel
boxSize=
{
5
}
iconSize=
{
5
}
ml=
{
1
}
/>
}
</
Flex
>
);
const
addressEl
=
<
HashStringShortenDynamic
hash=
{
data
.
address
}
isTooltipDisabled
/>;
const
addressEl
=
<
HashStringShortenDynamic
hash=
{
data
.
filecoin_robust_address
||
data
.
address
}
isTooltipDisabled
/>;
if
(
isMobile
)
{
return
(
...
...
ui/snippets/searchBar/SearchBarSuggest/SearchBarSuggestDomain.tsx
View file @
fef3aa38
...
...
@@ -34,7 +34,7 @@ const SearchBarSuggestDomain = ({ data, isMobile, searchTerm }: Props) => {
whiteSpace=
"nowrap"
variant=
"secondary"
>
<
HashStringShortenDynamic
hash=
{
data
.
address
}
isTooltipDisabled
/>
<
HashStringShortenDynamic
hash=
{
data
.
filecoin_robust_address
||
data
.
address
}
isTooltipDisabled
/>
</
Text
>
);
...
...
ui/snippets/searchBar/SearchBarSuggest/SearchBarSuggestLabel.tsx
View file @
fef3aa38
...
...
@@ -33,7 +33,7 @@ const SearchBarSuggestLabel = ({ data, isMobile, searchTerm }: Props) => {
whiteSpace=
"nowrap"
variant=
"secondary"
>
<
HashStringShortenDynamic
hash=
{
data
.
address
}
isTooltipDisabled
/>
<
HashStringShortenDynamic
hash=
{
data
.
filecoin_robust_address
||
data
.
address
}
isTooltipDisabled
/>
</
Text
>
);
...
...
ui/snippets/searchBar/SearchBarSuggest/SearchBarSuggestToken.tsx
View file @
fef3aa38
...
...
@@ -30,7 +30,7 @@ const SearchBarSuggestToken = ({ data, isMobile, searchTerm }: Props) => {
const
address
=
(
<
Text
variant=
"secondary"
whiteSpace=
"nowrap"
overflow=
"hidden"
>
<
HashStringShortenDynamic
hash=
{
data
.
address
}
isTooltipDisabled
/>
<
HashStringShortenDynamic
hash=
{
data
.
filecoin_robust_address
||
data
.
address
}
isTooltipDisabled
/>
</
Text
>
);
...
...
ui/tokenInstance/details/TokenInstanceCreatorAddress.tsx
View file @
fef3aa38
...
...
@@ -28,6 +28,9 @@ const TokenInstanceCreatorAddress = ({ hash }: Props) => {
const
creatorAddress
=
{
hash
:
addressQuery
.
data
.
creator_address_hash
,
filecoin
:
{
robust
:
addressQuery
.
data
.
creator_filecoin_robust_address
,
},
is_contract
:
false
,
implementations
:
null
,
};
...
...
ui/tokens/TokensListItem.tsx
View file @
fef3aa38
...
...
@@ -32,6 +32,7 @@ const TokensTableItem = ({
const
{
address
,
filecoin_robust_address
:
filecoinRobustAddress
,
exchange_rate
:
exchangeRate
,
type
,
holders
,
...
...
@@ -70,7 +71,7 @@ const TokensTableItem = ({
</
Grid
>
<
Flex
justifyContent=
"space-between"
alignItems=
"center"
width=
"150px"
ml=
{
7
}
mt=
{
-
2
}
>
<
AddressEntity
address=
{
{
hash
:
address
}
}
address=
{
{
hash
:
address
,
filecoin
:
{
robust
:
filecoinRobustAddress
}
}
}
isLoading=
{
isLoading
}
truncation=
"constant"
noIcon
...
...
ui/tokens/TokensTableItem.tsx
View file @
fef3aa38
...
...
@@ -32,6 +32,7 @@ const TokensTableItem = ({
const
{
address
,
filecoin_robust_address
:
filecoinRobustAddress
,
exchange_rate
:
exchangeRate
,
type
,
holders
,
...
...
@@ -45,6 +46,9 @@ const TokensTableItem = ({
const
tokenAddress
:
AddressEntityProps
[
'
address
'
]
=
{
hash
:
address
,
filecoin
:
{
robust
:
filecoinRobustAddress
,
},
name
:
''
,
is_contract
:
true
,
is_verified
:
false
,
...
...
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