2022-03-16 15:32:22 +00:00
|
|
|
package integration_test
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"math/big"
|
|
|
|
|
|
|
|
"github.com/ethereum/go-ethereum/common"
|
|
|
|
"github.com/ethereum/go-ethereum/rpc"
|
|
|
|
sdtypes "github.com/ethereum/go-ethereum/statediff/types"
|
2023-04-14 06:26:46 +00:00
|
|
|
. "github.com/onsi/ginkgo/v2"
|
2022-03-16 15:32:22 +00:00
|
|
|
. "github.com/onsi/gomega"
|
2022-09-21 11:45:03 +00:00
|
|
|
|
2023-05-26 06:12:01 +00:00
|
|
|
integration "github.com/cerc-io/ipld-eth-server/v5/integration"
|
2022-03-16 15:32:22 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
gethMethod = "statediff_watchAddress"
|
|
|
|
ipldMethod = "vdb_watchAddress"
|
|
|
|
)
|
|
|
|
|
|
|
|
var _ = Describe("WatchAddress integration test", func() {
|
|
|
|
var (
|
|
|
|
ctx = context.Background()
|
|
|
|
|
|
|
|
txErr error
|
|
|
|
contractErr error
|
|
|
|
incErr error
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
tx *integration.Tx
|
|
|
|
inc *integration.CountIncremented
|
|
|
|
|
2022-03-16 15:32:22 +00:00
|
|
|
contract1 *integration.ContractDeployed
|
|
|
|
contract2 *integration.ContractDeployed
|
|
|
|
contract3 *integration.ContractDeployed
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
countAIndex common.Hash
|
2022-03-16 15:32:22 +00:00
|
|
|
|
|
|
|
prevBalance1 *big.Int
|
|
|
|
prevBalance2 *big.Int
|
|
|
|
prevBalance3 *big.Int
|
|
|
|
|
|
|
|
actualBalance1 *big.Int
|
|
|
|
actualBalance2 *big.Int
|
|
|
|
actualBalance3 *big.Int
|
|
|
|
|
|
|
|
prevCountA1 *big.Int
|
|
|
|
prevCountA2 *big.Int
|
|
|
|
prevCountA3 *big.Int
|
|
|
|
|
|
|
|
actualCountA1 *big.Int
|
|
|
|
actualCountA2 *big.Int
|
|
|
|
actualCountA3 *big.Int
|
|
|
|
)
|
|
|
|
|
|
|
|
BeforeEach(func() {
|
2023-04-14 06:26:46 +00:00
|
|
|
var err error
|
|
|
|
|
|
|
|
gethRPCClient, err = rpc.Dial(gethHttpPath)
|
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
|
|
|
|
ipldRPCClient, err = rpc.Dial(ipldEthHttpPath)
|
|
|
|
Expect(err).ToNot(HaveOccurred())
|
2022-03-16 15:32:22 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
It("test init", func() {
|
|
|
|
// Deploy three contracts
|
|
|
|
contract1, contractErr = integration.DeploySLVContract()
|
|
|
|
Expect(contractErr).ToNot(HaveOccurred())
|
|
|
|
|
|
|
|
contract2, contractErr = integration.DeploySLVContract()
|
|
|
|
Expect(contractErr).ToNot(HaveOccurred())
|
|
|
|
|
|
|
|
contract3, contractErr = integration.DeploySLVContract()
|
|
|
|
Expect(contractErr).ToNot(HaveOccurred())
|
|
|
|
|
|
|
|
// Get the storage slot key
|
|
|
|
storageSlotAKey, err := integration.GetStorageSlotKey("SLVToken", "countA")
|
|
|
|
Expect(err).ToNot(HaveOccurred())
|
2023-04-14 06:26:46 +00:00
|
|
|
countAIndex = common.HexToHash(storageSlotAKey.Key)
|
2022-03-16 15:32:22 +00:00
|
|
|
|
|
|
|
// Clear out watched addresses
|
|
|
|
err = integration.ClearWatchedAddresses(gethRPCClient)
|
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
|
|
|
|
// Get initial balances for all the contracts
|
|
|
|
// Contract 1
|
|
|
|
actualBalance1 = big.NewInt(0)
|
2023-04-14 06:26:46 +00:00
|
|
|
initBalance1, err := ipldClient.BalanceAt(ctx, contract1.Address, big.NewInt(contract1.BlockNumber))
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
Expect(initBalance1.String()).To(Equal(actualBalance1.String()))
|
|
|
|
prevBalance1 = big.NewInt(0)
|
|
|
|
|
|
|
|
// Contract 2
|
|
|
|
actualBalance2 = big.NewInt(0)
|
2023-04-14 06:26:46 +00:00
|
|
|
initBalance2, err := ipldClient.BalanceAt(ctx, contract2.Address, big.NewInt(contract2.BlockNumber))
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
Expect(initBalance2.String()).To(Equal(actualBalance2.String()))
|
|
|
|
prevBalance2 = big.NewInt(0)
|
|
|
|
|
|
|
|
// Contract 3
|
|
|
|
actualBalance3 = big.NewInt(0)
|
2023-04-14 06:26:46 +00:00
|
|
|
initBalance3, err := ipldClient.BalanceAt(ctx, contract3.Address, big.NewInt(contract3.BlockNumber))
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
Expect(initBalance3.String()).To(Equal(actualBalance3.String()))
|
|
|
|
prevBalance3 = big.NewInt(0)
|
|
|
|
|
|
|
|
// Get initial storage values for the contracts
|
|
|
|
// Contract 1, countA
|
|
|
|
actualCountA1 = big.NewInt(0)
|
2023-04-14 06:26:46 +00:00
|
|
|
ipldCountA1Storage, err := ipldClient.StorageAt(ctx, contract1.Address, countAIndex, big.NewInt(contract1.BlockNumber))
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
ipldCountA1 := new(big.Int).SetBytes(ipldCountA1Storage)
|
|
|
|
Expect(ipldCountA1.String()).To(Equal(actualCountA1.String()))
|
|
|
|
prevCountA1 = big.NewInt(0)
|
|
|
|
|
|
|
|
// Contract 2, countA
|
|
|
|
actualCountA2 = big.NewInt(0)
|
2023-04-14 06:26:46 +00:00
|
|
|
ipldCountA2Storage, err := ipldClient.StorageAt(ctx, contract2.Address, countAIndex, big.NewInt(contract2.BlockNumber))
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
ipldCountA2 := new(big.Int).SetBytes(ipldCountA2Storage)
|
2023-04-14 06:26:46 +00:00
|
|
|
Expect(ipldCountA2.String()).To(Equal("0"))
|
2022-03-16 15:32:22 +00:00
|
|
|
prevCountA2 = big.NewInt(0)
|
|
|
|
|
|
|
|
// Contract 3, countA
|
|
|
|
actualCountA3 = big.NewInt(0)
|
2023-04-14 06:26:46 +00:00
|
|
|
ipldCountA3Storage, err := ipldClient.StorageAt(ctx, contract3.Address, countAIndex, big.NewInt(contract3.BlockNumber))
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
ipldCountA3 := new(big.Int).SetBytes(ipldCountA3Storage)
|
2023-04-14 06:26:46 +00:00
|
|
|
Expect(ipldCountA3.String()).To(Equal("0"))
|
2022-03-16 15:32:22 +00:00
|
|
|
prevCountA3 = big.NewInt(0)
|
|
|
|
})
|
|
|
|
|
|
|
|
defer It("test cleanup", func() {
|
|
|
|
// Clear out watched addresses
|
|
|
|
err := integration.ClearWatchedAddresses(gethRPCClient)
|
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
})
|
|
|
|
|
|
|
|
Context("no contracts being watched", func() {
|
|
|
|
It("indexes state for all the contracts", func() {
|
|
|
|
// WatchedAddresses = []
|
|
|
|
// Send eth to all three contract accounts
|
|
|
|
// Contract 1
|
2023-04-14 06:26:46 +00:00
|
|
|
tx, txErr = integration.SendEth(contract1.Address, "0.01")
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(txErr).ToNot(HaveOccurred())
|
|
|
|
actualBalance1.Add(actualBalance1, big.NewInt(10000000000000000))
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
balance1AfterTransfer, err := ipldClient.BalanceAt(ctx, contract1.Address, big.NewInt(tx.BlockNumber))
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
Expect(balance1AfterTransfer.String()).To(Equal(actualBalance1.String()))
|
|
|
|
prevBalance1.Set(actualBalance1)
|
|
|
|
|
|
|
|
// Contract 2
|
2023-04-14 06:26:46 +00:00
|
|
|
tx, txErr = integration.SendEth(contract2.Address, "0.01")
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(txErr).ToNot(HaveOccurred())
|
|
|
|
actualBalance2.Add(actualBalance2, big.NewInt(10000000000000000))
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
balance2AfterTransfer, err := ipldClient.BalanceAt(ctx, contract2.Address, big.NewInt(tx.BlockNumber))
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
Expect(balance2AfterTransfer.String()).To(Equal(actualBalance2.String()))
|
|
|
|
prevBalance2.Set(actualBalance2)
|
|
|
|
|
|
|
|
// Contract 3
|
2023-04-14 06:26:46 +00:00
|
|
|
tx, txErr = integration.SendEth(contract3.Address, "0.01")
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(txErr).ToNot(HaveOccurred())
|
|
|
|
actualBalance3.Add(actualBalance3, big.NewInt(10000000000000000))
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
balance3AfterTransfer, err := ipldClient.BalanceAt(ctx, contract3.Address, big.NewInt(tx.BlockNumber))
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
Expect(balance3AfterTransfer.String()).To(Equal(actualBalance3.String()))
|
|
|
|
prevBalance3.Set(actualBalance3)
|
|
|
|
|
|
|
|
// Increment counts
|
|
|
|
// Contract 1, countA
|
2023-04-14 06:26:46 +00:00
|
|
|
inc, incErr = integration.IncrementCount("A", contract1.Address)
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(incErr).ToNot(HaveOccurred())
|
|
|
|
actualCountA1.Add(actualCountA1, big.NewInt(1))
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
countA1AfterIncrementStorage, err := ipldClient.StorageAt(ctx, contract1.Address, countAIndex, inc.BlockNumber)
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
countA1AfterIncrement := new(big.Int).SetBytes(countA1AfterIncrementStorage)
|
|
|
|
Expect(countA1AfterIncrement.String()).To(Equal(actualCountA1.String()))
|
|
|
|
prevCountA1.Set(actualCountA1)
|
|
|
|
|
|
|
|
// Contract 2, countA
|
2023-04-14 06:26:46 +00:00
|
|
|
inc, incErr = integration.IncrementCount("A", contract2.Address)
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(incErr).ToNot(HaveOccurred())
|
|
|
|
actualCountA2.Add(actualCountA2, big.NewInt(1))
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
countA2AfterIncrementStorage, err := ipldClient.StorageAt(ctx, contract2.Address, countAIndex, inc.BlockNumber)
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
countA2AfterIncrement := new(big.Int).SetBytes(countA2AfterIncrementStorage)
|
|
|
|
Expect(countA2AfterIncrement.String()).To(Equal(actualCountA2.String()))
|
|
|
|
prevCountA2.Set(actualCountA2)
|
|
|
|
|
|
|
|
// Contract 3, countA
|
2023-04-14 06:26:46 +00:00
|
|
|
inc, incErr = integration.IncrementCount("A", contract3.Address)
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(incErr).ToNot(HaveOccurred())
|
|
|
|
actualCountA3.Add(actualCountA3, big.NewInt(1))
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
countA3AfterIncrementStorage, err := ipldClient.StorageAt(ctx, contract3.Address, countAIndex, inc.BlockNumber)
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
countA3AfterIncrement := new(big.Int).SetBytes(countA3AfterIncrementStorage)
|
|
|
|
Expect(countA3AfterIncrement.String()).To(Equal(actualCountA3.String()))
|
|
|
|
prevCountA3.Set(actualCountA3)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
Context("one contract being watched", func() {
|
|
|
|
It("indexes state only for the watched contract", func() {
|
2022-05-20 13:16:36 +00:00
|
|
|
operation := sdtypes.Add
|
|
|
|
args := []sdtypes.WatchAddressArg{
|
2022-03-16 15:32:22 +00:00
|
|
|
{
|
2023-04-14 06:26:46 +00:00
|
|
|
Address: contract1.Address.String(),
|
2022-03-16 15:32:22 +00:00
|
|
|
CreatedAt: uint64(contract1.BlockNumber),
|
|
|
|
},
|
|
|
|
}
|
|
|
|
ipldErr := ipldRPCClient.Call(nil, ipldMethod, operation, args)
|
|
|
|
Expect(ipldErr).ToNot(HaveOccurred())
|
|
|
|
|
|
|
|
// WatchedAddresses = [Contract1]
|
|
|
|
// Send eth to all three contract accounts
|
|
|
|
// Contract 1
|
2023-04-14 06:26:46 +00:00
|
|
|
tx, txErr = integration.SendEth(contract1.Address, "0.01")
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(txErr).ToNot(HaveOccurred())
|
|
|
|
actualBalance1.Add(actualBalance1, big.NewInt(10000000000000000))
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
balance1AfterTransfer, err := ipldClient.BalanceAt(ctx, contract1.Address, big.NewInt(tx.BlockNumber))
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
Expect(balance1AfterTransfer.String()).To(Equal(actualBalance1.String()))
|
|
|
|
prevBalance1.Set(actualBalance1)
|
|
|
|
|
|
|
|
// Contract 2
|
2023-04-14 06:26:46 +00:00
|
|
|
tx, txErr = integration.SendEth(contract2.Address, "0.01")
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(txErr).ToNot(HaveOccurred())
|
|
|
|
actualBalance2.Add(actualBalance2, big.NewInt(10000000000000000))
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
balance2AfterTransfer, err := ipldClient.BalanceAt(ctx, contract2.Address, big.NewInt(tx.BlockNumber))
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
Expect(balance2AfterTransfer.String()).To(Equal(prevBalance2.String()))
|
|
|
|
|
|
|
|
// Contract 3
|
2023-04-14 06:26:46 +00:00
|
|
|
tx, txErr = integration.SendEth(contract3.Address, "0.01")
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(txErr).ToNot(HaveOccurred())
|
|
|
|
actualBalance3.Add(actualBalance3, big.NewInt(10000000000000000))
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
balance3AfterTransfer, err := ipldClient.BalanceAt(ctx, contract3.Address, big.NewInt(tx.BlockNumber))
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
Expect(balance3AfterTransfer.String()).To(Equal(prevBalance3.String()))
|
|
|
|
|
|
|
|
// Increment counts
|
|
|
|
// Contract 1, countA
|
2023-04-14 06:26:46 +00:00
|
|
|
inc, incErr = integration.IncrementCount("A", contract1.Address)
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(incErr).ToNot(HaveOccurred())
|
|
|
|
actualCountA1.Add(actualCountA1, big.NewInt(1))
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
countA1AfterIncrementStorage, err := ipldClient.StorageAt(ctx, contract1.Address, countAIndex, inc.BlockNumber)
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
countA1AfterIncrement := new(big.Int).SetBytes(countA1AfterIncrementStorage)
|
|
|
|
Expect(countA1AfterIncrement.String()).To(Equal(actualCountA1.String()))
|
|
|
|
prevCountA1.Set(actualCountA1)
|
|
|
|
|
|
|
|
// Contract 2, countA
|
2023-04-14 06:26:46 +00:00
|
|
|
inc, incErr = integration.IncrementCount("A", contract2.Address)
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(incErr).ToNot(HaveOccurred())
|
|
|
|
actualCountA2.Add(actualCountA2, big.NewInt(1))
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
countA2AfterIncrementStorage, err := ipldClient.StorageAt(ctx, contract2.Address, countAIndex, inc.BlockNumber)
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
countA2AfterIncrement := new(big.Int).SetBytes(countA2AfterIncrementStorage)
|
|
|
|
Expect(countA2AfterIncrement.String()).To(Equal(prevCountA2.String()))
|
|
|
|
|
|
|
|
// Contract 3, countA
|
2023-04-14 06:26:46 +00:00
|
|
|
inc, incErr = integration.IncrementCount("A", contract3.Address)
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(incErr).ToNot(HaveOccurred())
|
|
|
|
actualCountA3.Add(actualCountA3, big.NewInt(1))
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
countA3AfterIncrementStorage, err := ipldClient.StorageAt(ctx, contract3.Address, countAIndex, inc.BlockNumber)
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
countA3AfterIncrement := new(big.Int).SetBytes(countA3AfterIncrementStorage)
|
|
|
|
Expect(countA3AfterIncrement.String()).To(Equal(prevCountA3.String()))
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
Context("contract added to a non-empty watch-list", func() {
|
|
|
|
It("indexes state only for the watched contracts", func() {
|
2022-05-20 13:16:36 +00:00
|
|
|
operation := sdtypes.Add
|
|
|
|
args := []sdtypes.WatchAddressArg{
|
2022-03-16 15:32:22 +00:00
|
|
|
{
|
2023-04-14 06:26:46 +00:00
|
|
|
Address: contract2.Address.String(),
|
2022-03-16 15:32:22 +00:00
|
|
|
CreatedAt: uint64(contract2.BlockNumber),
|
|
|
|
},
|
|
|
|
}
|
|
|
|
ipldErr := ipldRPCClient.Call(nil, ipldMethod, operation, args)
|
|
|
|
Expect(ipldErr).ToNot(HaveOccurred())
|
|
|
|
|
|
|
|
// WatchedAddresses = [Contract1, Contract2]
|
|
|
|
// Send eth to all three contract accounts
|
|
|
|
// Contract 1
|
2023-04-14 06:26:46 +00:00
|
|
|
tx, txErr = integration.SendEth(contract1.Address, "0.01")
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(txErr).ToNot(HaveOccurred())
|
|
|
|
actualBalance1.Add(actualBalance1, big.NewInt(10000000000000000))
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
balance1AfterTransfer, err := ipldClient.BalanceAt(ctx, contract1.Address, big.NewInt(tx.BlockNumber))
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
Expect(balance1AfterTransfer.String()).To(Equal(actualBalance1.String()))
|
|
|
|
prevBalance1.Set(actualBalance1)
|
|
|
|
|
|
|
|
// Contract 2
|
2023-04-14 06:26:46 +00:00
|
|
|
tx, txErr = integration.SendEth(contract2.Address, "0.01")
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(txErr).ToNot(HaveOccurred())
|
|
|
|
actualBalance2.Add(actualBalance2, big.NewInt(10000000000000000))
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
balance2AfterTransfer, err := ipldClient.BalanceAt(ctx, contract2.Address, big.NewInt(tx.BlockNumber))
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
Expect(balance2AfterTransfer.String()).To(Equal(actualBalance2.String()))
|
|
|
|
prevBalance2.Set(actualBalance2)
|
|
|
|
|
|
|
|
// Contract 3
|
2023-04-14 06:26:46 +00:00
|
|
|
tx, txErr = integration.SendEth(contract3.Address, "0.01")
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(txErr).ToNot(HaveOccurred())
|
|
|
|
actualBalance3.Add(actualBalance3, big.NewInt(10000000000000000))
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
balance3AfterTransfer, err := ipldClient.BalanceAt(ctx, contract3.Address, big.NewInt(tx.BlockNumber))
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
Expect(balance3AfterTransfer.String()).To(Equal(prevBalance3.String()))
|
|
|
|
|
|
|
|
// Increment counts
|
|
|
|
// Contract 1, countA
|
2023-04-14 06:26:46 +00:00
|
|
|
inc, incErr = integration.IncrementCount("A", contract1.Address)
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(incErr).ToNot(HaveOccurred())
|
|
|
|
actualCountA1.Add(actualCountA1, big.NewInt(1))
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
countA1AfterIncrementStorage, err := ipldClient.StorageAt(ctx, contract1.Address, countAIndex, inc.BlockNumber)
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
countA1AfterIncrement := new(big.Int).SetBytes(countA1AfterIncrementStorage)
|
|
|
|
Expect(countA1AfterIncrement.String()).To(Equal(actualCountA1.String()))
|
|
|
|
prevCountA1.Set(actualCountA1)
|
|
|
|
|
|
|
|
// Contract 2, countA
|
2023-04-14 06:26:46 +00:00
|
|
|
inc, incErr = integration.IncrementCount("A", contract2.Address)
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(incErr).ToNot(HaveOccurred())
|
|
|
|
actualCountA2.Add(actualCountA2, big.NewInt(1))
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
countA2AfterIncrementStorage, err := ipldClient.StorageAt(ctx, contract2.Address, countAIndex, inc.BlockNumber)
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
countA2AfterIncrement := new(big.Int).SetBytes(countA2AfterIncrementStorage)
|
|
|
|
Expect(countA2AfterIncrement.String()).To(Equal(actualCountA2.String()))
|
|
|
|
prevCountA2.Set(actualCountA2)
|
|
|
|
|
|
|
|
// Contract 3, countA
|
2023-04-14 06:26:46 +00:00
|
|
|
inc, incErr = integration.IncrementCount("A", contract3.Address)
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(incErr).ToNot(HaveOccurred())
|
|
|
|
actualCountA3.Add(actualCountA3, big.NewInt(1))
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
countA3AfterIncrementStorage, err := ipldClient.StorageAt(ctx, contract3.Address, countAIndex, inc.BlockNumber)
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
countA3AfterIncrement := new(big.Int).SetBytes(countA3AfterIncrementStorage)
|
|
|
|
Expect(countA3AfterIncrement.String()).To(Equal(prevCountA3.String()))
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
Context("contract removed from the watch-list", func() {
|
|
|
|
It("indexes state only for the watched contract", func() {
|
2022-05-20 13:16:36 +00:00
|
|
|
operation := sdtypes.Remove
|
|
|
|
args := []sdtypes.WatchAddressArg{
|
2022-03-16 15:32:22 +00:00
|
|
|
{
|
2023-04-14 06:26:46 +00:00
|
|
|
Address: contract1.Address.String(),
|
2022-03-16 15:32:22 +00:00
|
|
|
CreatedAt: uint64(contract1.BlockNumber),
|
|
|
|
},
|
|
|
|
}
|
|
|
|
ipldErr := ipldRPCClient.Call(nil, ipldMethod, operation, args)
|
|
|
|
Expect(ipldErr).ToNot(HaveOccurred())
|
|
|
|
|
|
|
|
// WatchedAddresses = [Contract2]
|
|
|
|
// Send eth to all three contract accounts
|
|
|
|
// Contract 1
|
2023-04-14 06:26:46 +00:00
|
|
|
tx, txErr = integration.SendEth(contract1.Address, "0.01")
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(txErr).ToNot(HaveOccurred())
|
|
|
|
actualBalance1.Add(actualBalance1, big.NewInt(10000000000000000))
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
balance1AfterTransfer, err := ipldClient.BalanceAt(ctx, contract1.Address, big.NewInt(tx.BlockNumber))
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
Expect(balance1AfterTransfer.String()).To(Equal(prevBalance1.String()))
|
|
|
|
|
|
|
|
// Contract 2
|
2023-04-14 06:26:46 +00:00
|
|
|
tx, txErr = integration.SendEth(contract2.Address, "0.01")
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(txErr).ToNot(HaveOccurred())
|
|
|
|
actualBalance2.Add(actualBalance2, big.NewInt(10000000000000000))
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
balance2AfterTransfer, err := ipldClient.BalanceAt(ctx, contract2.Address, big.NewInt(tx.BlockNumber))
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
Expect(balance2AfterTransfer.String()).To(Equal(actualBalance2.String()))
|
|
|
|
prevBalance2.Set(actualBalance2)
|
|
|
|
|
|
|
|
// Contract 3
|
2023-04-14 06:26:46 +00:00
|
|
|
tx, txErr = integration.SendEth(contract3.Address, "0.01")
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(txErr).ToNot(HaveOccurred())
|
|
|
|
actualBalance3.Add(actualBalance3, big.NewInt(10000000000000000))
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
balance3AfterTransfer, err := ipldClient.BalanceAt(ctx, contract3.Address, big.NewInt(tx.BlockNumber))
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
Expect(balance3AfterTransfer.String()).To(Equal(prevBalance3.String()))
|
|
|
|
|
|
|
|
// Increment counts
|
|
|
|
// Contract 1, countA
|
2023-04-14 06:26:46 +00:00
|
|
|
inc, incErr = integration.IncrementCount("A", contract1.Address)
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(incErr).ToNot(HaveOccurred())
|
|
|
|
actualCountA1.Add(actualCountA1, big.NewInt(1))
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
countA1AfterIncrementStorage, err := ipldClient.StorageAt(ctx, contract1.Address, countAIndex, inc.BlockNumber)
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
countA1AfterIncrement := new(big.Int).SetBytes(countA1AfterIncrementStorage)
|
|
|
|
Expect(countA1AfterIncrement.String()).To(Equal(prevCountA1.String()))
|
|
|
|
|
|
|
|
// Contract 2, countA
|
2023-04-14 06:26:46 +00:00
|
|
|
inc, incErr = integration.IncrementCount("A", contract2.Address)
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(incErr).ToNot(HaveOccurred())
|
|
|
|
actualCountA2.Add(actualCountA2, big.NewInt(1))
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
countA2AfterIncrementStorage, err := ipldClient.StorageAt(ctx, contract2.Address, countAIndex, inc.BlockNumber)
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
countA2AfterIncrement := new(big.Int).SetBytes(countA2AfterIncrementStorage)
|
|
|
|
Expect(countA2AfterIncrement.String()).To(Equal(actualCountA2.String()))
|
|
|
|
prevCountA2.Set(actualCountA2)
|
|
|
|
|
|
|
|
// Contract 3, countA
|
2023-04-14 06:26:46 +00:00
|
|
|
inc, incErr = integration.IncrementCount("A", contract3.Address)
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(incErr).ToNot(HaveOccurred())
|
|
|
|
actualCountA3.Add(actualCountA3, big.NewInt(1))
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
countA3AfterIncrementStorage, err := ipldClient.StorageAt(ctx, contract3.Address, countAIndex, inc.BlockNumber)
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
countA3AfterIncrement := new(big.Int).SetBytes(countA3AfterIncrementStorage)
|
|
|
|
Expect(countA3AfterIncrement.String()).To(Equal(prevCountA3.String()))
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
Context("list of watched addresses set", func() {
|
|
|
|
It("indexes state only for the watched contracts", func() {
|
2022-05-20 13:16:36 +00:00
|
|
|
operation := sdtypes.Set
|
|
|
|
args := []sdtypes.WatchAddressArg{
|
2022-03-16 15:32:22 +00:00
|
|
|
{
|
2023-04-14 06:26:46 +00:00
|
|
|
Address: contract1.Address.String(),
|
2022-03-16 15:32:22 +00:00
|
|
|
CreatedAt: uint64(contract1.BlockNumber),
|
|
|
|
},
|
|
|
|
{
|
2023-04-14 06:26:46 +00:00
|
|
|
Address: contract3.Address.String(),
|
2022-03-16 15:32:22 +00:00
|
|
|
CreatedAt: uint64(contract3.BlockNumber),
|
|
|
|
},
|
|
|
|
}
|
|
|
|
ipldErr := ipldRPCClient.Call(nil, ipldMethod, operation, args)
|
|
|
|
Expect(ipldErr).ToNot(HaveOccurred())
|
|
|
|
|
|
|
|
// WatchedAddresses = [Contract1, Contract3]
|
|
|
|
// Send eth to all three contract accounts
|
|
|
|
// Contract 1
|
2023-04-14 06:26:46 +00:00
|
|
|
tx, txErr = integration.SendEth(contract1.Address, "0.01")
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(txErr).ToNot(HaveOccurred())
|
|
|
|
actualBalance1.Add(actualBalance1, big.NewInt(10000000000000000))
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
balance1AfterTransfer, err := ipldClient.BalanceAt(ctx, contract1.Address, big.NewInt(tx.BlockNumber))
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
Expect(balance1AfterTransfer.String()).To(Equal(actualBalance1.String()))
|
|
|
|
prevBalance1.Set(actualBalance1)
|
|
|
|
|
|
|
|
// Contract 2
|
2023-04-14 06:26:46 +00:00
|
|
|
tx, txErr = integration.SendEth(contract2.Address, "0.01")
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(txErr).ToNot(HaveOccurred())
|
|
|
|
actualBalance2.Add(actualBalance2, big.NewInt(10000000000000000))
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
balance2AfterTransfer, err := ipldClient.BalanceAt(ctx, contract2.Address, big.NewInt(tx.BlockNumber))
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
Expect(balance2AfterTransfer.String()).To(Equal(prevBalance2.String()))
|
|
|
|
|
|
|
|
// Contract 3
|
2023-04-14 06:26:46 +00:00
|
|
|
tx, txErr = integration.SendEth(contract3.Address, "0.01")
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(txErr).ToNot(HaveOccurred())
|
|
|
|
actualBalance3.Add(actualBalance3, big.NewInt(10000000000000000))
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
balance3AfterTransfer, err := ipldClient.BalanceAt(ctx, contract3.Address, big.NewInt(tx.BlockNumber))
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
Expect(balance3AfterTransfer.String()).To(Equal(actualBalance3.String()))
|
|
|
|
prevBalance3.Set(actualBalance3)
|
|
|
|
|
|
|
|
// Increment counts
|
|
|
|
// Contract 1, countA
|
2023-04-14 06:26:46 +00:00
|
|
|
inc, incErr = integration.IncrementCount("A", contract1.Address)
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(incErr).ToNot(HaveOccurred())
|
|
|
|
actualCountA1.Add(actualCountA1, big.NewInt(1))
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
countA1AfterIncrementStorage, err := ipldClient.StorageAt(ctx, contract1.Address, countAIndex, inc.BlockNumber)
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
countA1AfterIncrement := new(big.Int).SetBytes(countA1AfterIncrementStorage)
|
|
|
|
Expect(countA1AfterIncrement.String()).To(Equal(actualCountA1.String()))
|
|
|
|
prevCountA1.Set(actualCountA1)
|
|
|
|
|
|
|
|
// Contract 2, countA
|
2023-04-14 06:26:46 +00:00
|
|
|
inc, incErr = integration.IncrementCount("A", contract2.Address)
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(incErr).ToNot(HaveOccurred())
|
|
|
|
actualCountA2.Add(actualCountA2, big.NewInt(1))
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
countA2AfterIncrementStorage, err := ipldClient.StorageAt(ctx, contract2.Address, countAIndex, inc.BlockNumber)
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
countA2AfterIncrement := new(big.Int).SetBytes(countA2AfterIncrementStorage)
|
|
|
|
Expect(countA2AfterIncrement.String()).To(Equal(prevCountA2.String()))
|
|
|
|
|
|
|
|
// Contract 3, countA
|
2023-04-14 06:26:46 +00:00
|
|
|
inc, incErr = integration.IncrementCount("A", contract3.Address)
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(incErr).ToNot(HaveOccurred())
|
|
|
|
actualCountA3.Add(actualCountA3, big.NewInt(1))
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
countA3AfterIncrementStorage, err := ipldClient.StorageAt(ctx, contract3.Address, countAIndex, inc.BlockNumber)
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
countA3AfterIncrement := new(big.Int).SetBytes(countA3AfterIncrementStorage)
|
|
|
|
Expect(countA3AfterIncrement.String()).To(Equal(actualCountA3.String()))
|
|
|
|
prevCountA3.Set(actualCountA3)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
Context("list of watched addresses cleared", func() {
|
|
|
|
It("indexes state for all the contracts", func() {
|
2022-05-20 13:16:36 +00:00
|
|
|
operation := sdtypes.Clear
|
|
|
|
args := []sdtypes.WatchAddressArg{}
|
2022-03-16 15:32:22 +00:00
|
|
|
ipldErr := ipldRPCClient.Call(nil, ipldMethod, operation, args)
|
|
|
|
Expect(ipldErr).ToNot(HaveOccurred())
|
|
|
|
|
|
|
|
// WatchedAddresses = []
|
|
|
|
// Send eth to all three contract accounts
|
|
|
|
// Contract 1
|
2023-04-14 06:26:46 +00:00
|
|
|
tx, txErr = integration.SendEth(contract1.Address, "0.01")
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(txErr).ToNot(HaveOccurred())
|
|
|
|
actualBalance1.Add(actualBalance1, big.NewInt(10000000000000000))
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
balance1AfterTransfer, err := ipldClient.BalanceAt(ctx, contract1.Address, big.NewInt(tx.BlockNumber))
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
Expect(balance1AfterTransfer.String()).To(Equal(actualBalance1.String()))
|
|
|
|
prevBalance1.Set(actualBalance1)
|
|
|
|
|
|
|
|
// Contract 2
|
2023-04-14 06:26:46 +00:00
|
|
|
tx, txErr = integration.SendEth(contract2.Address, "0.01")
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(txErr).ToNot(HaveOccurred())
|
|
|
|
actualBalance2.Add(actualBalance2, big.NewInt(10000000000000000))
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
balance2AfterTransfer, err := ipldClient.BalanceAt(ctx, contract2.Address, big.NewInt(tx.BlockNumber))
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
Expect(balance2AfterTransfer.String()).To(Equal(actualBalance2.String()))
|
|
|
|
prevBalance2.Set(actualBalance2)
|
|
|
|
|
|
|
|
// Contract 3
|
2023-04-14 06:26:46 +00:00
|
|
|
tx, txErr = integration.SendEth(contract3.Address, "0.01")
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(txErr).ToNot(HaveOccurred())
|
|
|
|
actualBalance3.Add(actualBalance3, big.NewInt(10000000000000000))
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
balance3AfterTransfer, err := ipldClient.BalanceAt(ctx, contract3.Address, big.NewInt(tx.BlockNumber))
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
Expect(balance3AfterTransfer.String()).To(Equal(actualBalance3.String()))
|
|
|
|
prevBalance3.Set(actualBalance3)
|
|
|
|
|
|
|
|
// Increment counts
|
|
|
|
// Contract 1, countA
|
2023-04-14 06:26:46 +00:00
|
|
|
inc, incErr = integration.IncrementCount("A", contract1.Address)
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(incErr).ToNot(HaveOccurred())
|
|
|
|
actualCountA1.Add(actualCountA1, big.NewInt(1))
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
countA1AfterIncrementStorage, err := ipldClient.StorageAt(ctx, contract1.Address, countAIndex, inc.BlockNumber)
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
countA1AfterIncrement := new(big.Int).SetBytes(countA1AfterIncrementStorage)
|
|
|
|
Expect(countA1AfterIncrement.String()).To(Equal(actualCountA1.String()))
|
|
|
|
prevCountA1.Set(actualCountA1)
|
|
|
|
|
|
|
|
// Contract 2, countA
|
2023-04-14 06:26:46 +00:00
|
|
|
inc, incErr = integration.IncrementCount("A", contract2.Address)
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(incErr).ToNot(HaveOccurred())
|
|
|
|
actualCountA2.Add(actualCountA2, big.NewInt(1))
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
countA2AfterIncrementStorage, err := ipldClient.StorageAt(ctx, contract2.Address, countAIndex, inc.BlockNumber)
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
countA2AfterIncrement := new(big.Int).SetBytes(countA2AfterIncrementStorage)
|
|
|
|
Expect(countA2AfterIncrement.String()).To(Equal(actualCountA2.String()))
|
|
|
|
prevCountA2.Set(actualCountA2)
|
|
|
|
|
|
|
|
// Contract 3, countA
|
2023-04-14 06:26:46 +00:00
|
|
|
inc, incErr = integration.IncrementCount("A", contract3.Address)
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(incErr).ToNot(HaveOccurred())
|
|
|
|
actualCountA3.Add(actualCountA3, big.NewInt(1))
|
|
|
|
|
2023-04-14 06:26:46 +00:00
|
|
|
countA3AfterIncrementStorage, err := ipldClient.StorageAt(ctx, contract3.Address, countAIndex, inc.BlockNumber)
|
2022-03-16 15:32:22 +00:00
|
|
|
Expect(err).ToNot(HaveOccurred())
|
|
|
|
countA3AfterIncrement := new(big.Int).SetBytes(countA3AfterIncrementStorage)
|
|
|
|
Expect(countA3AfterIncrement.String()).To(Equal(actualCountA3.String()))
|
|
|
|
prevCountA3.Set(actualCountA3)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
Context("with invalid args", func() {
|
|
|
|
It("returns an error on invalid operation arg", func() {
|
|
|
|
operation := "WrongOp"
|
|
|
|
args := []sdtypes.WatchAddressArg{}
|
|
|
|
|
|
|
|
gethErr := gethRPCClient.Call(nil, gethMethod, operation, args)
|
|
|
|
Expect(gethErr).To(HaveOccurred())
|
2023-04-14 06:26:46 +00:00
|
|
|
Expect(gethErr.Error()).To(ContainSubstring("unexpected operation"))
|
2022-03-16 15:32:22 +00:00
|
|
|
|
|
|
|
ipldErr := ipldRPCClient.Call(nil, ipldMethod, operation, args)
|
|
|
|
Expect(ipldErr).To(HaveOccurred())
|
2023-04-14 06:26:46 +00:00
|
|
|
Expect(ipldErr.Error()).To(ContainSubstring("unexpected operation"))
|
2022-03-16 15:32:22 +00:00
|
|
|
|
|
|
|
Expect(ipldErr).To(Equal(gethErr))
|
|
|
|
})
|
|
|
|
|
|
|
|
It("returns an error on args of invalid type", func() {
|
2022-05-20 13:16:36 +00:00
|
|
|
operation := sdtypes.Add
|
2022-03-16 15:32:22 +00:00
|
|
|
args := []string{"WrongArg"}
|
|
|
|
|
|
|
|
gethErr := gethRPCClient.Call(nil, gethMethod, operation, args)
|
|
|
|
Expect(gethErr).To(HaveOccurred())
|
2023-04-14 06:26:46 +00:00
|
|
|
Expect(gethErr.Error()).To(ContainSubstring("WatchAddressArg"))
|
2022-03-16 15:32:22 +00:00
|
|
|
|
|
|
|
ipldErr := ipldRPCClient.Call(nil, ipldMethod, operation, args)
|
|
|
|
Expect(ipldErr).To(HaveOccurred())
|
2023-04-14 06:26:46 +00:00
|
|
|
Expect(ipldErr.Error()).To(ContainSubstring("WatchAddressArg"))
|
2022-03-16 15:32:22 +00:00
|
|
|
|
|
|
|
Expect(ipldErr).To(Equal(gethErr))
|
|
|
|
})
|
|
|
|
})
|
|
|
|
})
|