diff --git a/client/transactions.go b/client/transactions.go index 9a72c61..131e20b 100644 --- a/client/transactions.go +++ b/client/transactions.go @@ -159,7 +159,7 @@ func (c *Client) TransactionOutputsFromReferences( func (c *Client) EvaluateTx( txCbor string, AdditionalUtxos ...string, -) ([]models.RedeemerEvaluation, error) { +) (models.EvaluateTxResponse, error) { url := "/transactions/evaluate" body := models.EvaluateTx{ Cbor: txCbor, @@ -176,7 +176,7 @@ func (c *Client) EvaluateTx( return nil, fmt.Errorf("unexpected error: %d", resp.Body) } defer resp.Body.Close() - var redeemerEvals []models.RedeemerEvaluation + var redeemerEvals models.EvaluateTxResponse err = json.NewDecoder(resp.Body).Decode(&redeemerEvals) if err != nil { return nil, err diff --git a/models/transactions.go b/models/transactions.go index d04fc8d..95e4f21 100644 --- a/models/transactions.go +++ b/models/transactions.go @@ -92,8 +92,8 @@ type EvaluateTx struct { } type ExecutionUnits struct { - Mem int64 `json:"Mem"` - Steps int64 `json:"Steps"` + Mem int64 `json:"mem"` + Steps int64 `json:"steps"` } type RedeemerEvaluation struct {