Documentation ¶
Index ¶
- Constants
- Variables
- func EncodeCreateContract(tx CreateContractTx) ([]byte, error)
- func OpenDatabase(datadir string, name string, cache int, handles int) (ethdb.Database, error)
- type AppTool
- type CreateContractTx
- type EVMApp
- func (app *EVMApp) CheckTx(bs []byte) error
- func (app *EVMApp) CompatibleWithAngine()
- func (app *EVMApp) ExecuteEVMTx(stateDup *stateDup, header *ethtypes.Header, blockHash ethcmn.Hash, ...) (hash []byte, err error)
- func (app *EVMApp) GetAngineHooks() agtypes.Hooks
- func (app *EVMApp) HandleEvent(eventData civil.EventData, notification *civil.EventNotificationTx)
- func (app *EVMApp) Info() (resInfo agtypes.ResultInfo)
- func (app *EVMApp) OnCommit(height, round def.INT, block *agtypes.BlockCache) (interface{}, error)
- func (app *EVMApp) OnExecute(height, round def.INT, block *agtypes.BlockCache) (interface{}, error)
- func (app *EVMApp) OnNewRound(height, round def.INT, block *agtypes.BlockCache) (interface{}, error)
- func (app *EVMApp) OnPrevote(height, round def.INT, block *agtypes.BlockCache) (interface{}, error)
- func (app *EVMApp) Query(query []byte) agtypes.Result
- func (app *EVMApp) SaveReceipts(stdup *stateDup) []byte
- func (app *EVMApp) SetCore(core civil.Core)
- func (app *EVMApp) Start() (err error)
- func (app *EVMApp) Stop()
- type LastBlockInfo
Constants ¶
View Source
const ( OfficialAddress = "0x7752b42608a0f1943c19fc5802cb027e60b4c911" StateRemoveEmptyObj = true APP_NAME = "evm" DatabaseCache = 128 DatabaseHandles = 1024 )
Variables ¶
View Source
var ( ErrRevertFromBackup = errors.New("revert from backup,not find data") ErrDataTransfer = errors.New("data transfer err") )
View Source
var ( ReceiptsPrefix = []byte("receipts-") ABIPrefix = []byte("solidity-abi-") EVMTag = []byte{'e', 'v', 'm'} EVMTxTag = append(EVMTag, 0x01) EVMCreateContractTxTag = append(EVMTag, 0x02) )
View Source
var ( EmptyTrieRoot = ethcmn.HexToHash("56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421") EthSigner = ethtypes.HomesteadSigner{} IsHomestead = true )
Functions ¶
func EncodeCreateContract ¶
func EncodeCreateContract(tx CreateContractTx) ([]byte, error)
Types ¶
type AppTool ¶
type AppTool struct { agtypes.BaseAppTool // contains filtered or unexported fields }
func (*AppTool) BackupLastBlock ¶
type CreateContractTx ¶
CreateContractTx wraps ethereum tx bytes with the abi json bytes for this contract
func DecodeCreateContract ¶
func DecodeCreateContract(bs []byte) (*CreateContractTx, error)
type EVMApp ¶
type EVMApp struct { agtypes.BaseApplication agtypes.CommApplication civil.EventAppBase Config *viper.Viper AngineHooks agtypes.Hooks // contains filtered or unexported fields }
func (*EVMApp) CompatibleWithAngine ¶
func (app *EVMApp) CompatibleWithAngine()
func (*EVMApp) ExecuteEVMTx ¶
func (app *EVMApp) ExecuteEVMTx(stateDup *stateDup, header *ethtypes.Header, blockHash ethcmn.Hash, tx *ethtypes.Transaction, txIndex int) (hash []byte, err error)
ExecuteEVMTx execute tx one by one in the loop, without lock, so should always be called between Lock() and Unlock() on the *stateDup
func (*EVMApp) GetAngineHooks ¶
func (*EVMApp) HandleEvent ¶
func (app *EVMApp) HandleEvent(eventData civil.EventData, notification *civil.EventNotificationTx)
func (*EVMApp) Info ¶
func (app *EVMApp) Info() (resInfo agtypes.ResultInfo)
func (*EVMApp) OnCommit ¶
OnCommit run in a sync way, we don't need to lock stateDupMtx, but stateMtx is still needed
func (*EVMApp) OnNewRound ¶
func (*EVMApp) SaveReceipts ¶
type LastBlockInfo ¶
Click to show internal directories.
Click to hide internal directories.