diff --git a/.docker/docker-entrypoint-initdb.d/init.txt b/.docker/docker-entrypoint-initdb.d/init.txt index 0520f1d3..6b6b19fd 100644 --- a/.docker/docker-entrypoint-initdb.d/init.txt +++ b/.docker/docker-entrypoint-initdb.d/init.txt @@ -474,7 +474,7 @@ BEGIN t.to AS "to", t.gas_used AS "gasUsed", 0::u256 AS "cumulativeGasUsed", -- TODO: tally? - CASE WHEN t.to IS NULL OR t.to = '\x0000000000000000000000000000000000000000' THEN t.output + CASE WHEN (t.to IS NULL OR t.to = '\x0000000000000000000000000000000000000000') AND length(t.output) = 20 THEN t.output ELSE NULL END AS "contractAddress", NULL AS "logs", -- TODO: fetch event.id[] diff --git a/CHANGES.md b/CHANGES.md index d97d7fce..823d948c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## 2021-12-01 + +Stored procedure needs to be reloaded [Issue #133](https://github.com/aurora-is-near/aurora-relayer/issues/133) + +- `etc/schema/functions/eth_getTransactionReceipt.sql` + + ## 2021-10-19 Some schema changes were necessary in order to be able to index diff --git a/etc/schema/functions/eth_getTransactionReceipt.sql b/etc/schema/functions/eth_getTransactionReceipt.sql index e174ce17..39ad1976 100644 --- a/etc/schema/functions/eth_getTransactionReceipt.sql +++ b/etc/schema/functions/eth_getTransactionReceipt.sql @@ -13,7 +13,7 @@ BEGIN t.to AS "to", t.gas_used AS "gasUsed", 0::u256 AS "cumulativeGasUsed", -- TODO: tally? - CASE WHEN t.to IS NULL OR t.to = '\x0000000000000000000000000000000000000000' THEN t.output + CASE WHEN (t.to IS NULL OR t.to = '\x0000000000000000000000000000000000000000') AND length(t.output) = 20 THEN t.output ELSE NULL END AS "contractAddress", NULL AS "logs", -- TODO: fetch event.id[] diff --git a/src/index.ts b/src/index.ts index 8d38f44e..61240dbd 100644 --- a/src/index.ts +++ b/src/index.ts @@ -75,7 +75,7 @@ async function main(argv: string[], env: NodeJS.ProcessEnv): Promise { const sql = new pg.Client(config.database); await sql.connect(); await sql.query('SELECT 1'); // test connectivity - } catch (error) { + } catch (error: any) { console.error( `aurora-relayer: Invalid database configuration: ${error.message}` );