Skip to content
This repository was archived by the owner on Aug 2, 2022. It is now read-only.

Resolving actions for eosio.null #1009

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Resolving actions for eosio.null
  • Loading branch information
o-alexandrov committed Aug 12, 2021
commit 6b804e1fd918e79a2481a6b179205737d383ae14
3 changes: 2 additions & 1 deletion src/eosjs-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import {
ReadOnlyTransactResult,
} from './eosjs-rpc-interfaces';
import * as ser from './eosjs-serialize';
import { abiEosioNull } from './static-abi';

export class Api {
/** Issues RPC calls */
Expand Down Expand Up @@ -63,7 +64,7 @@ export class Api {
public contracts = new Map<string, ser.Contract>();

/** Fetched abis */
public cachedAbis = new Map<string, CachedAbi>();
public cachedAbis = new Map<string, CachedAbi>([abiEosioNull]);

/**
* @param args
Expand Down
29 changes: 29 additions & 0 deletions src/static-abi/eosio.null.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import type { CachedAbi } from "../eosjs-api-interfaces";

export const accountName = "eosio.null";
export const value: CachedAbi = {
rawAbi: new Uint8Array(),
abi: {
version: "eosio::abi/1.0",
types: [],
structs: [
{
name: "nonce",
base: "",
fields: [{ name: "value", type: "string" }],
},
],
actions: [
{
name: "nonce",
type: "nonce",
ricardian_contract: "",
},
],
tables: [],
ricardian_clauses: [],
abi_extensions: [],
error_messages: [],
},
};
export const abi = [accountName, value] as const;
1 change: 1 addition & 0 deletions src/static-abi/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { abi as abiEosioNull } from "./eosio.null";