diff --git a/chain/dependencies.go b/chain/dependencies.go index ebf9d16967..7aad3fc460 100644 --- a/chain/dependencies.go +++ b/chain/dependencies.go @@ -260,7 +260,7 @@ type Action interface { mu state.Mutable, timestamp int64, actor codec.Address, - txID ids.ID, + actionID codec.Address, ) (success bool, computeUnits uint64, output []byte, err error) } diff --git a/chain/transaction.go b/chain/transaction.go index a113a8aebe..f0b18d75d5 100644 --- a/chain/transaction.go +++ b/chain/transaction.go @@ -322,8 +322,9 @@ func (t *Transaction) Execute( return []*Result{{false, utils.ErrBytes(rerr), maxUnits, maxFee}}, nil } results := make([]*Result, 0) - for _, action := range t.Actions { - success, actionCUs, output, err := action.Execute(ctx, r, ts, timestamp, t.Auth.Actor(), t.id) + for i, action := range t.Actions { + actionID := action.GetActionID(uint8(i), t.id) + success, actionCUs, output, err := action.Execute(ctx, r, ts, timestamp, t.Auth.Actor(), actionID) if err != nil { return handleRevert(err) } diff --git a/examples/morpheusvm/actions/transfer.go b/examples/morpheusvm/actions/transfer.go index f6c94ec5c4..ce90652731 100644 --- a/examples/morpheusvm/actions/transfer.go +++ b/examples/morpheusvm/actions/transfer.go @@ -51,7 +51,7 @@ func (t *Transfer) Execute( mu state.Mutable, _ int64, actor codec.Address, - _ ids.ID, + _ codec.Address, ) (bool, uint64, []byte, error) { if t.Value == 0 { return false, 1, OutputValueZero, nil