aboutsummaryrefslogblamecommitdiff
path: root/plugin/evm/import_tx.go
blob: 17360679d89d4c5dc1133a6ead8db5b063c2ac4d (plain) (tree)
1
2
3
4
5
6
7
8
9
10





                                                     
             


                                               
 






                                                             
                                                
                                             

 

                                           




                                                                              
                                 
                                                                  

                                                                

                                                                                         

                                                          










                                                       
                                         





                                   




                                                                               


                                           
                                      

                                         



                                                  

         



                                                    






                                                   
                                                                         


                                               




                                            



                                           
                                                                                                

                                     


                                   
                                                

                                     
                                                   








                                                             










































                                                                                       







                                                                            






                                                                               



                           
                                               
                                                  
                                                                        
                
                                             


                                           
                                       
                                  
                           

         
                                                                                                           



                                                                                  
                                                     
                                                     
 
                                                 

                                          



                                                                      
                                                            


                                

                                                                                          


                                       
                                                                                





                                                      
                                                                       
                                                                
 
                                    


                                                                          
                             


                                                                                       
                                                                                
                                      












                                                                  

                                              

                                        
                  



                                 


                                                 
                                               
                                        
         

                                                          

                               
                                                                                    
 
 
                                                                                  
                                    






                                                                                       
                 
         
                  
 
// (c) 2019-2020, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.

package evm

import (
	"fmt"
	"math/big"

	"github.com/ava-labs/coreth/core/state"

	"github.com/ava-labs/avalanchego/database"
	"github.com/ava-labs/avalanchego/ids"
	"github.com/ava-labs/avalanchego/snow"
	"github.com/ava-labs/avalanchego/utils/crypto"
	"github.com/ava-labs/avalanchego/utils/math"
	"github.com/ava-labs/avalanchego/vms/components/avax"
	"github.com/ava-labs/avalanchego/vms/secp256k1fx"
	"github.com/ethereum/go-ethereum/common"
	"github.com/ethereum/go-ethereum/log"
)

// UnsignedImportTx is an unsigned ImportTx
type UnsignedImportTx struct {
	avax.Metadata
	// true iff this transaction has already passed syntactic verification
	syntacticallyVerified bool
	// ID of the network on which this tx was issued
	NetworkID uint32 `serialize:"true" json:"networkID"`
	// ID of this blockchain.
	BlockchainID ids.ID `serialize:"true" json:"blockchainID"`
	// Which chain to consume the funds from
	SourceChain ids.ID `serialize:"true" json:"sourceChain"`
	// Inputs that consume UTXOs produced on the chain
	ImportedInputs []*avax