update go-state-types

use CreateExternal

use CreateExternal in itest evm deployment

add missing import

update gst
This commit is contained in:
vyzo
2023-01-14 01:11:11 -05:00
committed by Aayush
parent cb10108c8e
commit 859cdca4f7
7 changed files with 23 additions and 35 deletions
+7 -9
View File
@@ -675,15 +675,8 @@ func (a *EthModule) ethCallToFilecoinMessage(ctx context.Context, tx ethtypes.Et
// this is a contract creation
to = builtintypes.EthereumAddressManagerActorAddr
nonce, err := a.Mpool.GetNonce(ctx, from, types.EmptyTSK)
if err != nil {
nonce = 0 // assume a zero nonce on error (e.g. sender doesn't exist).
}
params2, err := actors.SerializeParams(&eam.CreateParams{
Initcode: tx.Data,
Nonce: nonce,
})
initcode := abi.CborBytes(tx.Data)
params2, err := actors.SerializeParams(&initcode)
if err != nil {
return nil, fmt.Errorf("failed to serialize Create params: %w", err)
}
@@ -1488,6 +1481,11 @@ func newEthTxFromFilecoinMessage(ctx context.Context, smsg *types.SignedMessage,
var params eam.Create2Params
err = params.UnmarshalCBOR(bytes.NewReader(smsg.Message.Params))
input = params.Initcode
case builtintypes.MethodsEAM.CreateExternal:
toAddr = nil
var params abi.CborBytes
err = params.UnmarshalCBOR(bytes.NewReader(smsg.Message.Params))
input = []byte(params)
}
if err != nil {
return ethtypes.EthTx{}, err