aboutsummaryrefslogtreecommitdiff
path: root/plugin/evm
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/evm')
-rw-r--r--plugin/evm/import_tx.go2
-rw-r--r--plugin/evm/service.go2
-rw-r--r--plugin/evm/vm.go15
3 files changed, 18 insertions, 1 deletions
diff --git a/plugin/evm/import_tx.go b/plugin/evm/import_tx.go
index 84f28de..ec2ffa4 100644
--- a/plugin/evm/import_tx.go
+++ b/plugin/evm/import_tx.go
@@ -17,6 +17,7 @@ import (
//"github.com/ava-labs/gecko/vms/components/verify"
"github.com/ava-labs/gecko/vms/secp256k1fx"
"github.com/ava-labs/go-ethereum/common"
+ "github.com/ava-labs/go-ethereum/log"
//"github.com/ava-labs/go-ethereum/crypto"
)
@@ -191,6 +192,7 @@ func (vm *VM) newImportTx(
}
tx := &Tx{UnsignedTx: utx}
if err := tx.Sign(vm.codec, signers); err != nil {
+ log.Info("hey here1", "err", err, "utx", utx)
return nil, err
}
return tx, utx.Verify(vm.avm, vm.ctx, vm.txFee, vm.avaxAssetID)
diff --git a/plugin/evm/service.go b/plugin/evm/service.go
index c05b0a4..41cce50 100644
--- a/plugin/evm/service.go
+++ b/plugin/evm/service.go
@@ -21,6 +21,7 @@ import (
"github.com/ava-labs/go-ethereum/common"
"github.com/ava-labs/go-ethereum/common/hexutil"
"github.com/ava-labs/go-ethereum/crypto"
+ "github.com/ava-labs/go-ethereum/log"
)
const (
@@ -253,5 +254,6 @@ func (service *AvaAPI) ImportAVAX(_ *http.Request, args *ImportAVAXArgs, respons
}
response.TxID = tx.ID()
+ log.Info("hey here2")
return service.vm.issueTx(tx)
}
diff --git a/plugin/evm/vm.go b/plugin/evm/vm.go
index b72ac49..7cbfabd 100644
--- a/plugin/evm/vm.go
+++ b/plugin/evm/vm.go
@@ -34,6 +34,7 @@ import (
"github.com/ava-labs/gecko/snow/choices"
"github.com/ava-labs/gecko/snow/consensus/snowman"
"github.com/ava-labs/gecko/utils/codec"
+ "github.com/ava-labs/gecko/vms/secp256k1fx"
//"github.com/ava-labs/gecko/utils/constants"
//"github.com/ava-labs/gecko/utils/formatting"
avajson "github.com/ava-labs/gecko/utils/json"
@@ -98,6 +99,13 @@ func init() {
errs := wrappers.Errs{}
errs.Add(
Codec.RegisterType(&UnsignedImportTx{}),
+ Codec.RegisterType(&secp256k1fx.TransferInput{}),
+ Codec.RegisterType(&secp256k1fx.Input{}),
+ Codec.RegisterType(&secp256k1fx.Credential{}),
+ Codec.RegisterType(&secp256k1fx.TransferOutput{}),
+ Codec.RegisterType(&secp256k1fx.OutputOwners{}),
+ Codec.RegisterType(&secp256k1fx.MintOperation{}),
+ Codec.RegisterType(&secp256k1fx.MintOutput{}),
)
if errs.Errored() {
panic(errs.Err)
@@ -657,6 +665,11 @@ func (vm *VM) GetAtomicUTXOs(
limit int,
) ([]*avax.UTXO, ids.ShortID, ids.ID, error) {
// TODO: finish this function via gRPC
- utxos := []*avax.UTXO{}
+ utxos := []*avax.UTXO{{
+ Asset: avax.Asset{ID: vm.ctx.AVAXAssetID},
+ Out: &secp256k1fx.TransferOutput{
+ Amt: 100,
+ },
+ }}
return utxos, ids.ShortEmpty, ids.Empty, nil
}