forked from cerc-io/ipld-eth-server
Correctly parse uint8 values in contract watcher
- calling string(uint8) => insert errors on numeric columns
This commit is contained in:
@@ -239,6 +239,24 @@ func SetupMarketPlaceContract(wantedEvents, wantedMethods []string) *contract.Co
|
||||
}.Init()
|
||||
}
|
||||
|
||||
func SetupMolochContract(wantedEvents, wantedMethods []string) *contract.Contract {
|
||||
p := mocks.NewParser(constants.MolochAbiString)
|
||||
err := p.Parse()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
||||
return contract.Contract{
|
||||
Name: "Moloch",
|
||||
Address: constants.MolochContractAddress,
|
||||
StartingBlock: 7218566,
|
||||
Abi: p.Abi(),
|
||||
ParsedAbi: p.ParsedAbi(),
|
||||
Events: p.GetEvents(wantedEvents),
|
||||
Methods: p.GetSelectMethods(wantedMethods),
|
||||
FilterArgs: map[string]bool{},
|
||||
MethodArgs: map[string]bool{},
|
||||
}.Init()
|
||||
}
|
||||
|
||||
// TODO: tear down/setup DB from migrations so this doesn't alter the schema between tests
|
||||
func TearDown(db *postgres.DB) {
|
||||
tx, err := db.Beginx()
|
||||
|
||||
Reference in New Issue
Block a user