mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
remove stub message (#8)
* remove stub message was created just to create the vm.Txontext * update
This commit is contained in:
parent
726c7df365
commit
8064306e4b
1 changed files with 4 additions and 17 deletions
|
|
@ -114,10 +114,11 @@ func BuyGasRip7560Transaction(st *types.Rip7560AccountAbstractionTx, state vm.St
|
|||
}
|
||||
|
||||
func ApplyRip7560ValidationPhases(chainConfig *params.ChainConfig, bc ChainContext, author *common.Address, gp *GasPool, statedb *state.StateDB, header *types.Header, tx *types.Transaction, cfg vm.Config) (*ValidationPhaseResult, error) {
|
||||
stubMsg := prepareStubMessage(tx, chainConfig)
|
||||
blockContext := NewEVMBlockContext(header, bc, author)
|
||||
txContext := NewEVMTxContext(stubMsg)
|
||||
txContext.Origin = *tx.Rip7560TransactionData().Sender
|
||||
txContext := vm.TxContext{
|
||||
Origin: *tx.Rip7560TransactionData().Sender,
|
||||
GasPrice: tx.GasFeeCap(),
|
||||
}
|
||||
evm := vm.NewEVM(blockContext, txContext, statedb, chainConfig, cfg)
|
||||
/*** Deployer Frame ***/
|
||||
deployerMsg := prepareDeployerMessage(tx, chainConfig)
|
||||
|
|
@ -266,20 +267,6 @@ func ApplyRip7560ExecutionPhase(config *params.ChainConfig, vpr *ValidationPhase
|
|||
}
|
||||
return receipt, err
|
||||
}
|
||||
func prepareStubMessage(baseTx *types.Transaction, chainConfig *params.ChainConfig) *Message {
|
||||
tx := baseTx.Rip7560TransactionData()
|
||||
return &Message{
|
||||
From: chainConfig.EntryPointAddress,
|
||||
Value: big.NewInt(0),
|
||||
GasLimit: 100000,
|
||||
GasPrice: tx.GasFeeCap,
|
||||
GasFeeCap: tx.GasFeeCap,
|
||||
GasTipCap: tx.GasTipCap,
|
||||
AccessList: make(types.AccessList, 0),
|
||||
SkipAccountChecks: true,
|
||||
IsRip7560Frame: true,
|
||||
}
|
||||
}
|
||||
|
||||
func prepareDeployerMessage(baseTx *types.Transaction, config *params.ChainConfig) *Message {
|
||||
tx := baseTx.Rip7560TransactionData()
|
||||
|
|
|
|||
Loading…
Reference in a new issue