forked from cerc-io/ipld-eth-server
Store contract ABI on watched_contracts
This commit is contained in:
@@ -230,7 +230,6 @@ func AssertRepositoryBehavior(buildRepository func() repositories.Repository) {
|
||||
watchedContract := repository.FindWatchedContract("x123")
|
||||
Expect(watchedContract).ToNot(BeNil())
|
||||
Expect(watchedContract.Transactions).To(BeEmpty())
|
||||
|
||||
})
|
||||
|
||||
It("returns transactions 'To' a watched contract", func() {
|
||||
@@ -253,6 +252,16 @@ func AssertRepositoryBehavior(buildRepository func() repositories.Repository) {
|
||||
{Hash: "TRANSACTION3", To: "x123"},
|
||||
}))
|
||||
})
|
||||
|
||||
It("stores the ABI of the contract", func() {
|
||||
repository.CreateWatchedContract(repositories.WatchedContract{
|
||||
Abi: "{\"some\": \"json\"}",
|
||||
Hash: "x123",
|
||||
})
|
||||
watchedContract := repository.FindWatchedContract("x123")
|
||||
Expect(watchedContract).ToNot(BeNil())
|
||||
Expect(watchedContract.Abi).To(Equal("{\"some\": \"json\"}"))
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user