Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gwen917 committed Oct 5, 2023
1 parent d9da273 commit c8e2118
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tests/basic_one_way_send.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/ava-labs/awm-relayer/messages/teleporter"
"github.com/ava-labs/subnet-evm/interfaces"
teleportermessenger "github.com/ava-labs/teleporter/abis/TeleporterMessenger"
teleportermessenger "github.com/ava-labs/teleporter/abi-bindings/Teleporter/TeleporterMessenger"
"github.com/ava-labs/teleporter/tests/utils"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/log"
Expand Down Expand Up @@ -49,7 +49,7 @@ func BasicOneWaySend() {
log.Info("Sending Teleporter transaction on source chain", "destinationChainID", subnetBInfo.BlockchainID, "txHash", signedTx.Hash())
receipt := utils.SendTransactionAndWaitForAcceptance(ctx, subnetAInfo.ChainWSClient, signedTx)

bind, err := teleportermessenger.NewTeleportermessenger(teleporterContractAddress, subnetAInfo.ChainWSClient)
bind, err := teleportermessenger.NewTeleporterMessenger(teleporterContractAddress, subnetAInfo.ChainWSClient)
Expect(err).Should(BeNil())
event, err := utils.GetSendEventFromLogs(receipt.Logs, bind)
Expect(err).Should(BeNil())
Expand Down
8 changes: 4 additions & 4 deletions tests/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/ava-labs/avalanchego/ids"
avalancheWarp "github.com/ava-labs/avalanchego/vms/platformvm/warp"
warpBackend "github.com/ava-labs/subnet-evm/warp"
teleportermessenger "github.com/ava-labs/teleporter/abis/TeleporterMessenger"
teleportermessenger "github.com/ava-labs/teleporter/abi-bindings/Teleporter/TeleporterMessenger"

"github.com/ava-labs/awm-relayer/messages/teleporter"
"github.com/ava-labs/subnet-evm/core/types"
Expand Down Expand Up @@ -305,7 +305,7 @@ func RelayMessage(
log.Info("Sending transaction to destination chain")
receipt := SendTransactionAndWaitForAcceptance(ctx, destination.ChainWSClient, signedTx)

bind, err := teleportermessenger.NewTeleportermessenger(teleporterContractAddress, source.ChainWSClient)
bind, err := teleportermessenger.NewTeleporterMessenger(teleporterContractAddress, source.ChainWSClient)
Expect(err).Should(BeNil())
// Check the transaction logs for the ReceiveCrossChainMessage event emitted by the Teleporter contract
event, err := GetReceiveEventFromLogs(receipt.Logs, bind)
Expand All @@ -314,7 +314,7 @@ func RelayMessage(
return nil
}

func GetReceiveEventFromLogs(logs []*types.Log, bind *teleportermessenger.Teleportermessenger) (*teleportermessenger.TeleportermessengerReceiveCrossChainMessage, error) {
func GetReceiveEventFromLogs(logs []*types.Log, bind *teleportermessenger.TeleporterMessenger) (*teleportermessenger.TeleporterMessengerReceiveCrossChainMessage, error) {
for _, log := range logs {
event, err := bind.ParseReceiveCrossChainMessage(*log)
if err == nil {
Expand All @@ -325,7 +325,7 @@ func GetReceiveEventFromLogs(logs []*types.Log, bind *teleportermessenger.Telepo
return nil, fmt.Errorf("failed to find ReceiveCrossChainMessage event in receipt logs")
}

func GetSendEventFromLogs(logs []*types.Log, bind *teleportermessenger.Teleportermessenger) (*teleportermessenger.TeleportermessengerSendCrossChainMessage, error) {
func GetSendEventFromLogs(logs []*types.Log, bind *teleportermessenger.TeleporterMessenger) (*teleportermessenger.TeleporterMessengerSendCrossChainMessage, error) {
for _, log := range logs {
event, err := bind.ParseSendCrossChainMessage(*log)
if err == nil {
Expand Down

0 comments on commit c8e2118

Please sign in to comment.