forked from cerc-io/ipld-eth-server
Add FlipKick log events transformer
This commit is contained in:
@@ -20,11 +20,12 @@ import (
|
||||
"github.com/vulcanize/vulcanizedb/examples/constants"
|
||||
"github.com/vulcanize/vulcanizedb/examples/erc20_watcher"
|
||||
"github.com/vulcanize/vulcanizedb/examples/erc20_watcher/every_block"
|
||||
"github.com/vulcanize/vulcanizedb/examples/test_helpers"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/core"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/fakes"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/test_helpers"
|
||||
"github.com/vulcanize/vulcanizedb/examples/erc20_test_helpers"
|
||||
"math/big"
|
||||
"strconv"
|
||||
)
|
||||
@@ -68,11 +69,11 @@ var _ = Describe("Everyblock transformers", func() {
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(tokenSupplyCount).To(Equal(1))
|
||||
|
||||
var tokenSupply test_helpers.TokenSupplyDBRow
|
||||
var tokenSupply erc20_test_helpers.TokenSupplyDBRow
|
||||
err = db.Get(&tokenSupply, `SELECT * from token_supply where block_id = $1`, blockId)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
Expect(tokenSupply.BlockID).To(Equal(blockId))
|
||||
Expect(tokenSupply.TokenAddress).To(Equal(constants.DaiContractAddress))
|
||||
Expect(tokenSupply.Supply).To(Equal(int64(0)))
|
||||
})
|
||||
})
|
||||
})
|
||||
@@ -19,12 +19,13 @@ import (
|
||||
. "github.com/onsi/gomega"
|
||||
|
||||
"github.com/vulcanize/vulcanizedb/examples/erc20_watcher/every_block"
|
||||
"github.com/vulcanize/vulcanizedb/examples/test_helpers"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/core"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/datastore/postgres/repositories"
|
||||
"github.com/vulcanize/vulcanizedb/test_config"
|
||||
"math/rand"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/test_helpers"
|
||||
"github.com/vulcanize/vulcanizedb/examples/erc20_test_helpers"
|
||||
)
|
||||
|
||||
var _ = Describe("ERC20 Token Repository", func() {
|
||||
@@ -52,8 +53,8 @@ var _ = Describe("ERC20 Token Repository", func() {
|
||||
err := repository.Create(supply)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
dbResult := test_helpers.TokenSupplyDBRow{}
|
||||
expectedTokenSupply := test_helpers.TokenSupplyDBRow{
|
||||
dbResult := erc20_test_helpers.TokenSupplyDBRow{}
|
||||
expectedTokenSupply := erc20_test_helpers.TokenSupplyDBRow{
|
||||
Supply: int64(100),
|
||||
BlockID: blockId,
|
||||
TokenAddress: testAddress,
|
||||
@@ -112,7 +113,7 @@ var _ = Describe("ERC20 Token Repository", func() {
|
||||
err := node2TokenSupplyRepo.Create(tokenSupply)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
var tokenSupplies []test_helpers.TokenSupplyDBRow
|
||||
var tokenSupplies []erc20_test_helpers.TokenSupplyDBRow
|
||||
err = node2TokenSupplyRepo.DB.Select(&tokenSupplies, `SELECT * FROM token_supply`)
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
Expect(len(tokenSupplies)).To(Equal(1))
|
||||
|
||||
@@ -20,7 +20,7 @@ import (
|
||||
"github.com/vulcanize/vulcanizedb/examples/constants"
|
||||
"github.com/vulcanize/vulcanizedb/examples/erc20_watcher"
|
||||
"github.com/vulcanize/vulcanizedb/examples/erc20_watcher/every_block"
|
||||
"github.com/vulcanize/vulcanizedb/examples/mocks"
|
||||
"github.com/vulcanize/vulcanizedb/examples/erc20_test_helpers/mocks"
|
||||
"github.com/vulcanize/vulcanizedb/pkg/fakes"
|
||||
"math/big"
|
||||
"math/rand"
|
||||
|
||||
Reference in New Issue
Block a user