mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
remove stub message
was created just to create the vm.Txontext
This commit is contained in:
parent
45ec501b4b
commit
9b4728116b
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) {
|
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)
|
blockContext := NewEVMBlockContext(header, bc, author)
|
||||||
txContext := NewEVMTxContext(stubMsg)
|
txContext := vm.TxContext{
|
||||||
txContext.Origin = *tx.Rip7560TransactionData().Sender
|
Origin: *tx.Rip7560TransactionData().Sender,
|
||||||
|
GasPrice: tx.GasFeeCap(),
|
||||||
|
}
|
||||||
evm := vm.NewEVM(blockContext, txContext, statedb, chainConfig, cfg)
|
evm := vm.NewEVM(blockContext, txContext, statedb, chainConfig, cfg)
|
||||||
/*** Deployer Frame ***/
|
/*** Deployer Frame ***/
|
||||||
deployerMsg := prepareDeployerMessage(tx, chainConfig)
|
deployerMsg := prepareDeployerMessage(tx, chainConfig)
|
||||||
|
|
@ -266,20 +267,6 @@ func ApplyRip7560ExecutionPhase(config *params.ChainConfig, vpr *ValidationPhase
|
||||||
}
|
}
|
||||||
return receipt, err
|
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 {
|
func prepareDeployerMessage(baseTx *types.Transaction, config *params.ChainConfig) *Message {
|
||||||
tx := baseTx.Rip7560TransactionData()
|
tx := baseTx.Rip7560TransactionData()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue