diff options
author | Determinant <[email protected]> | 2020-09-19 01:22:25 -0400 |
---|---|---|
committer | Determinant <[email protected]> | 2020-09-19 01:22:25 -0400 |
commit | 573ff7bbf2a0b529fd3f8acf4aa825e446c73423 (patch) | |
tree | f02eef21d4017d326c91fbc6a6b994374fd4b64d /plugin/evm/tx.go | |
parent | d0bbfb33f16a69ce24e123b01ebb30de8193ddc8 (diff) |
WIP: fix bugs in crosschain transfer and support general assets
Diffstat (limited to 'plugin/evm/tx.go')
-rw-r--r-- | plugin/evm/tx.go | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/plugin/evm/tx.go b/plugin/evm/tx.go index e39a053..9580bc0 100644 --- a/plugin/evm/tx.go +++ b/plugin/evm/tx.go @@ -33,6 +33,13 @@ var ( type EVMOutput struct { Address common.Address `serialize:"true" json:"address"` Amount uint64 `serialize:"true" json:"amount"` + AssetID ids.ID `serialize:"true" json:"assetID"` +} + +type EVMInput struct { + Address common.Address `serialize:"true" json:"address"` + Amount uint64 `serialize:"true" json:"amount"` + AssetID ids.ID `serialize:"true" json:"assetID"` Nonce uint64 `serialize:"true" json:"nonce"` } @@ -40,8 +47,6 @@ func (out *EVMOutput) Verify() error { return nil } -type EVMInput EVMOutput - func (in *EVMInput) Verify() error { return nil } @@ -66,7 +71,7 @@ type UnsignedAtomicTx interface { // Accept this transaction with the additionally provided state transitions. Accept(ctx *snow.Context, batch database.Batch) error - EVMStateTransfer(state *state.StateDB) error + EVMStateTransfer(vm *VM, state *state.StateDB) error } // Tx is a signed transaction |