-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
350 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { ConnectEnv } from '@aurora-is-near/engine'; | ||
declare global { | ||
namespace NodeJS { | ||
interface ProcessEnv extends ConnectEnv { | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
67 changes: 67 additions & 0 deletions
67
migrations/20211215003309_change_sha3_uncles_in_eth_getblockbynumber.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
-- +goose Up | ||
-- +goose StatementBegin | ||
CREATE OR REPLACE FUNCTION eth_getBlockByNumber(block_id blockno) RETURNS block_result AS $$ | ||
DECLARE | ||
result block_result; | ||
BEGIN | ||
SELECT | ||
id, -- number | ||
hash, -- hash | ||
parent_hash, -- parentHash | ||
repeat('\000', 8)::bytea, -- nonce | ||
'\x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347', -- sha3Uncles keccak256(rlp.encode([])) | ||
repeat('\000', 256)::bytea, -- logsBloom | ||
transactions_root, -- transactionsRoot | ||
state_root, -- stateRoot | ||
receipts_root, -- receiptsRoot | ||
repeat('\000', 20)::bytea, -- miner | ||
0, -- difficulty | ||
0, -- totalDifficulty | ||
''::bytea, -- extraData | ||
size, -- size | ||
gas_limit, -- gasLimit | ||
gas_used, -- gasUsed | ||
repeat('\000', 32)::hash, -- mixHash | ||
COALESCE(EXTRACT(EPOCH FROM timestamp), 0)::int4 -- timestamp | ||
FROM block | ||
WHERE id = block_id | ||
LIMIT 1 | ||
INTO STRICT result; | ||
RETURN result; | ||
END; | ||
$$ LANGUAGE plpgsql VOLATILE PARALLEL UNSAFE; | ||
-- +goose StatementEnd | ||
|
||
-- +goose Down | ||
-- +goose StatementBegin | ||
CREATE OR REPLACE FUNCTION eth_getBlockByNumber(block_id blockno) RETURNS block_result AS $$ | ||
DECLARE | ||
result block_result; | ||
BEGIN | ||
SELECT | ||
id, -- number | ||
hash, -- hash | ||
parent_hash, -- parentHash | ||
repeat('\000', 8)::bytea, -- nonce | ||
repeat('\000', 32)::bytea, -- sha3Uncles | ||
repeat('\000', 256)::bytea, -- logsBloom | ||
transactions_root, -- transactionsRoot | ||
state_root, -- stateRoot | ||
receipts_root, -- receiptsRoot | ||
repeat('\000', 20)::bytea, -- miner | ||
0, -- difficulty | ||
0, -- totalDifficulty | ||
''::bytea, -- extraData | ||
size, -- size | ||
gas_limit, -- gasLimit | ||
gas_used, -- gasUsed | ||
repeat('\000', 32)::hash, -- mixHash | ||
COALESCE(EXTRACT(EPOCH FROM timestamp), 0)::int4 -- timestamp | ||
FROM block | ||
WHERE id = block_id | ||
LIMIT 1 | ||
INTO STRICT result; | ||
RETURN result; | ||
END; | ||
$$ LANGUAGE plpgsql VOLATILE PARALLEL UNSAFE; | ||
-- +goose StatementEnd |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.