Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bee35bc8f5
|
||
|
|
93118a8e9f
|
||
|
|
bba5be8964
|
@@ -10,7 +10,7 @@ require (
|
||||
github.com/grassrootseconomics/ethutils v1.3.0
|
||||
github.com/jackc/pgx/v5 v5.7.1
|
||||
github.com/jackc/tern/v2 v2.2.3
|
||||
github.com/kamikazechaser/common v1.0.0
|
||||
github.com/kamikazechaser/common v0.2.0
|
||||
github.com/knadh/goyesql/v2 v2.2.0
|
||||
github.com/knadh/koanf/parsers/toml v0.1.0
|
||||
github.com/knadh/koanf/providers/env v1.0.0
|
||||
|
||||
@@ -115,8 +115,8 @@ github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFr
|
||||
github.com/jackc/tern/v2 v2.2.3 h1:UWD24+m3zP7eRSlX9vYg2tb6Bf0V161IdOuo4YWWyd4=
|
||||
github.com/jackc/tern/v2 v2.2.3/go.mod h1:EStqJVUowhII9OpCTcZISE1BfpGlwE4oq0oQtHAGuuI=
|
||||
github.com/jmoiron/sqlx v1.2.0/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks=
|
||||
github.com/kamikazechaser/common v1.0.0 h1:a/47O/TyQb417CUwsBDI7zlnJEnmhJz9czSPirpjlLg=
|
||||
github.com/kamikazechaser/common v1.0.0/go.mod h1:I1LEc8+W+g/KHZWARc1gMhuSa2STbQgfL4Hao6I/ZwY=
|
||||
github.com/kamikazechaser/common v0.2.0 h1:bqi5UaMTDm/wtZlJEvQDNhsLVJP4Beg+HKWeQ+dhpss=
|
||||
github.com/kamikazechaser/common v0.2.0/go.mod h1:I1LEc8+W+g/KHZWARc1gMhuSa2STbQgfL4Hao6I/ZwY=
|
||||
github.com/klauspost/compress v1.17.2 h1:RlWWUY/Dr4fL8qk9YG7DTZ7PDgME2V4csBXA8L/ixi4=
|
||||
github.com/klauspost/compress v1.17.2/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
|
||||
github.com/knadh/goyesql/v2 v2.2.0 h1:DNQIzgITmMTXA+z+jDzbXCpgr7fGD6Hp0AJ7ZLEAem4=
|
||||
|
||||
@@ -47,7 +47,7 @@ func (h *Handler) AddToken(ctx context.Context, event event.Event) error {
|
||||
|
||||
if err := h.chainProvider.Client.CallCtx(
|
||||
ctx,
|
||||
eth.CallFunc(contractAddress, decimalsGetter).Returns(&tokenDecimals),
|
||||
eth.CallFunc(contractAddress, sinkAddressGetter).Returns(&sinkAddress),
|
||||
); err != nil {
|
||||
// This will most likely revert if the contract does not have a sinkAddress
|
||||
// Instead of handling the error we just ignore it and set the value to 0
|
||||
|
||||
@@ -103,6 +103,7 @@ func (pg *Pg) InsertTokenMint(ctx context.Context, eventPayload event.Event) err
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
pg.logg.Info("InsertTokenMint", "eventPayload", eventPayload)
|
||||
|
||||
_, err = tx.Exec(
|
||||
ctx,
|
||||
|
||||
+1
-1
@@ -122,7 +122,7 @@ INSERT INTO tokens(
|
||||
-- $1: contract_address
|
||||
-- $2: pool_name
|
||||
-- $3: pool_symbol
|
||||
INSERT INTO tokens(
|
||||
INSERT INTO pools(
|
||||
contract_address,
|
||||
pool_name,
|
||||
pool_symbol
|
||||
|
||||
Reference in New Issue
Block a user