near / queryapi

Near Indexing as a Service
18 stars 3 forks source link

near-primitives 0.1.0 Action type definitions do not match production data #409

Open gabehamilton opened 11 months ago

gabehamilton commented 11 months ago

Describe the bug near primitives 0.1.0 action definitions define the fields but are missing the key that matches the action type as observed in the production data.

Incorrect

declare class FunctionCall {
    readonly methodName: string;
    readonly args: Uint8Array;
    readonly gas: number;
    readonly deposit: string;
    constructor(methodName: string, args: Uint8Array, gas: number, deposit: string);
}

Correct definition from 0.1.1

export type FunctionCallAction = {
  FunctionCall: {
    methodName: string;
    args: string;
    gas: number;
    deposit: string;
  };
};

Proposed Solution Upgrade both runner and frontend to 1.1 when it is published

To Reproduce See https://github.com/near/queryapi/pull/381/files#diff-de4313f47fa61be86705f264cb2b269e977ff57b825b6c0987fc72ba4f35d8eaR169

gabehamilton commented 6 months ago

Update: Action Operations have the same issue