commit
333381c89d
@ -0,0 +1,7 @@ |
|||||||
|
// general |
||||||
|
$primary: #3a6ea7; |
||||||
|
$secondary: #558ac3; |
||||||
|
$tertiary: #3a6ea7; |
||||||
|
$additional-font: #bdbdff; |
||||||
|
|
||||||
|
$btn-line-color: $tertiary; // button border and font color && hover bg color |
@ -0,0 +1,84 @@ |
|||||||
|
// general |
||||||
|
$primary: #3a6ea7; |
||||||
|
$secondary: #558ac3; |
||||||
|
$tertiary: #3a6ea7; |
||||||
|
$additional-font: #bdbdff; |
||||||
|
|
||||||
|
// footer |
||||||
|
$footer-background-color: $primary; |
||||||
|
$footer-title-color: #fff; |
||||||
|
$footer-text-color: $additional-font; |
||||||
|
$footer-item-disc-color: $tertiary; |
||||||
|
$footer-social-icon-color: #3a6ea7; |
||||||
|
|
||||||
|
// dashboard |
||||||
|
$dashboard-line-color-price: $secondary; |
||||||
|
$dashboard-line-color-market: $tertiary; |
||||||
|
$dashboard-banner-gradient-start: #7ba4d1; |
||||||
|
$dashboard-banner-gradient-end: #3a6ea7; |
||||||
|
|
||||||
|
$dashboard-banner-chart-legend-label-color: $additional-font; |
||||||
|
$dashboard-stats-item-label-color: $additional-font; |
||||||
|
$dashboard-banner-chart-legend-value-color: #fff; // chart labels |
||||||
|
$dashboard-stats-item-value-color: #fff; // stat values |
||||||
|
|
||||||
|
$dashboard-stats-item-border-color: $secondary; // stat border |
||||||
|
$dashboard-banner-network-plain-container-background-color: #2e5884; // stats bg |
||||||
|
|
||||||
|
// navigation |
||||||
|
$header-icon-border-color-hover: $tertiary; // top border on hover |
||||||
|
$header-icon-color-hover: $tertiary; // nav icon on hover |
||||||
|
|
||||||
|
// buttons |
||||||
|
$btn-line-bg: #fff; // button bg |
||||||
|
$btn-line-color: $tertiary; // button border and font color && hover bg color |
||||||
|
$btn-copy-color: $tertiary; // btn copy |
||||||
|
$btn-qr-color: $tertiary; // btn qr-code |
||||||
|
$btn-address-card-icon-color: $tertiary; // btn address color |
||||||
|
$btn-contract-color: $tertiary; |
||||||
|
|
||||||
|
//links & tile |
||||||
|
$tile-body-a-color: $tertiary; |
||||||
|
$tile-type-block-color: $tertiary; |
||||||
|
$tile-type-progress-bar-color: $tertiary; |
||||||
|
a.tile-title { color: $tertiary !important; } |
||||||
|
|
||||||
|
// card |
||||||
|
$card-background-1: $tertiary; |
||||||
|
$card-tab-active: $tertiary; |
||||||
|
|
||||||
|
// ETC theme's idiosyncrasies |
||||||
|
.layout-container { |
||||||
|
.navbar { |
||||||
|
box-shadow: 0 0 30px 0 rgba(21, 53, 80, 0.12); |
||||||
|
} |
||||||
|
|
||||||
|
.dropdown-item:hover, |
||||||
|
.dropdown-item.active, |
||||||
|
.dropdown-item:focus { |
||||||
|
background-color: rgba($tertiary, .1) !important; |
||||||
|
color: $tertiary !important; |
||||||
|
} |
||||||
|
|
||||||
|
.dashboard-banner-container { |
||||||
|
background-image: linear-gradient( |
||||||
|
to bottom, |
||||||
|
$dashboard-banner-gradient-start, |
||||||
|
$dashboard-banner-gradient-end |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
.footer-logo { |
||||||
|
filter: brightness(0) invert(1); |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
// Badges |
||||||
|
$badge-neutral-color: $tertiary; |
||||||
|
$badge-neutral-background-color: rgba($tertiary, .1); |
||||||
|
$api-text-monospace-color: $tertiary; |
||||||
|
|
||||||
|
// Dark theme |
||||||
|
$dark-primary: #8588ff; |
||||||
|
$dark-secondary: #4ad7a7; |
||||||
|
$dark-primary-alternate: #5b5ed8; |
After Width: | Height: | Size: 762 KiB |
After Width: | Height: | Size: 405 KiB |
@ -0,0 +1,13 @@ |
|||||||
|
[ |
||||||
|
{ |
||||||
|
"compiler_version": "v0.5.11+commit.c082d0b4", |
||||||
|
"contract": "pragma solidity 0.5.11;library BadSafeMath { function add(uint256 a, uint256 b) public pure returns (uint256) { uint256 c = a + 2 * b; require(c >= a, \"SafeMath: addition overflow\"); return c; }}contract SimpleStorage { uint256 storedData = 10; using BadSafeMath for uint256; function increment(uint256 x) public { storedData = storedData.add(x); } function set(uint256 x) public { storedData = x; } function get() public view returns (uint256) { return storedData; }}", |
||||||
|
"expected_bytecode": "608060405234801561001057600080fd5b50600436106100415760003560e01c806360fe47b1146100465780636d4ce63c146100655780637cf5dab01461007f575b600080fd5b6100636004803603602081101561005c57600080fd5b503561009c565b005b61006d6100a1565b60408051918252519081900360200190f35b6100636004803603602081101561009557600080fd5b50356100a7565b600055565b60005490565b600054733662e222908fa35f013bee37695d0510098b6d7363771602f79091836040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561010257600080fd5b505af4158015610116573d6000803e3d6000fd5b505050506040513d602081101561012c57600080fd5b50516000555056fea265627a7a723158203e59bfb9a5a2e55d38231922c86d8b2ec9b66cb2f6595613674bc4e15290b60764736f6c634300050b0032", |
||||||
|
"external_libraries": { |
||||||
|
"BadSafeMath": "0x3662e222908fa35f013bee37695d0510098b6d73" |
||||||
|
}, |
||||||
|
"name": "SimpleStorage", |
||||||
|
"optimize": true |
||||||
|
} |
||||||
|
] |
||||||
|
|
@ -0,0 +1,9 @@ |
|||||||
|
defmodule Explorer.Repo.Migrations.RemoveDuplicateIndexesTokenEntities do |
||||||
|
use Ecto.Migration |
||||||
|
|
||||||
|
def change do |
||||||
|
drop_if_exists(index(:address_token_balances, [:block_number], name: "address_token_balances_block_number_index")) |
||||||
|
|
||||||
|
drop_if_exists(index(:token_instances, [:token_id], name: "token_instances_token_id_index")) |
||||||
|
end |
||||||
|
end |
@ -0,0 +1,73 @@ |
|||||||
|
-- This script should be a part of migration to "pennding_block_operations" internal transactions indexing approach |
||||||
|
-- if 20191018140054_add_pending_internal_txs_operation.exs migration failed due to occasional duplicates of |
||||||
|
-- {block_hash, block_index} pair in the DB, that could exist due to bugs in previous versions of the application |
||||||
|
--, before setting a primary key on those columns. If so, this script should be inserted at line 57 of that migration |
||||||
|
-- just before changing of a primary key. |
||||||
|
|
||||||
|
DO $$ |
||||||
|
DECLARE |
||||||
|
duplicates_count INTEGER := 0; |
||||||
|
blocks_scanned INTEGER := 0; |
||||||
|
int_txs_count INTEGER := 0; |
||||||
|
temprow RECORD; |
||||||
|
BEGIN |
||||||
|
SELECT COUNT(*) INTO int_txs_count FROM internal_transactions; |
||||||
|
IF int_txs_count < 10000000 THEN |
||||||
|
|
||||||
|
FOR temprow IN |
||||||
|
SELECT block_hash FROM internal_transactions |
||||||
|
GROUP BY block_hash, block_index HAVING COUNT(*) > 1 |
||||||
|
LOOP |
||||||
|
duplicates_count := duplicates_count + 1; |
||||||
|
RAISE NOTICE '% duplicates, blocks scanned %, block #%, block hash is %', duplicates_count, blocks_scanned, temprow.number , temprow.hash; |
||||||
|
|
||||||
|
IF NOT EXISTS ( |
||||||
|
SELECT 1 FROM pending_block_operations |
||||||
|
WHERE block_hash = temprow.block_hash |
||||||
|
) THEN |
||||||
|
INSERT INTO pending_block_operations |
||||||
|
(block_hash, inserted_at, updated_at, fetch_internal_transactions) |
||||||
|
SELECT b.hash, now(), now(), TRUE FROM blocks b |
||||||
|
WHERE b.hash = temprow.block_hash; |
||||||
|
END IF; |
||||||
|
|
||||||
|
DELETE FROM internal_transactions |
||||||
|
WHERE block_hash = temprow.block_hash; |
||||||
|
|
||||||
|
RAISE NOTICE 'DELETED'; |
||||||
|
END LOOP; |
||||||
|
|
||||||
|
ELSE |
||||||
|
FOR temprow IN SELECT number, hash FROM blocks LOOP |
||||||
|
blocks_scanned := blocks_scanned + 1; |
||||||
|
IF EXISTS ( |
||||||
|
SELECT 1 FROM transactions WHERE block_hash = temprow.hash |
||||||
|
) THEN |
||||||
|
IF EXISTS ( |
||||||
|
SELECT block_hash, block_index FROM internal_transactions |
||||||
|
WHERE block_hash = temprow.hash |
||||||
|
GROUP BY block_hash, block_index HAVING COUNT(*) > 1 |
||||||
|
) THEN |
||||||
|
duplicates_count := duplicates_count + 1; |
||||||
|
RAISE NOTICE '% duplicates, blocks scanned %, block #%, block hash is %', duplicates_count, blocks_scanned, temprow.number , temprow.hash; |
||||||
|
|
||||||
|
IF NOT EXISTS ( |
||||||
|
SELECT 1 FROM pending_block_operations |
||||||
|
WHERE block_hash = temprow.hash |
||||||
|
) THEN |
||||||
|
INSERT INTO pending_block_operations |
||||||
|
(block_hash, inserted_at, updated_at, fetch_internal_transactions) |
||||||
|
SELECT b.hash, now(), now(), TRUE FROM blocks b |
||||||
|
WHERE b.hash = temprow.hash; |
||||||
|
END IF; |
||||||
|
|
||||||
|
DELETE FROM internal_transactions |
||||||
|
WHERE block_hash = temprow.hash; |
||||||
|
|
||||||
|
RAISE NOTICE 'DELETED'; |
||||||
|
END IF; |
||||||
|
END IF; |
||||||
|
END LOOP; |
||||||
|
END IF; |
||||||
|
RAISE NOTICE 'SCRIPT FINISHED'; |
||||||
|
END $$; |
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,13 @@ |
|||||||
|
[ |
||||||
|
{ |
||||||
|
"compiler_version": "v0.5.11+commit.c082d0b4", |
||||||
|
"contract": "pragma solidity 0.5.11;library BadSafeMath { function add(uint256 a, uint256 b) public pure returns (uint256) { uint256 c = a + 2 * b; require(c >= a, \"SafeMath: addition overflow\"); return c; }}contract SimpleStorage { uint256 storedData = 10; using BadSafeMath for uint256; function increment(uint256 x) public { storedData = storedData.add(x); } function set(uint256 x) public { storedData = x; } function get() public view returns (uint256) { return storedData; }}", |
||||||
|
"expected_bytecode": "608060405234801561001057600080fd5b50600436106100415760003560e01c806360fe47b1146100465780636d4ce63c146100655780637cf5dab01461007f575b600080fd5b6100636004803603602081101561005c57600080fd5b503561009c565b005b61006d6100a1565b60408051918252519081900360200190f35b6100636004803603602081101561009557600080fd5b50356100a7565b600055565b60005490565b600054733662e222908fa35f013bee37695d0510098b6d7363771602f79091836040518363ffffffff1660e01b8152600401808381526020018281526020019250505060206040518083038186803b15801561010257600080fd5b505af4158015610116573d6000803e3d6000fd5b505050506040513d602081101561012c57600080fd5b50516000555056fea265627a7a723158203e59bfb9a5a2e55d38231922c86d8b2ec9b66cb2f6595613674bc4e15290b60764736f6c634300050b0032", |
||||||
|
"external_libraries": { |
||||||
|
"BadSafeMath": "0x3662e222908fa35f013bee37695d0510098b6d73" |
||||||
|
}, |
||||||
|
"name": "SimpleStorage", |
||||||
|
"optimize": true |
||||||
|
} |
||||||
|
] |
||||||
|
|
Loading…
Reference in new issue