itests: remove dead code from DeployContract
We no longer use the nonce here.
This commit is contained in:
parent
1ea57740aa
commit
a1efd20e81
@ -38,16 +38,9 @@ func (f *TestFullNode) EVM() *EVM {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (e *EVM) DeployContract(ctx context.Context, sender address.Address, bytecode []byte) eam.CreateReturn {
|
func (e *EVM) DeployContract(ctx context.Context, sender address.Address, bytecode []byte) eam.CreateReturn {
|
||||||
|
var err error
|
||||||
require := require.New(e.t)
|
require := require.New(e.t)
|
||||||
|
|
||||||
nonce, err := e.MpoolGetNonce(ctx, sender)
|
|
||||||
if err != nil {
|
|
||||||
nonce = 0 // assume a zero nonce on error (e.g. sender doesn't exist).
|
|
||||||
}
|
|
||||||
|
|
||||||
var salt [32]byte
|
|
||||||
binary.BigEndian.PutUint64(salt[:], nonce)
|
|
||||||
|
|
||||||
method := builtintypes.MethodsEAM.CreateExternal
|
method := builtintypes.MethodsEAM.CreateExternal
|
||||||
initcode := abi.CborBytes(bytecode)
|
initcode := abi.CborBytes(bytecode)
|
||||||
params, err := actors.SerializeParams(&initcode)
|
params, err := actors.SerializeParams(&initcode)
|
||||||
|
Loading…
Reference in New Issue
Block a user