This commit is contained in:
Igor Lins e Silva
2020-03-15 18:28:00 -03:00
parent 6bcd185475
commit 1955b8327b
8 changed files with 796 additions and 153 deletions
Binary file not shown.
-23
View File
@@ -1,23 +0,0 @@
const abieos = require('./abieos.node');
interface AbiEosAddon {
string_to_name(name_string: string): BigInteger;
json_to_hex(contract_name: string, type: string, json: string, abi: string): string;
hex_to_json(contract_name: string, type: string, hex: string): string;
bin_to_json(contract_name: string, type: string, buffer: Buffer): string;
load_abi(contract_name: string, abi: string): boolean;
load_abi_hex(contract_name: string, abihex: string): boolean;
get_type_for_action(contract_name: string, action_name: string): string;
get_type_for_table(contract_name: string, table_name: string): string;
delete_contract(contract_name: string): boolean;
}
export const AbiEOS: AbiEosAddon = abieos;
+2 -7
View File
@@ -18,7 +18,6 @@ export function extendResponseSchema(responseProps: any) {
};
for (const p in responseProps) {
if (responseProps.hasOwnProperty(p)) {
console.log(p, responseProps[p]);
props[p] = responseProps[p];
}
}
@@ -67,7 +66,7 @@ export function mergeActionMeta(action) {
delete action['@' + name];
}
action['timestamp'] = action['@timestamp'];
delete action['@timestamp'];
// delete action['@timestamp'];
}
export function mergeDeltaMeta(delta: any) {
@@ -101,11 +100,7 @@ export function addApiRoute(
fastifyInstance: FastifyInstance,
method: HTTPMethod | HTTPMethod[],
routeName: string,
routeBuilder: (fastify: FastifyInstance, route: string) => (
request: FastifyRequest,
reply: FastifyReply<ServerResponse>
) => Promise<void>,
schema: RouteSchema) {
routeBuilder: (fastify: FastifyInstance, route: string) => (request: FastifyRequest, reply: FastifyReply<ServerResponse>) => Promise<void>, schema: RouteSchema) {
fastifyInstance.route({
url: '/' + routeName,
method,
+1 -1
View File
@@ -3,7 +3,7 @@ const {Serialize} = require('../addons/eosjs-native');
// const {Serialize} = require('eosjs');
// abieos addon
const abieos = require('../addons/node-abieos/abieos.node');
const abieos = require('@eosrio/node-abieos');
// original eosjs
// const {Serialize} = require('eosjs');
+1
View File
@@ -52,6 +52,7 @@ interface ApiLimits {
}
interface ApiConfigs {
access_log: boolean;
chain_name: string;
server_port: number;
server_addr: string;
+790 -120
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -11,7 +11,7 @@ const abi_remapping = {
"_Bool": "bool"
};
import {AbiEOS} from "../addons/node-abieos";
import * as AbiEOS from "@eosrio/node-abieos";
import {Serialize} from "../addons/eosjs-native";
import {Type} from "../addons/eosjs-native/eosjs-serialize";
import {hLog} from "../helpers/common_functions";
+1 -1
View File
@@ -1,6 +1,6 @@
import {HyperionWorker} from "./hyperionWorker";
import {cargo, queue} from "async";
import {AbiEOS} from "../addons/node-abieos";
import * as AbiEOS from "@eosrio/node-abieos";
import {Serialize} from "../addons/eosjs-native";
import {hLog} from "../helpers/common_functions";
import {Message} from "amqplib";