Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add tx cases for convert subnet tx #2218

Merged
merged 1 commit into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cmd/blockchaincmd/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ import (
"encoding/json"
"errors"
"fmt"
"github.com/ava-labs/avalanchego/vms/platformvm/warp/message"
"os"
"path/filepath"
"strings"

"github.com/ava-labs/avalanchego/vms/platformvm/warp/message"

"github.com/ava-labs/avalanche-cli/pkg/utils"
"github.com/ava-labs/avalanchego/utils/formatting/address"
"github.com/ava-labs/avalanchego/vms/platformvm/fx"
Expand Down
2 changes: 2 additions & 0 deletions pkg/txutils/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ func GetAuthSigners(tx *txs.Tx, controlKeys []string) ([]string, error) {
subnetAuth = unsignedTx.SubnetAuth
case *txs.TransferSubnetOwnershipTx:
subnetAuth = unsignedTx.SubnetAuth
case *txs.ConvertSubnetTx:
subnetAuth = unsignedTx.SubnetAuth
default:
return nil, fmt.Errorf("unexpected unsigned tx type %T", unsignedTx)
}
Expand Down
4 changes: 4 additions & 0 deletions pkg/txutils/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ func GetNetwork(tx *txs.Tx) (models.Network, error) {
networkID = unsignedTx.NetworkID
case *txs.TransferSubnetOwnershipTx:
networkID = unsignedTx.NetworkID
case *txs.ConvertSubnetTx:
networkID = unsignedTx.NetworkID
default:
return models.UndefinedNetwork, fmt.Errorf("unexpected unsigned tx type %T", unsignedTx)
}
Expand Down Expand Up @@ -58,6 +60,8 @@ func GetSubnetID(tx *txs.Tx) (ids.ID, error) {
subnetID = unsignedTx.Subnet
case *txs.TransferSubnetOwnershipTx:
subnetID = unsignedTx.Subnet
case *txs.ConvertSubnetTx:
subnetID = unsignedTx.Subnet
default:
return ids.Empty, fmt.Errorf("unexpected unsigned tx type %T", unsignedTx)
}
Expand Down
Loading