Skip to content

Commit

Permalink
clean up utility params
Browse files Browse the repository at this point in the history
  • Loading branch information
cam-schultz committed Apr 10, 2024
1 parent 0bc3d47 commit 49ee09a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
4 changes: 2 additions & 2 deletions tests/flows/erc20_source_native_destination_multihop.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ func ERC20SourceNativeDestinationMultihop(network interfaces.Network) {
ctx,
network,
fundedKey,
recipientKey,
recipientAddress,
subnetAInfo,
nativeTokenDestinationA,
subnetBInfo,
Expand All @@ -225,7 +225,7 @@ func ERC20SourceNativeDestinationMultihop(network interfaces.Network) {
ctx,
network,
fundedKey,
recipientKey,
recipientAddress,
subnetBInfo,
nativeTokenDestinationB,
subnetAInfo,
Expand Down
4 changes: 2 additions & 2 deletions tests/flows/native_source_native_destination_multihop.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ func NativeSourceNativeDestinationMultihop(network interfaces.Network) {
ctx,
network,
fundedKey,
recipientKey,
recipientAddress,
subnetAInfo,
nativeTokenDestinationA,
subnetBInfo,
Expand All @@ -221,7 +221,7 @@ func NativeSourceNativeDestinationMultihop(network interfaces.Network) {
ctx,
network,
fundedKey,
recipientKey,
recipientAddress,
subnetBInfo,
nativeTokenDestinationB,
subnetAInfo,
Expand Down
18 changes: 5 additions & 13 deletions tests/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,8 @@ func SendERC20Destination(
func SendNativeMultihopAndVerify(
ctx context.Context,
network interfaces.Network,
fundedKey *ecdsa.PrivateKey,
recipientKey *ecdsa.PrivateKey,
sendingKey *ecdsa.PrivateKey,
recipientAddress common.Address,
fromSubnet interfaces.SubnetTestInfo,
fromBridge *nativetokendestination.NativeTokenDestination,
toSubnet interfaces.SubnetTestInfo,
Expand All @@ -371,14 +371,6 @@ func SendNativeMultihopAndVerify(
tokenMultiplier *big.Int,
multiplyOnReceive bool,
) {
recipientAddress := crypto.PubkeyToAddress(recipientKey.PublicKey)
teleporterUtils.SendNativeTransfer(
ctx,
fromSubnet,
fundedKey,
recipientAddress,
big.NewInt(1e18),
)
input := nativetokendestination.SendTokensInput{
DestinationBlockchainID: toSubnet.BlockchainID,
DestinationBridgeAddress: toBridgeAddress,
Expand All @@ -397,7 +389,7 @@ func SendNativeMultihopAndVerify(
fromBridge,
input,
bridgedAmount,
recipientKey,
sendingKey,
tokenMultiplier,
multiplyOnReceive,
)
Expand Down Expand Up @@ -436,7 +428,7 @@ func SendERC20MultihopAndVerify(
ctx context.Context,
network interfaces.Network,
fundedKey *ecdsa.PrivateKey,
recipientKey *ecdsa.PrivateKey,
sendingKey *ecdsa.PrivateKey,
recipientAddress common.Address,
fromSubnet interfaces.SubnetTestInfo,
fromBridge *erc20destination.ERC20Destination,
Expand Down Expand Up @@ -471,7 +463,7 @@ func SendERC20MultihopAndVerify(
fromBridgeAddress,
input,
bridgedAmount,
recipientKey,
sendingKey,
)

// Relay the first message back to the home-chain, in this case C-Chain,
Expand Down

0 comments on commit 49ee09a

Please sign in to comment.