refactor: move brother_node development artifact to dev/test-nodes subdirectory
Development Artifact Cleanup: ✅ BROTHER_NODE REORGANIZATION: Moved development test node to appropriate location - dev/test-nodes/brother_node/: Moved from root directory for better organization - Contains development configuration, test logs, and test chain data - No impact on production systems - purely development/testing artifact ✅ DEVELOPMENT ARTIFACTS IDENTIFIED: - Chain ID: aitbc-brother-chain (test/development chain) - Ports: 8010 (P2P) and 8011 (RPC) - different from production - Environment: .env file with test configuration - Logs: rpc.log and node.log from development testing session (March 15, 2026) ✅ ROOT DIRECTORY CLEANUP: Removed development clutter from production directory - brother_node/ moved to dev/test-nodes/brother_node/ - Root directory now contains only production-ready components - Development artifacts properly organized in dev/ subdirectory DIRECTORY STRUCTURE IMPROVEMENT: 📁 dev/test-nodes/: Development and testing node configurations 🏗️ Root Directory: Clean production structure with only essential components 🧪 Development Isolation: Test environments separated from production BENEFITS: ✅ Clean Production Directory: No development artifacts in root ✅ Better Organization: Development nodes grouped in dev/ subdirectory ✅ Clear Separation: Production vs development environments clearly distinguished ✅ Maintainability: Easier to identify and manage development components RESULT: Successfully moved brother_node development artifact to dev/test-nodes/ subdirectory, cleaning up the root directory while preserving development testing environment for future use.
This commit is contained in:
5
dev/env/node_modules/micro-eth-signer/abi/common.d.ts
generated
vendored
Executable file
5
dev/env/node_modules/micro-eth-signer/abi/common.d.ts
generated
vendored
Executable file
@@ -0,0 +1,5 @@
|
||||
import type { ContractABI, HintFn, HookFn } from './decoder.ts';
|
||||
export declare function addHint<T extends ContractABI>(abi: ContractABI, name: string, fn: HintFn): T;
|
||||
export declare function addHints<T extends ContractABI>(abi: T, map: Record<string, HintFn>): T;
|
||||
export declare function addHook<T extends ContractABI>(abi: T, name: string, fn: HookFn): T;
|
||||
//# sourceMappingURL=common.d.ts.map
|
||||
1
dev/env/node_modules/micro-eth-signer/abi/common.d.ts.map
generated
vendored
Executable file
1
dev/env/node_modules/micro-eth-signer/abi/common.d.ts.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/abi/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEhE,wBAAgB,OAAO,CAAC,CAAC,SAAS,WAAW,EAAE,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,CAAC,CAO5F;AAED,wBAAgB,QAAQ,CAAC,CAAC,SAAS,WAAW,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAQtF;AAED,wBAAgB,OAAO,CAAC,CAAC,SAAS,WAAW,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,CAAC,CAOlF"}
|
||||
37
dev/env/node_modules/micro-eth-signer/abi/common.js
generated
vendored
Executable file
37
dev/env/node_modules/micro-eth-signer/abi/common.js
generated
vendored
Executable file
@@ -0,0 +1,37 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.addHint = addHint;
|
||||
exports.addHints = addHints;
|
||||
exports.addHook = addHook;
|
||||
function addHint(abi, name, fn) {
|
||||
const res = [];
|
||||
for (const elm of abi) {
|
||||
if (elm.name === name)
|
||||
res.push({ ...elm, hint: fn });
|
||||
else
|
||||
res.push(elm);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
function addHints(abi, map) {
|
||||
const res = [];
|
||||
for (const elm of abi) {
|
||||
if (['event', 'function'].includes(elm.type) && elm.name && map[elm.name]) {
|
||||
res.push({ ...elm, hint: map[elm.name] });
|
||||
}
|
||||
else
|
||||
res.push(elm);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
function addHook(abi, name, fn) {
|
||||
const res = [];
|
||||
for (const elm of abi) {
|
||||
if (elm.type === 'function' && elm.name === name)
|
||||
res.push({ ...elm, hook: fn });
|
||||
else
|
||||
res.push(elm);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
//# sourceMappingURL=common.js.map
|
||||
1
dev/env/node_modules/micro-eth-signer/abi/common.js.map
generated
vendored
Executable file
1
dev/env/node_modules/micro-eth-signer/abi/common.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"common.js","sourceRoot":"","sources":["../src/abi/common.ts"],"names":[],"mappings":";;AAEA,0BAOC;AAED,4BAQC;AAED,0BAOC;AA1BD,SAAgB,OAAO,CAAwB,GAAgB,EAAE,IAAY,EAAE,EAAU;IACvF,MAAM,GAAG,GAAG,EAAE,CAAC;IACf,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;QACtB,IAAI,GAAG,CAAC,IAAI,KAAK,IAAI;YAAE,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;;YACjD,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACrB,CAAC;IACD,OAAO,GAAmB,CAAC;AAC7B,CAAC;AAED,SAAgB,QAAQ,CAAwB,GAAM,EAAE,GAA2B;IACjF,MAAM,GAAG,GAAG,EAAE,CAAC;IACf,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;QACtB,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1E,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,EAAE,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC,IAAK,CAAC,EAAE,CAAC,CAAC;QAC7C,CAAC;;YAAM,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACvB,CAAC;IACD,OAAO,GAAmB,CAAC;AAC7B,CAAC;AAED,SAAgB,OAAO,CAAwB,GAAM,EAAE,IAAY,EAAE,EAAU;IAC7E,MAAM,GAAG,GAAG,EAAE,CAAC;IACf,KAAK,MAAM,GAAG,IAAI,GAAG,EAAE,CAAC;QACtB,IAAI,GAAG,CAAC,IAAI,KAAK,UAAU,IAAI,GAAG,CAAC,IAAI,KAAK,IAAI;YAAE,GAAG,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;;YAC5E,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACrB,CAAC;IACD,OAAO,GAAmB,CAAC;AAC7B,CAAC"}
|
||||
167
dev/env/node_modules/micro-eth-signer/abi/decoder.d.ts
generated
vendored
Executable file
167
dev/env/node_modules/micro-eth-signer/abi/decoder.d.ts
generated
vendored
Executable file
@@ -0,0 +1,167 @@
|
||||
import * as P from 'micro-packed';
|
||||
import { type IWeb3Provider } from '../utils.ts';
|
||||
type Writable<T> = T extends {} ? {
|
||||
-readonly [P in keyof T]: Writable<T[P]>;
|
||||
} : T;
|
||||
type ArrLike<T> = Array<T> | ReadonlyArray<T>;
|
||||
export type IsEmptyArray<T> = T extends ReadonlyArray<any> ? (T['length'] extends 0 ? true : false) : true;
|
||||
export type Component<T extends string> = {
|
||||
readonly name?: string;
|
||||
readonly type: T;
|
||||
};
|
||||
export type NamedComponent<T extends string> = Component<T> & {
|
||||
readonly name: string;
|
||||
};
|
||||
export type BaseComponent = Component<string>;
|
||||
export type Tuple<TC extends ArrLike<Component<string>>> = {
|
||||
readonly name?: string;
|
||||
readonly type: 'tuple';
|
||||
readonly components: TC;
|
||||
};
|
||||
type IntIdxType = '' | '8' | '16' | '24' | '32' | '40' | '48' | '56' | '64' | '72' | '80' | '88' | '96' | '104' | '112' | '120' | '128' | '136' | '144' | '152' | '160' | '168' | '176' | '184' | '192' | '200' | '208' | '216' | '224' | '232' | '240' | '248' | '256';
|
||||
type UintType = `uint${IntIdxType}`;
|
||||
type IntType = `int${IntIdxType}`;
|
||||
type NumberType = UintType | IntType;
|
||||
type ByteIdxType = '' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12' | '13' | '14' | '15' | '16' | '17' | '18' | '19' | '20' | '21' | '22' | '23' | '24' | '25' | '26' | '27' | '28' | '29' | '30' | '31' | '32';
|
||||
type ByteType = `bytes${ByteIdxType}`;
|
||||
export type MapTuple<T> = T extends ArrLike<Component<string> & {
|
||||
name: string;
|
||||
}> ? {
|
||||
[K in T[number] as K['name']]: MapType<K>;
|
||||
} : T extends ArrLike<Component<string>> ? {
|
||||
[K in keyof T]: T[K] extends BaseComponent ? MapType<T[K]> : unknown;
|
||||
} : unknown;
|
||||
export type GetType<T extends string> = T extends `${infer Base}[]${infer Rest}` ? GetType<`${Base}${Rest}`>[] : T extends `${infer Base}[${number}]${infer Rest}` ? GetType<`${Base}${Rest}`>[] : T extends 'address' ? string : T extends 'string' ? string : T extends 'bool' ? boolean : T extends NumberType ? bigint : T extends ByteType ? Uint8Array : unknown;
|
||||
export type MapType<T extends BaseComponent> = T extends Tuple<Array<Component<string>>> ? MapTuple<T['components']> : T extends Component<infer Type> ? GetType<Type> : unknown;
|
||||
export type UnmapType<T> = T extends MapType<infer U> ? U : never;
|
||||
export declare function mapComponent<T extends BaseComponent>(c: T): P.CoderType<MapType<Writable<T>>>;
|
||||
export type ArgsType<T extends ReadonlyArray<any> | undefined> = IsEmptyArray<T> extends true ? undefined : T extends ReadonlyArray<any> ? T['length'] extends 1 ? MapType<T[0]> : MapTuple<T> : MapTuple<T>;
|
||||
export declare function mapArgs<T extends ArrLike<Component<string>>>(args: T): P.CoderType<ArgsType<Writable<T>>>;
|
||||
export type FunctionType = Component<'function'> & {
|
||||
readonly inputs?: ReadonlyArray<Component<string>>;
|
||||
readonly outputs?: ReadonlyArray<Component<string>>;
|
||||
};
|
||||
type ContractMethodDecode<T extends FunctionType, O = ArgsType<T['outputs']>> = IsEmptyArray<T['outputs']> extends true ? {
|
||||
decodeOutput: (b: Uint8Array) => void;
|
||||
} : {
|
||||
decodeOutput: (b: Uint8Array) => O;
|
||||
};
|
||||
type ContractMethodEncode<T extends FunctionType, I = ArgsType<T['inputs']>> = IsEmptyArray<T['inputs']> extends true ? {
|
||||
encodeInput: () => Uint8Array;
|
||||
} : {
|
||||
encodeInput: (v: I) => Uint8Array;
|
||||
};
|
||||
type ContractMethodGas<T extends FunctionType, I = ArgsType<T['inputs']>> = IsEmptyArray<T['inputs']> extends true ? {
|
||||
estimateGas: () => Promise<bigint>;
|
||||
} : {
|
||||
estimateGas: (v: I) => Promise<bigint>;
|
||||
};
|
||||
type ContractMethodCall<T extends FunctionType, I = ArgsType<T['inputs']>, O = ArgsType<T['outputs']>> = IsEmptyArray<T['inputs']> extends true ? IsEmptyArray<T['outputs']> extends true ? {
|
||||
call: () => Promise<void>;
|
||||
} : {
|
||||
call: () => Promise<O>;
|
||||
} : IsEmptyArray<T['outputs']> extends true ? {
|
||||
call: (v: I) => Promise<void>;
|
||||
} : {
|
||||
call: (v: I) => Promise<O>;
|
||||
};
|
||||
export type ContractMethod<T extends FunctionType> = ContractMethodEncode<T> & ContractMethodDecode<T>;
|
||||
export type ContractMethodNet<T extends FunctionType> = ContractMethod<T> & ContractMethodGas<T> & ContractMethodCall<T>;
|
||||
export type FnArg = {
|
||||
readonly type: string;
|
||||
readonly name?: string;
|
||||
readonly components?: ArrLike<FnArg>;
|
||||
readonly inputs?: ArrLike<FnArg>;
|
||||
readonly outputs?: ArrLike<FnArg>;
|
||||
readonly anonymous?: boolean;
|
||||
readonly indexed?: boolean;
|
||||
};
|
||||
export type ContractTypeFilter<T> = {
|
||||
[K in keyof T]: T[K] extends FunctionType & {
|
||||
name: string;
|
||||
} ? T[K] : never;
|
||||
};
|
||||
export type ContractType<T extends Array<FnArg>, N, F = ContractTypeFilter<T>> = F extends ArrLike<FunctionType & {
|
||||
name: string;
|
||||
}> ? {
|
||||
[K in F[number] as K['name']]: N extends IWeb3Provider ? ContractMethodNet<K> : ContractMethod<K>;
|
||||
} : never;
|
||||
export declare function evSigHash(o: FnArg): string;
|
||||
export declare function fnSigHash(o: FnArg): string;
|
||||
export declare function createContract<T extends ArrLike<FnArg>>(abi: T, net: IWeb3Provider, contract?: string): ContractType<Writable<T>, IWeb3Provider>;
|
||||
export declare function createContract<T extends ArrLike<FnArg>>(abi: T, net?: undefined, contract?: string): ContractType<Writable<T>, undefined>;
|
||||
type GetCons<T extends ArrLike<FnArg>> = Extract<T[number], {
|
||||
type: 'constructor';
|
||||
}>;
|
||||
type ConstructorType = Component<'constructor'> & {
|
||||
readonly inputs?: ReadonlyArray<Component<string>>;
|
||||
};
|
||||
type ConsArgs<T extends ConstructorType> = IsEmptyArray<T['inputs']> extends true ? undefined : ArgsType<T['inputs']>;
|
||||
export declare function deployContract<T extends ArrLike<FnArg>>(abi: T, bytecodeHex: string, ...args: GetCons<T> extends never ? [args: unknown] : ConsArgs<GetCons<T>> extends undefined ? [] : [args: ConsArgs<GetCons<T>>]): string;
|
||||
export type EventType = NamedComponent<'event'> & {
|
||||
readonly inputs: ReadonlyArray<Component<string>>;
|
||||
};
|
||||
export type ContractEventTypeFilter<T> = {
|
||||
[K in keyof T]: T[K] extends EventType ? T[K] : never;
|
||||
};
|
||||
export type TopicsValue<T> = {
|
||||
[K in keyof T]: T[K] | null;
|
||||
};
|
||||
export type EventMethod<T extends EventType> = {
|
||||
decode: (topics: string[], data: string) => ArgsType<T['inputs']>;
|
||||
topics: (values: TopicsValue<ArgsType<T['inputs']>>) => (string | null)[];
|
||||
};
|
||||
export type ContractEventType<T extends Array<FnArg>, F = ContractEventTypeFilter<T>> = F extends ArrLike<EventType> ? {
|
||||
[K in F[number] as K['name']]: EventMethod<K>;
|
||||
} : never;
|
||||
export declare function events<T extends ArrLike<FnArg>>(abi: T): ContractEventType<Writable<T>>;
|
||||
export type ContractABI = ReadonlyArray<FnArg & {
|
||||
readonly hint?: HintFn;
|
||||
readonly hook?: HookFn;
|
||||
}>;
|
||||
export type ContractInfo = {
|
||||
abi: 'ERC20' | 'ERC721' | 'ERC1155' | ContractABI;
|
||||
symbol?: string;
|
||||
decimals?: number;
|
||||
name?: string;
|
||||
price?: number;
|
||||
};
|
||||
export type HintOpt = {
|
||||
contract?: string;
|
||||
amount?: bigint;
|
||||
contractInfo?: ContractInfo;
|
||||
contracts?: Record<string, ContractInfo>;
|
||||
};
|
||||
export type HintFn = (value: unknown, opt: HintOpt) => string;
|
||||
export type HookFn = (decoder: Decoder, contract: string, info: SignatureInfo, opt: HintOpt) => SignatureInfo;
|
||||
type SignaturePacker = {
|
||||
name: string;
|
||||
signature: string;
|
||||
packer: P.CoderType<unknown>;
|
||||
hint?: HintFn;
|
||||
hook?: HookFn;
|
||||
};
|
||||
type EventSignatureDecoder = {
|
||||
name: string;
|
||||
signature: string;
|
||||
decoder: (topics: string[], _data: string) => unknown;
|
||||
hint?: HintFn;
|
||||
};
|
||||
export type SignatureInfo = {
|
||||
name: string;
|
||||
signature: string;
|
||||
value: unknown;
|
||||
hint?: string;
|
||||
};
|
||||
export declare class Decoder {
|
||||
contracts: Record<string, Record<string, SignaturePacker>>;
|
||||
sighashes: Record<string, SignaturePacker[]>;
|
||||
evContracts: Record<string, Record<string, EventSignatureDecoder>>;
|
||||
evSighashes: Record<string, EventSignatureDecoder[]>;
|
||||
add(contract: string, abi: ContractABI): void;
|
||||
method(contract: string, data: Uint8Array): string | undefined;
|
||||
decode(contract: string, _data: Uint8Array, opt: HintOpt): SignatureInfo | SignatureInfo[] | undefined;
|
||||
decodeEvent(contract: string, topics: string[], data: string, opt: HintOpt): SignatureInfo | SignatureInfo[] | undefined;
|
||||
}
|
||||
export {};
|
||||
//# sourceMappingURL=decoder.d.ts.map
|
||||
1
dev/env/node_modules/micro-eth-signer/abi/decoder.d.ts.map
generated
vendored
Executable file
1
dev/env/node_modules/micro-eth-signer/abi/decoder.d.ts.map
generated
vendored
Executable file
File diff suppressed because one or more lines are too long
447
dev/env/node_modules/micro-eth-signer/abi/decoder.js
generated
vendored
Executable file
447
dev/env/node_modules/micro-eth-signer/abi/decoder.js
generated
vendored
Executable file
@@ -0,0 +1,447 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.Decoder = void 0;
|
||||
exports.mapComponent = mapComponent;
|
||||
exports.mapArgs = mapArgs;
|
||||
exports.evSigHash = evSigHash;
|
||||
exports.fnSigHash = fnSigHash;
|
||||
exports.createContract = createContract;
|
||||
exports.deployContract = deployContract;
|
||||
exports.events = events;
|
||||
const sha3_1 = require("@noble/hashes/sha3");
|
||||
const utils_1 = require("@noble/hashes/utils");
|
||||
const P = require("micro-packed");
|
||||
const utils_ts_1 = require("../utils.js");
|
||||
/*
|
||||
There is NO network code in the file. However, a user can pass
|
||||
NetProvider instance to createContract, and the method would do
|
||||
network requests with the api.
|
||||
|
||||
There is some really crazy stuff going on here with Typescript types.
|
||||
*/
|
||||
function EPad(p) {
|
||||
return P.padLeft(32, p, P.ZeroPad);
|
||||
}
|
||||
// Main difference between regular array: length stored outside and offsets calculated without length
|
||||
function ethArray(inner) {
|
||||
return P.wrap({
|
||||
size: undefined,
|
||||
encodeStream: (w, value) => {
|
||||
U256BE_LEN.encodeStream(w, value.length);
|
||||
w.bytes(P.array(value.length, inner).encode(value));
|
||||
},
|
||||
decodeStream: (r) => P.array(U256BE_LEN.decodeStream(r), inner).decodeStream(r.offsetReader(r.pos)),
|
||||
});
|
||||
}
|
||||
const PTR = EPad(P.U32BE);
|
||||
const ARRAY_RE = /(.+)(\[(\d+)?\])$/; // TODO: is this correct?
|
||||
// Because u32 in eth is not real u32, just U256BE with limits...
|
||||
const ethInt = (bits, signed = false) => {
|
||||
if (!Number.isSafeInteger(bits) || bits <= 0 || bits % 8 !== 0 || bits > 256)
|
||||
throw new Error('ethInt: invalid numeric type');
|
||||
const _bits = BigInt(bits);
|
||||
const inner = P.bigint(32, false, signed);
|
||||
return P.validate(P.wrap({
|
||||
size: inner.size,
|
||||
encodeStream: (w, value) => inner.encodeStream(w, value),
|
||||
decodeStream: (r) => inner.decodeStream(r),
|
||||
}), (value) => {
|
||||
// TODO: validate useful for narrowing types, need to add support in types?
|
||||
if (typeof value === 'number')
|
||||
value = BigInt(value);
|
||||
P.utils.checkBounds(value, _bits, !!signed);
|
||||
return value;
|
||||
});
|
||||
};
|
||||
// Ugly hack, because tuple of pointers considered "dynamic" without any reason.
|
||||
function isDyn(args) {
|
||||
let res = false;
|
||||
if (Array.isArray(args)) {
|
||||
for (let arg of args)
|
||||
if (arg.size === undefined)
|
||||
res = true;
|
||||
}
|
||||
else {
|
||||
for (let arg in args)
|
||||
if (args[arg].size === undefined)
|
||||
res = true;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
// Re-use ptr for len. u32 should be enough.
|
||||
const U256BE_LEN = PTR;
|
||||
// NOTE: we need as const if we want to access string as values inside types :(
|
||||
function mapComponent(c) {
|
||||
// Arrays (should be first one, since recursive)
|
||||
let m;
|
||||
if ((m = ARRAY_RE.exec(c.type))) {
|
||||
const inner = mapComponent({ ...c, type: m[1] });
|
||||
if (inner.size === 0)
|
||||
throw new Error('mapComponent: arrays of zero-size elements disabled (possible DoS attack)');
|
||||
// Static array
|
||||
if (m[3] !== undefined) {
|
||||
const m3 = Number.parseInt(m[3]);
|
||||
if (!Number.isSafeInteger(m3))
|
||||
throw new Error(`mapComponent: wrong array size=${m[3]}`);
|
||||
let out = P.array(m3, inner);
|
||||
// Static array of dynamic values should be behind pointer too, again without reason.
|
||||
if (inner.size === undefined)
|
||||
out = P.pointer(PTR, out);
|
||||
return out;
|
||||
}
|
||||
else {
|
||||
// Dynamic array
|
||||
return P.pointer(PTR, ethArray(inner));
|
||||
}
|
||||
}
|
||||
if (c.type === 'tuple') {
|
||||
const components = c.components;
|
||||
let hasNames = true;
|
||||
const args = [];
|
||||
for (let comp of components) {
|
||||
if (!comp.name)
|
||||
hasNames = false;
|
||||
args.push(mapComponent(comp));
|
||||
}
|
||||
let out;
|
||||
// If there is names for all fields -- return struct, otherwise tuple
|
||||
if (hasNames) {
|
||||
const struct = {};
|
||||
for (const arg of components) {
|
||||
if (struct[arg.name])
|
||||
throw new Error(`mapType: same field name=${arg.name}`);
|
||||
struct[arg.name] = mapComponent(arg);
|
||||
}
|
||||
out = P.struct(struct);
|
||||
}
|
||||
else
|
||||
out = P.tuple(args);
|
||||
// If tuple has dynamic elements it becomes dynamic too, without reason.
|
||||
if (isDyn(args))
|
||||
out = P.pointer(PTR, out);
|
||||
return out;
|
||||
}
|
||||
if (c.type === 'string')
|
||||
return P.pointer(PTR, P.padRight(32, P.string(U256BE_LEN), P.ZeroPad));
|
||||
if (c.type === 'bytes')
|
||||
return P.pointer(PTR, P.padRight(32, P.bytes(U256BE_LEN), P.ZeroPad));
|
||||
if (c.type === 'address')
|
||||
return EPad(P.hex(20, { isLE: false, with0x: true }));
|
||||
if (c.type === 'bool')
|
||||
return EPad(P.bool);
|
||||
if ((m = /^(u?)int([0-9]+)?$/.exec(c.type)))
|
||||
return ethInt(m[2] ? +m[2] : 256, m[1] !== 'u');
|
||||
if ((m = /^bytes([0-9]{1,2})$/.exec(c.type))) {
|
||||
const parsed = +m[1];
|
||||
if (!parsed || parsed > 32)
|
||||
throw new Error('wrong bytes<N> type');
|
||||
return P.padRight(32, P.bytes(parsed), P.ZeroPad);
|
||||
}
|
||||
throw new Error(`mapComponent: unknown component=${c}`);
|
||||
}
|
||||
// Because args and output are not tuple
|
||||
// TODO: try merge with mapComponent
|
||||
function mapArgs(args) {
|
||||
// More ergonomic input/output
|
||||
if (args.length === 1)
|
||||
return mapComponent(args[0]);
|
||||
let hasNames = true;
|
||||
for (const arg of args)
|
||||
if (!arg.name)
|
||||
hasNames = false;
|
||||
if (hasNames) {
|
||||
const out = {};
|
||||
for (const arg of args) {
|
||||
const name = arg.name;
|
||||
if (out[name])
|
||||
throw new Error(`mapArgs: same field name=${name}`);
|
||||
out[name] = mapComponent(arg);
|
||||
}
|
||||
return P.struct(out);
|
||||
}
|
||||
else
|
||||
return P.tuple(args.map(mapComponent));
|
||||
}
|
||||
function fnSignature(o) {
|
||||
if (!o.type)
|
||||
throw new Error('ABI.fnSignature wrong argument');
|
||||
if (o.type === 'function' || o.type === 'event')
|
||||
return `${o.name || 'function'}(${(o.inputs || []).map((i) => fnSignature(i)).join(',')})`;
|
||||
if (o.type.startsWith('tuple')) {
|
||||
if (!o.components || !o.components.length)
|
||||
throw new Error('ABI.fnSignature wrong tuple');
|
||||
return `(${o.components.map((i) => fnSignature(i)).join(',')})${o.type.slice(5)}`;
|
||||
}
|
||||
return o.type;
|
||||
}
|
||||
// Function signature hash
|
||||
function evSigHash(o) {
|
||||
return (0, utils_1.bytesToHex)((0, sha3_1.keccak_256)(fnSignature(o)));
|
||||
}
|
||||
function fnSigHash(o) {
|
||||
return evSigHash(o).slice(0, 8);
|
||||
}
|
||||
function createContract(abi, net, contract) {
|
||||
// Find non-uniq function names so we can handle overloads
|
||||
let nameCnt = {};
|
||||
for (let fn of abi) {
|
||||
if (fn.type !== 'function')
|
||||
continue;
|
||||
const name = fn.name || 'function';
|
||||
if (!nameCnt[name])
|
||||
nameCnt[name] = 1;
|
||||
else
|
||||
nameCnt[name]++;
|
||||
}
|
||||
const res = {};
|
||||
for (let fn of abi) {
|
||||
if (fn.type !== 'function')
|
||||
continue;
|
||||
let name = fn.name || 'function';
|
||||
if (nameCnt[name] > 1)
|
||||
name = fnSignature(fn);
|
||||
const sh = fnSigHash(fn);
|
||||
const inputs = fn.inputs && fn.inputs.length ? mapArgs(fn.inputs) : undefined;
|
||||
const outputs = fn.outputs ? mapArgs(fn.outputs) : undefined;
|
||||
const decodeOutput = (b) => outputs && outputs.decode(b);
|
||||
const encodeInput = (v) => (0, utils_1.concatBytes)((0, utils_1.hexToBytes)(sh), inputs ? inputs.encode(v) : new Uint8Array());
|
||||
res[name] = { decodeOutput, encodeInput };
|
||||
// .call and .estimateGas call network, when net is available
|
||||
if (!net)
|
||||
continue;
|
||||
res[name].call = async (args, overrides = {}) => {
|
||||
if (!contract && !overrides.to)
|
||||
throw new Error('No contract address');
|
||||
const data = (0, utils_ts_1.add0x)((0, utils_1.bytesToHex)(encodeInput(args)));
|
||||
const callArgs = Object.assign({ to: contract, data }, overrides);
|
||||
return decodeOutput((0, utils_1.hexToBytes)((0, utils_ts_1.strip0x)(await net.ethCall(callArgs))));
|
||||
};
|
||||
res[name].estimateGas = async (args, overrides = {}) => {
|
||||
if (!contract && !overrides.to)
|
||||
throw new Error('No contract address');
|
||||
const data = (0, utils_ts_1.add0x)((0, utils_1.bytesToHex)(encodeInput(args)));
|
||||
const callArgs = Object.assign({ to: contract, data }, overrides);
|
||||
return await net.estimateGas(callArgs);
|
||||
};
|
||||
}
|
||||
return res;
|
||||
}
|
||||
function deployContract(abi, bytecodeHex, ...args) {
|
||||
const bytecode = utils_ts_1.ethHex.decode(bytecodeHex);
|
||||
let consCall;
|
||||
for (let fn of abi) {
|
||||
if (fn.type !== 'constructor')
|
||||
continue;
|
||||
const inputs = fn.inputs && fn.inputs.length ? mapArgs(fn.inputs) : undefined;
|
||||
if (inputs === undefined && args !== undefined && args.length)
|
||||
throw new Error('arguments to constructor without any');
|
||||
consCall = inputs ? inputs.encode(args[0]) : new Uint8Array();
|
||||
}
|
||||
if (!consCall)
|
||||
throw new Error('constructor not found');
|
||||
return utils_ts_1.ethHex.encode((0, utils_1.concatBytes)(bytecode, consCall));
|
||||
}
|
||||
// TODO: try to simplify further
|
||||
function events(abi) {
|
||||
let res = {};
|
||||
for (let elm of abi) {
|
||||
// Only named events supported
|
||||
if (elm.type !== 'event' || !elm.name)
|
||||
continue;
|
||||
const inputs = elm.inputs || [];
|
||||
let hasNames = true;
|
||||
for (let i of inputs)
|
||||
if (!i.name)
|
||||
hasNames = false;
|
||||
const plainInp = inputs.filter((i) => !i.indexed);
|
||||
const indexedInp = inputs.filter((i) => i.indexed);
|
||||
const indexed = indexedInp.map((i) => !['string', 'bytes', 'tuple'].includes(i.type) && !ARRAY_RE.exec(i.type)
|
||||
? mapArgs([i])
|
||||
: null);
|
||||
const parser = mapArgs(hasNames ? plainInp : plainInp.map((i) => (0, utils_ts_1.omit)(i, 'name')));
|
||||
const sigHash = evSigHash(elm);
|
||||
res[elm.name] = {
|
||||
decode(topics, _data) {
|
||||
const data = (0, utils_1.hexToBytes)((0, utils_ts_1.strip0x)(_data));
|
||||
if (!elm.anonymous) {
|
||||
if (!topics[0])
|
||||
throw new Error('No signature on non-anonymous event');
|
||||
if ((0, utils_ts_1.strip0x)(topics[0]).toLowerCase() !== sigHash)
|
||||
throw new Error('Wrong signature');
|
||||
topics = topics.slice(1);
|
||||
}
|
||||
if (topics.length !== indexed.length)
|
||||
throw new Error('Wrong topics length');
|
||||
let parsed = parser ? parser.decode(data) : hasNames ? {} : [];
|
||||
const indexedParsed = indexed.map((p, i) => p ? p.decode((0, utils_1.hexToBytes)((0, utils_ts_1.strip0x)(topics[i]))) : topics[i]);
|
||||
if (plainInp.length === 1)
|
||||
parsed = hasNames ? { [plainInp[0].name]: parsed } : [parsed];
|
||||
if (hasNames) {
|
||||
let res = { ...parsed };
|
||||
for (let [a, p] of (0, utils_ts_1.zip)(indexedInp, indexedParsed))
|
||||
res[a.name] = p;
|
||||
return res;
|
||||
}
|
||||
else
|
||||
return inputs.map((i) => (!i.indexed ? parsed : indexedParsed).shift());
|
||||
},
|
||||
topics(values) {
|
||||
let res = [];
|
||||
if (!elm.anonymous)
|
||||
res.push((0, utils_ts_1.add0x)(sigHash));
|
||||
// We require all keys to be set, even if they are null, to be sure nothing is accidentaly missed
|
||||
if ((hasNames ? Object.keys(values) : values).length !== inputs.length)
|
||||
throw new Error('Wrong topics args');
|
||||
for (let i = 0, ii = 0; i < inputs.length && ii < indexed.length; i++) {
|
||||
const [input, packer] = [inputs[i], indexed[ii]];
|
||||
if (!input.indexed)
|
||||
continue;
|
||||
const value = values[Array.isArray(values) ? i : inputs[i].name];
|
||||
if (value === null) {
|
||||
res.push(null);
|
||||
continue;
|
||||
}
|
||||
let topic;
|
||||
if (packer)
|
||||
topic = (0, utils_1.bytesToHex)(packer.encode(value));
|
||||
else if (['string', 'bytes'].includes(input.type))
|
||||
topic = (0, utils_1.bytesToHex)((0, sha3_1.keccak_256)(value));
|
||||
else {
|
||||
let m, parts;
|
||||
if ((m = ARRAY_RE.exec(input.type)))
|
||||
parts = value.map((j) => mapComponent({ type: m[1] }).encode(j));
|
||||
else if (input.type === 'tuple' && input.components)
|
||||
parts = input.components.map((j) => mapArgs([j]).encode(value[j.name]));
|
||||
else
|
||||
throw new Error('Unknown unsized type');
|
||||
topic = (0, utils_1.bytesToHex)((0, sha3_1.keccak_256)((0, utils_1.concatBytes)(...parts)));
|
||||
}
|
||||
res.push((0, utils_ts_1.add0x)(topic));
|
||||
ii++;
|
||||
}
|
||||
return res;
|
||||
},
|
||||
};
|
||||
}
|
||||
return res;
|
||||
}
|
||||
class Decoder {
|
||||
constructor() {
|
||||
this.contracts = {};
|
||||
this.sighashes = {};
|
||||
this.evContracts = {};
|
||||
this.evSighashes = {};
|
||||
}
|
||||
add(contract, abi) {
|
||||
const ev = events(abi);
|
||||
contract = (0, utils_ts_1.strip0x)(contract).toLowerCase();
|
||||
if (!this.contracts[contract])
|
||||
this.contracts[contract] = {};
|
||||
if (!this.evContracts[contract])
|
||||
this.evContracts[contract] = {};
|
||||
for (let fn of abi) {
|
||||
if (fn.type === 'function') {
|
||||
const selector = fnSigHash(fn);
|
||||
const value = {
|
||||
name: fn.name || 'function',
|
||||
signature: fnSignature(fn),
|
||||
packer: fn.inputs && fn.inputs.length ? mapArgs(fn.inputs) : undefined,
|
||||
hint: fn.hint,
|
||||
hook: fn.hook,
|
||||
};
|
||||
this.contracts[contract][selector] = value;
|
||||
if (!this.sighashes[selector])
|
||||
this.sighashes[selector] = [];
|
||||
this.sighashes[selector].push(value);
|
||||
}
|
||||
else if (fn.type === 'event') {
|
||||
if (fn.anonymous || !fn.name)
|
||||
continue;
|
||||
const selector = evSigHash(fn);
|
||||
const value = {
|
||||
name: fn.name,
|
||||
signature: fnSignature(fn),
|
||||
decoder: ev[fn.name]?.decode,
|
||||
hint: fn.hint,
|
||||
};
|
||||
this.evContracts[contract][selector] = value;
|
||||
if (!this.evSighashes[selector])
|
||||
this.evSighashes[selector] = [];
|
||||
this.evSighashes[selector].push(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
method(contract, data) {
|
||||
contract = (0, utils_ts_1.strip0x)(contract).toLowerCase();
|
||||
const sh = (0, utils_1.bytesToHex)(data.slice(0, 4));
|
||||
if (!this.contracts[contract] || !this.contracts[contract][sh])
|
||||
return;
|
||||
const { name } = this.contracts[contract][sh];
|
||||
return name;
|
||||
}
|
||||
// Returns: exact match, possible options of matches (array) or undefined.
|
||||
// Note that empty value possible if there is no arguments in call.
|
||||
decode(contract, _data, opt) {
|
||||
contract = (0, utils_ts_1.strip0x)(contract).toLowerCase();
|
||||
const sh = (0, utils_1.bytesToHex)(_data.slice(0, 4));
|
||||
const data = _data.slice(4);
|
||||
if (this.contracts[contract] && this.contracts[contract][sh]) {
|
||||
let { name, signature, packer, hint, hook } = this.contracts[contract][sh];
|
||||
const value = packer ? packer.decode(data) : undefined;
|
||||
let res = { name, signature, value };
|
||||
// NOTE: hint && hook fn is used only on exact match of contract!
|
||||
if (hook)
|
||||
res = hook(this, contract, res, opt);
|
||||
try {
|
||||
if (hint)
|
||||
res.hint = hint(value, Object.assign({ contract: (0, utils_ts_1.add0x)(contract) }, opt));
|
||||
}
|
||||
catch (e) { }
|
||||
return res;
|
||||
}
|
||||
if (!this.sighashes[sh] || !this.sighashes[sh].length)
|
||||
return;
|
||||
let res = [];
|
||||
for (let { name, signature, packer } of this.sighashes[sh]) {
|
||||
try {
|
||||
res.push({ name, signature, value: packer ? packer.decode(data) : undefined });
|
||||
}
|
||||
catch (err) { }
|
||||
}
|
||||
if (res.length)
|
||||
return res;
|
||||
return;
|
||||
}
|
||||
decodeEvent(contract, topics, data, opt) {
|
||||
contract = (0, utils_ts_1.strip0x)(contract).toLowerCase();
|
||||
if (!topics.length)
|
||||
return;
|
||||
const sh = (0, utils_ts_1.strip0x)(topics[0]);
|
||||
const event = this.evContracts[contract];
|
||||
if (event && event[sh]) {
|
||||
let { name, signature, decoder, hint } = event[sh];
|
||||
const value = decoder(topics, data);
|
||||
let res = { name, signature, value };
|
||||
try {
|
||||
if (hint)
|
||||
res.hint = hint(value, Object.assign({ contract: (0, utils_ts_1.add0x)(contract) }, opt));
|
||||
}
|
||||
catch (e) { }
|
||||
return res;
|
||||
}
|
||||
if (!this.evSighashes[sh] || !this.evSighashes[sh].length)
|
||||
return;
|
||||
let res = [];
|
||||
for (let { name, signature, decoder } of this.evSighashes[sh]) {
|
||||
try {
|
||||
res.push({ name, signature, value: decoder(topics, data) });
|
||||
}
|
||||
catch (err) { }
|
||||
}
|
||||
if (res.length)
|
||||
return res;
|
||||
return;
|
||||
}
|
||||
}
|
||||
exports.Decoder = Decoder;
|
||||
//# sourceMappingURL=decoder.js.map
|
||||
1
dev/env/node_modules/micro-eth-signer/abi/decoder.js.map
generated
vendored
Executable file
1
dev/env/node_modules/micro-eth-signer/abi/decoder.js.map
generated
vendored
Executable file
File diff suppressed because one or more lines are too long
189
dev/env/node_modules/micro-eth-signer/abi/erc1155.d.ts
generated
vendored
Executable file
189
dev/env/node_modules/micro-eth-signer/abi/erc1155.d.ts
generated
vendored
Executable file
@@ -0,0 +1,189 @@
|
||||
declare const ABI: readonly [{
|
||||
readonly name: "ApprovalForAll";
|
||||
readonly type: "event";
|
||||
readonly inputs: readonly [{
|
||||
readonly indexed: true;
|
||||
readonly name: "account";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly indexed: true;
|
||||
readonly name: "operator";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly indexed: false;
|
||||
readonly name: "approved";
|
||||
readonly type: "bool";
|
||||
}];
|
||||
}, {
|
||||
readonly name: "TransferBatch";
|
||||
readonly type: "event";
|
||||
readonly inputs: readonly [{
|
||||
readonly indexed: true;
|
||||
readonly name: "operator";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly indexed: true;
|
||||
readonly name: "from";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly indexed: true;
|
||||
readonly name: "to";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly indexed: false;
|
||||
readonly name: "ids";
|
||||
readonly type: "uint256[]";
|
||||
}, {
|
||||
readonly indexed: false;
|
||||
readonly name: "values";
|
||||
readonly type: "uint256[]";
|
||||
}];
|
||||
}, {
|
||||
readonly name: "TransferSingle";
|
||||
readonly type: "event";
|
||||
readonly inputs: readonly [{
|
||||
readonly indexed: true;
|
||||
readonly name: "operator";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly indexed: true;
|
||||
readonly name: "from";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly indexed: true;
|
||||
readonly name: "to";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly indexed: false;
|
||||
readonly name: "id";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly indexed: false;
|
||||
readonly name: "value";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
}, {
|
||||
readonly name: "URI";
|
||||
readonly type: "event";
|
||||
readonly inputs: readonly [{
|
||||
readonly indexed: false;
|
||||
readonly name: "value";
|
||||
readonly type: "string";
|
||||
}, {
|
||||
readonly indexed: true;
|
||||
readonly name: "id";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
}, {
|
||||
readonly name: "balanceOf";
|
||||
readonly type: "function";
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "account";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "id";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly outputs: readonly [{
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
}, {
|
||||
readonly name: "balanceOfBatch";
|
||||
readonly type: "function";
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "accounts";
|
||||
readonly type: "address[]";
|
||||
}, {
|
||||
readonly name: "ids";
|
||||
readonly type: "uint256[]";
|
||||
}];
|
||||
readonly outputs: readonly [{
|
||||
readonly type: "uint256[]";
|
||||
}];
|
||||
}, {
|
||||
readonly name: "isApprovedForAll";
|
||||
readonly type: "function";
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "account";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "operator";
|
||||
readonly type: "address";
|
||||
}];
|
||||
readonly outputs: readonly [{
|
||||
readonly type: "bool";
|
||||
}];
|
||||
}, {
|
||||
readonly name: "safeBatchTransferFrom";
|
||||
readonly type: "function";
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "from";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "to";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "ids";
|
||||
readonly type: "uint256[]";
|
||||
}, {
|
||||
readonly name: "amounts";
|
||||
readonly type: "uint256[]";
|
||||
}, {
|
||||
readonly name: "data";
|
||||
readonly type: "bytes";
|
||||
}];
|
||||
readonly outputs: readonly [];
|
||||
}, {
|
||||
readonly name: "safeTransferFrom";
|
||||
readonly type: "function";
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "from";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "to";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "id";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly name: "amount";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly name: "data";
|
||||
readonly type: "bytes";
|
||||
}];
|
||||
readonly outputs: readonly [];
|
||||
}, {
|
||||
readonly name: "setApprovalForAll";
|
||||
readonly type: "function";
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "operator";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "approved";
|
||||
readonly type: "bool";
|
||||
}];
|
||||
readonly outputs: readonly [];
|
||||
}, {
|
||||
readonly name: "supportsInterface";
|
||||
readonly type: "function";
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "interfaceId";
|
||||
readonly type: "bytes4";
|
||||
}];
|
||||
readonly outputs: readonly [{
|
||||
readonly type: "bool";
|
||||
}];
|
||||
}, {
|
||||
readonly name: "uri";
|
||||
readonly type: "function";
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "id";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly outputs: readonly [{
|
||||
readonly type: "string";
|
||||
}];
|
||||
}];
|
||||
export default ABI;
|
||||
//# sourceMappingURL=erc1155.d.ts.map
|
||||
1
dev/env/node_modules/micro-eth-signer/abi/erc1155.d.ts.map
generated
vendored
Executable file
1
dev/env/node_modules/micro-eth-signer/abi/erc1155.d.ts.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"erc1155.d.ts","sourceRoot":"","sources":["../src/abi/erc1155.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEC,CAAC;AAEX,eAAe,GAAG,CAAC"}
|
||||
9
dev/env/node_modules/micro-eth-signer/abi/erc1155.js
generated
vendored
Executable file
9
dev/env/node_modules/micro-eth-signer/abi/erc1155.js
generated
vendored
Executable file
@@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
// Multi Token Standard https://eips.ethereum.org/EIPS/eip-1155
|
||||
// prettier-ignore
|
||||
const ABI = [
|
||||
{ name: 'ApprovalForAll', type: 'event', inputs: [{ indexed: true, name: 'account', type: 'address' }, { indexed: true, name: 'operator', type: 'address' }, { indexed: false, name: 'approved', type: 'bool' },], }, { name: 'TransferBatch', type: 'event', inputs: [{ indexed: true, name: 'operator', type: 'address' }, { indexed: true, name: 'from', type: 'address' }, { indexed: true, name: 'to', type: 'address' }, { indexed: false, name: 'ids', type: 'uint256[]' }, { indexed: false, name: 'values', type: 'uint256[]' },], }, { name: 'TransferSingle', type: 'event', inputs: [{ indexed: true, name: 'operator', type: 'address' }, { indexed: true, name: 'from', type: 'address' }, { indexed: true, name: 'to', type: 'address' }, { indexed: false, name: 'id', type: 'uint256' }, { indexed: false, name: 'value', type: 'uint256' },], }, { name: 'URI', type: 'event', inputs: [{ indexed: false, name: 'value', type: 'string' }, { indexed: true, name: 'id', type: 'uint256' },], }, { name: 'balanceOf', type: 'function', inputs: [{ name: 'account', type: 'address' }, { name: 'id', type: 'uint256' },], outputs: [{ type: 'uint256' }], }, { name: 'balanceOfBatch', type: 'function', inputs: [{ name: 'accounts', type: 'address[]' }, { name: 'ids', type: 'uint256[]' },], outputs: [{ type: 'uint256[]' }], }, { name: 'isApprovedForAll', type: 'function', inputs: [{ name: 'account', type: 'address' }, { name: 'operator', type: 'address' },], outputs: [{ type: 'bool' }], }, { name: 'safeBatchTransferFrom', type: 'function', inputs: [{ name: 'from', type: 'address' }, { name: 'to', type: 'address' }, { name: 'ids', type: 'uint256[]' }, { name: 'amounts', type: 'uint256[]' }, { name: 'data', type: 'bytes' },], outputs: [], }, { name: 'safeTransferFrom', type: 'function', inputs: [{ name: 'from', type: 'address' }, { name: 'to', type: 'address' }, { name: 'id', type: 'uint256' }, { name: 'amount', type: 'uint256' }, { name: 'data', type: 'bytes' },], outputs: [], }, { name: 'setApprovalForAll', type: 'function', inputs: [{ name: 'operator', type: 'address' }, { name: 'approved', type: 'bool' },], outputs: [], }, { name: 'supportsInterface', type: 'function', inputs: [{ name: 'interfaceId', type: 'bytes4' }], outputs: [{ type: 'bool' }], }, { name: 'uri', type: 'function', inputs: [{ name: 'id', type: 'uint256' }], outputs: [{ type: 'string' }] }
|
||||
];
|
||||
exports.default = ABI;
|
||||
//# sourceMappingURL=erc1155.js.map
|
||||
1
dev/env/node_modules/micro-eth-signer/abi/erc1155.js.map
generated
vendored
Executable file
1
dev/env/node_modules/micro-eth-signer/abi/erc1155.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"erc1155.js","sourceRoot":"","sources":["../src/abi/erc1155.ts"],"names":[],"mappings":";;AAAA,+DAA+D;AAC/D,kBAAkB;AAClB,MAAM,GAAG,GAAG;IACV,EAAC,IAAI,EAAC,gBAAgB,EAAC,IAAI,EAAC,OAAO,EAAC,MAAM,EAAC,CAAC,EAAC,OAAO,EAAC,IAAI,EAAC,IAAI,EAAC,SAAS,EAAC,IAAI,EAAC,SAAS,EAAC,EAAC,EAAC,OAAO,EAAC,IAAI,EAAC,IAAI,EAAC,UAAU,EAAC,IAAI,EAAC,SAAS,EAAC,EAAC,EAAC,OAAO,EAAC,KAAK,EAAC,IAAI,EAAC,UAAU,EAAC,IAAI,EAAC,MAAM,EAAC,EAAE,GAAE,EAAC,EAAC,IAAI,EAAC,eAAe,EAAC,IAAI,EAAC,OAAO,EAAC,MAAM,EAAC,CAAC,EAAC,OAAO,EAAC,IAAI,EAAC,IAAI,EAAC,UAAU,EAAC,IAAI,EAAC,SAAS,EAAC,EAAC,EAAC,OAAO,EAAC,IAAI,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,SAAS,EAAC,EAAC,EAAC,OAAO,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,SAAS,EAAC,EAAC,EAAC,OAAO,EAAC,KAAK,EAAC,IAAI,EAAC,KAAK,EAAC,IAAI,EAAC,WAAW,EAAC,EAAC,EAAC,OAAO,EAAC,KAAK,EAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,WAAW,EAAC,EAAE,GAAE,EAAC,EAAC,IAAI,EAAC,gBAAgB,EAAC,IAAI,EAAC,OAAO,EAAC,MAAM,EAAC,CAAC,EAAC,OAAO,EAAC,IAAI,EAAC,IAAI,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AAE,EAAC,OAAO,EAAC,EAAE,GAAE,EAAC,EAAC,IAAI,EAAC,mBAAmB,EAAC,IAAI,EAAC,UAAU,EAAC,MAAM,EAAC,CAAC,EAAC,IAAI,EAAC,aAAa,EAAC,IAAI,EAAC,QAAQ,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,IAAI,EAAC,MAAM,EAAC,CAAC,GAAE,EAAC,EAAC,IAAI,EAAC,KAAK,EAAC,IAAI,EAAC,UAAU,EAAC,MAAM,EAAC,CAAC,EAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAC,SAAS,EAAC,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,IAAI,EAAC,QAAQ,EAAC,CAAC,EAAC;CACx8D,CAAC;AAEX,kBAAe,GAAG,CAAC"}
|
||||
308
dev/env/node_modules/micro-eth-signer/abi/erc20.d.ts
generated
vendored
Executable file
308
dev/env/node_modules/micro-eth-signer/abi/erc20.d.ts
generated
vendored
Executable file
@@ -0,0 +1,308 @@
|
||||
import { type HintOpt } from './decoder.ts';
|
||||
export declare const ABI: readonly [{
|
||||
readonly type: "function";
|
||||
readonly name: "name";
|
||||
readonly outputs: readonly [{
|
||||
readonly type: "string";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "totalSupply";
|
||||
readonly outputs: readonly [{
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "decimals";
|
||||
readonly outputs: readonly [{
|
||||
readonly type: "uint8";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "symbol";
|
||||
readonly outputs: readonly [{
|
||||
readonly type: "string";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "approve";
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "spender";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "value";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly outputs: readonly [{
|
||||
readonly name: "success";
|
||||
readonly type: "bool";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "transferFrom";
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "from";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "to";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "value";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly outputs: readonly [{
|
||||
readonly name: "success";
|
||||
readonly type: "bool";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "balances";
|
||||
readonly inputs: readonly [{
|
||||
readonly type: "address";
|
||||
}];
|
||||
readonly outputs: readonly [{
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "allowed";
|
||||
readonly inputs: readonly [{
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly type: "address";
|
||||
}];
|
||||
readonly outputs: readonly [{
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "balanceOf";
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "owner";
|
||||
readonly type: "address";
|
||||
}];
|
||||
readonly outputs: readonly [{
|
||||
readonly name: "balance";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "transfer";
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "to";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "value";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly outputs: readonly [{
|
||||
readonly name: "success";
|
||||
readonly type: "bool";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "allowance";
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "owner";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "spender";
|
||||
readonly type: "address";
|
||||
}];
|
||||
readonly outputs: readonly [{
|
||||
readonly name: "remaining";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
}, {
|
||||
readonly name: "Approval";
|
||||
readonly type: "event";
|
||||
readonly anonymous: false;
|
||||
readonly inputs: readonly [{
|
||||
readonly indexed: true;
|
||||
readonly name: "owner";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly indexed: true;
|
||||
readonly name: "spender";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly indexed: false;
|
||||
readonly name: "value";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
}, {
|
||||
readonly name: "Transfer";
|
||||
readonly type: "event";
|
||||
readonly anonymous: false;
|
||||
readonly inputs: readonly [{
|
||||
readonly indexed: true;
|
||||
readonly name: "from";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly indexed: true;
|
||||
readonly name: "to";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly indexed: false;
|
||||
readonly name: "value";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
}];
|
||||
export declare const hints: {
|
||||
approve(v: any, opt: HintOpt): string;
|
||||
transferFrom(v: any, opt: HintOpt): string;
|
||||
transfer(v: any, opt: HintOpt): string;
|
||||
Approval(v: any, opt: HintOpt): string;
|
||||
Transfer(v: any, opt: HintOpt): string;
|
||||
};
|
||||
declare const ERC20ABI: readonly [{
|
||||
readonly type: "function";
|
||||
readonly name: "name";
|
||||
readonly outputs: readonly [{
|
||||
readonly type: "string";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "totalSupply";
|
||||
readonly outputs: readonly [{
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "decimals";
|
||||
readonly outputs: readonly [{
|
||||
readonly type: "uint8";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "symbol";
|
||||
readonly outputs: readonly [{
|
||||
readonly type: "string";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "approve";
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "spender";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "value";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly outputs: readonly [{
|
||||
readonly name: "success";
|
||||
readonly type: "bool";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "transferFrom";
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "from";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "to";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "value";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly outputs: readonly [{
|
||||
readonly name: "success";
|
||||
readonly type: "bool";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "balances";
|
||||
readonly inputs: readonly [{
|
||||
readonly type: "address";
|
||||
}];
|
||||
readonly outputs: readonly [{
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "allowed";
|
||||
readonly inputs: readonly [{
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly type: "address";
|
||||
}];
|
||||
readonly outputs: readonly [{
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "balanceOf";
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "owner";
|
||||
readonly type: "address";
|
||||
}];
|
||||
readonly outputs: readonly [{
|
||||
readonly name: "balance";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "transfer";
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "to";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "value";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly outputs: readonly [{
|
||||
readonly name: "success";
|
||||
readonly type: "bool";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "allowance";
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "owner";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "spender";
|
||||
readonly type: "address";
|
||||
}];
|
||||
readonly outputs: readonly [{
|
||||
readonly name: "remaining";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
}, {
|
||||
readonly name: "Approval";
|
||||
readonly type: "event";
|
||||
readonly anonymous: false;
|
||||
readonly inputs: readonly [{
|
||||
readonly indexed: true;
|
||||
readonly name: "owner";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly indexed: true;
|
||||
readonly name: "spender";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly indexed: false;
|
||||
readonly name: "value";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
}, {
|
||||
readonly name: "Transfer";
|
||||
readonly type: "event";
|
||||
readonly anonymous: false;
|
||||
readonly inputs: readonly [{
|
||||
readonly indexed: true;
|
||||
readonly name: "from";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly indexed: true;
|
||||
readonly name: "to";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly indexed: false;
|
||||
readonly name: "value";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
}];
|
||||
export default ERC20ABI;
|
||||
//# sourceMappingURL=erc20.d.ts.map
|
||||
1
dev/env/node_modules/micro-eth-signer/abi/erc20.d.ts.map
generated
vendored
Executable file
1
dev/env/node_modules/micro-eth-signer/abi/erc20.d.ts.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"erc20.d.ts","sourceRoot":"","sources":["../src/abi/erc20.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,cAAc,CAAC;AAG5C,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEN,CAAC;AAGX,eAAO,MAAM,KAAK;eACL,GAAG,OAAO,OAAO;oBAQZ,GAAG,OAAO,OAAO;gBAQrB,GAAG,OAAO,OAAO;gBAOjB,GAAG,OAAO,OAAO;gBAOjB,GAAG,OAAO,OAAO;CAO9B,CAAC;AAEF,QAAA,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAuC,CAAC;AACtD,eAAe,QAAQ,CAAC"}
|
||||
40
dev/env/node_modules/micro-eth-signer/abi/erc20.js
generated
vendored
Executable file
40
dev/env/node_modules/micro-eth-signer/abi/erc20.js
generated
vendored
Executable file
@@ -0,0 +1,40 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.hints = exports.ABI = void 0;
|
||||
const utils_ts_1 = require("../utils.js");
|
||||
const common_ts_1 = require("./common.js");
|
||||
// prettier-ignore
|
||||
exports.ABI = [
|
||||
{ type: "function", name: "name", outputs: [{ type: "string" }] }, { type: "function", name: "totalSupply", outputs: [{ type: "uint256" }] }, { type: "function", name: "decimals", outputs: [{ type: "uint8" }] }, { type: "function", name: "symbol", outputs: [{ type: "string" }] }, { type: "function", name: "approve", inputs: [{ name: "spender", type: "address" }, { name: "value", type: "uint256" }], outputs: [{ name: "success", type: "bool" }] }, { type: "function", name: "transferFrom", inputs: [{ name: "from", type: "address" }, { name: "to", type: "address" }, { name: "value", type: "uint256" }], outputs: [{ name: "success", type: "bool" }] }, { type: "function", name: "balances", inputs: [{ type: "address" }], outputs: [{ type: "uint256" }] }, { type: "function", name: "allowed", inputs: [{ type: "address" }, { type: "address" }], outputs: [{ type: "uint256" }] }, { type: "function", name: "balanceOf", inputs: [{ name: "owner", type: "address" }], outputs: [{ name: "balance", type: "uint256" }] }, { type: "function", name: "transfer", inputs: [{ name: "to", type: "address" }, { name: "value", type: "uint256" }], outputs: [{ name: "success", type: "bool" }] }, { type: "function", name: "allowance", inputs: [{ name: "owner", type: "address" }, { name: "spender", type: "address" }], outputs: [{ name: "remaining", type: "uint256" }] }, { name: "Approval", type: "event", anonymous: false, inputs: [{ indexed: true, name: "owner", type: "address" }, { indexed: true, name: "spender", type: "address" }, { indexed: false, name: "value", type: "uint256" }] }, { name: "Transfer", type: "event", anonymous: false, inputs: [{ indexed: true, name: "from", type: "address" }, { indexed: true, name: "to", type: "address" }, { indexed: false, name: "value", type: "uint256" }] }
|
||||
];
|
||||
// https://eips.ethereum.org/EIPS/eip-20
|
||||
exports.hints = {
|
||||
approve(v, opt) {
|
||||
if (!opt.contractInfo || !opt.contractInfo.decimals || !opt.contractInfo.symbol)
|
||||
throw new Error('Not enough info');
|
||||
return `Allow spending ${(0, utils_ts_1.createDecimal)(opt.contractInfo.decimals).encode(v.value)} ${opt.contractInfo.symbol} by ${v.spender}`;
|
||||
},
|
||||
transferFrom(v, opt) {
|
||||
if (!opt.contractInfo || !opt.contractInfo.decimals || !opt.contractInfo.symbol)
|
||||
throw new Error('Not enough info');
|
||||
return `Transfer ${(0, utils_ts_1.createDecimal)(opt.contractInfo.decimals).encode(v.value)} ${opt.contractInfo.symbol} from ${v.from} to ${v.to}`;
|
||||
},
|
||||
transfer(v, opt) {
|
||||
if (!opt.contractInfo || !opt.contractInfo.decimals || !opt.contractInfo.symbol)
|
||||
throw new Error('Not enough info');
|
||||
return `Transfer ${(0, utils_ts_1.createDecimal)(opt.contractInfo.decimals).encode(v.value)} ${opt.contractInfo.symbol} to ${v.to}`;
|
||||
},
|
||||
Approval(v, opt) {
|
||||
if (!opt.contractInfo || !opt.contractInfo.decimals || !opt.contractInfo.symbol)
|
||||
throw new Error('Not enough info');
|
||||
return `Allow ${v.spender} spending up to ${(0, utils_ts_1.createDecimal)(opt.contractInfo.decimals).encode(v.value)} ${opt.contractInfo.symbol} from ${v.owner}`;
|
||||
},
|
||||
Transfer(v, opt) {
|
||||
if (!opt.contractInfo || !opt.contractInfo.decimals || !opt.contractInfo.symbol)
|
||||
throw new Error('Not enough info');
|
||||
return `Transfer ${(0, utils_ts_1.createDecimal)(opt.contractInfo.decimals).encode(v.value)} ${opt.contractInfo.symbol} from ${v.from} to ${v.to}`;
|
||||
},
|
||||
};
|
||||
const ERC20ABI = /* @__PURE__ */ (0, common_ts_1.addHints)(exports.ABI, exports.hints);
|
||||
exports.default = ERC20ABI;
|
||||
//# sourceMappingURL=erc20.js.map
|
||||
1
dev/env/node_modules/micro-eth-signer/abi/erc20.js.map
generated
vendored
Executable file
1
dev/env/node_modules/micro-eth-signer/abi/erc20.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"erc20.js","sourceRoot":"","sources":["../src/abi/erc20.ts"],"names":[],"mappings":";;;AAAA,0CAA4C;AAC5C,2CAAuC;AAGvC,kBAAkB;AACL,QAAA,GAAG,GAAG;IACjB,EAAC,IAAI,EAAC,UAAU,EAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,CAAC,EAAC,IAAI,EAAC,QAAQ,EAAC,CAAC,EAAC,EAAC,EAAC,IAAI,EAAC,UAAU,EAAC,IAAI,EAAC,aAAa,EAAC,OAAO,EAAC,CAAC,EAAC,IAAI,EAAC,SAAS,EAAC,CAAC,EAAC,EAAC,EAAC,IAAI,EAAC,UAAU,EAAC,IAAI,EAAC,UAAU,EAAC,OAAO,EAAC,CAAC,EAAC,IAAI,EAAC,OAAO,EAAC,CAAC,EAAC,EAAC,EAAC,IAAI,EAAC,UAAU,EAAC,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAC,CAAC,EAAC,IAAI,EAAC,QAAQ,EAAC,CAAC,EAAC,EAAC,EAAC,IAAI,EAAC,UAAU,EAAC,IAAI,EAAC,SAAS,EAAC,MAAM,EAAC,CAAC,EAAC,IAAI,EAA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AC,IACzE,GAAG,CAAC,YAAY,CAAC,MACnB,OAAO,CAAC,CAAC,EAAE,EAAE,CAAC;IAChB,CAAC;IACD,QAAQ,CAAC,CAAM,EAAE,GAAY;QAC3B,IAAI,CAAC,GAAG,CAAC,YAAY,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,QAAQ,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM;YAC7E,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;QACrC,OAAO,SAAS,CAAC,CAAC,OAAO,mBAAmB,IAAA,wBAAa,EAAC,GAAG,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,MAAM,CACzF,CAAC,CAAC,KAAK,CACR,IAAI,GAAG,CAAC,YAAY,CAAC,MAAM,SAAS,CAAC,CAAC,KAAK,EAAE,CAAC;IACjD,CAAC;IACD,QAAQ,CAAC,CAAM,EAAE,GAAY;QAC3B,IAAI,CAAC,GAAG,CAAC,YAAY,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,QAAQ,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,MAAM;YAC7E,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;QACrC,OAAO,YAAY,IAAA,wBAAa,EAAC,GAAG,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,IACzE,GAAG,CAAC,YAAY,CAAC,MACnB,SAAS,CAAC,CAAC,IAAI,OAAO,CAAC,CAAC,EAAE,EAAE,CAAC;IAC/B,CAAC;CACF,CAAC;AAEF,MAAM,QAAQ,GAAG,eAAe,CAAC,IAAA,oBAAQ,EAAC,WAAG,EAAE,aAAK,CAAC,CAAC;AACtD,kBAAe,QAAQ,CAAC"}
|
||||
220
dev/env/node_modules/micro-eth-signer/abi/erc721.d.ts
generated
vendored
Executable file
220
dev/env/node_modules/micro-eth-signer/abi/erc721.d.ts
generated
vendored
Executable file
@@ -0,0 +1,220 @@
|
||||
declare const ABI: readonly [{
|
||||
readonly type: "function";
|
||||
readonly name: "approve";
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "approved";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "tokenId";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "balanceOf";
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "owner";
|
||||
readonly type: "address";
|
||||
}];
|
||||
readonly outputs: readonly [{
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "ownerOf";
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "tokenId";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly outputs: readonly [{
|
||||
readonly name: "owner";
|
||||
readonly type: "address";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "getApproved";
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "tokenId";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly outputs: readonly [{
|
||||
readonly type: "address";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "isApprovedForAll";
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "owner";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "operator";
|
||||
readonly type: "address";
|
||||
}];
|
||||
readonly outputs: readonly [{
|
||||
readonly type: "bool";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "safeTransferFrom";
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "from";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "to";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "tokenId";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "safeTransferFrom";
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "from";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "to";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "tokenId";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly name: "data";
|
||||
readonly type: "bytes";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "setApprovalForAll";
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "operator";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "approved";
|
||||
readonly type: "bool";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "supportsInterface";
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "interfaceID";
|
||||
readonly type: "bytes4";
|
||||
}];
|
||||
readonly outputs: readonly [{
|
||||
readonly type: "bool";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "transferFrom";
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "from";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "to";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "tokenId";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "tokenByIndex";
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "index";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly outputs: readonly [{
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "tokenOfOwnerByIndex";
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "owner";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "index";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly outputs: readonly [{
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "totalSupply";
|
||||
readonly outputs: readonly [{
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "name";
|
||||
readonly outputs: readonly [{
|
||||
readonly name: "name";
|
||||
readonly type: "string";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "symbol";
|
||||
readonly outputs: readonly [{
|
||||
readonly name: "symbol";
|
||||
readonly type: "string";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "tokenURI";
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "tokenId";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly outputs: readonly [{
|
||||
readonly type: "string";
|
||||
}];
|
||||
}, {
|
||||
readonly name: "Transfer";
|
||||
readonly type: "event";
|
||||
readonly inputs: readonly [{
|
||||
readonly indexed: true;
|
||||
readonly name: "from";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly indexed: true;
|
||||
readonly name: "to";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly indexed: true;
|
||||
readonly name: "tokenId";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
}, {
|
||||
readonly name: "Approval";
|
||||
readonly type: "event";
|
||||
readonly inputs: readonly [{
|
||||
readonly indexed: true;
|
||||
readonly name: "owner";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly indexed: true;
|
||||
readonly name: "spender";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly indexed: true;
|
||||
readonly name: "tokenId";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
}, {
|
||||
readonly name: "ApprovalForAll";
|
||||
readonly type: "event";
|
||||
readonly inputs: readonly [{
|
||||
readonly indexed: true;
|
||||
readonly name: "owner";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly indexed: true;
|
||||
readonly name: "spender";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly indexed: false;
|
||||
readonly name: "approved";
|
||||
readonly type: "bool";
|
||||
}];
|
||||
}];
|
||||
export default ABI;
|
||||
//# sourceMappingURL=erc721.d.ts.map
|
||||
1
dev/env/node_modules/micro-eth-signer/abi/erc721.d.ts.map
generated
vendored
Executable file
1
dev/env/node_modules/micro-eth-signer/abi/erc721.d.ts.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"erc721.d.ts","sourceRoot":"","sources":["../src/abi/erc721.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEC,CAAC;AAEX,eAAe,GAAG,CAAC"}
|
||||
9
dev/env/node_modules/micro-eth-signer/abi/erc721.js
generated
vendored
Executable file
9
dev/env/node_modules/micro-eth-signer/abi/erc721.js
generated
vendored
Executable file
@@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
// Non-Fungible Token Standard: https://eips.ethereum.org/EIPS/eip-721
|
||||
// prettier-ignore
|
||||
const ABI = [
|
||||
{ type: "function", name: "approve", inputs: [{ name: "approved", type: "address" }, { name: "tokenId", type: "uint256" }] }, { type: "function", name: "balanceOf", inputs: [{ name: "owner", type: "address" }], outputs: [{ type: "uint256" }] }, { type: "function", name: "ownerOf", inputs: [{ name: "tokenId", type: "uint256" }], outputs: [{ name: "owner", type: "address" }] }, { type: "function", name: "getApproved", inputs: [{ name: "tokenId", type: "uint256" }], outputs: [{ type: "address" }] }, { type: "function", name: "isApprovedForAll", inputs: [{ name: "owner", type: "address" }, { name: "operator", type: "address" }], outputs: [{ type: "bool" }] }, { type: "function", name: "safeTransferFrom", inputs: [{ name: "from", type: "address" }, { name: "to", type: "address" }, { name: "tokenId", type: "uint256" }] }, { type: "function", name: "safeTransferFrom", inputs: [{ name: "from", type: "address" }, { name: "to", type: "address" }, { name: "tokenId", type: "uint256" }, { name: "data", type: "bytes" }] }, { type: "function", name: "setApprovalForAll", inputs: [{ name: "operator", type: "address" }, { name: "approved", type: "bool" }] }, { type: "function", name: "supportsInterface", inputs: [{ name: "interfaceID", type: "bytes4" }], outputs: [{ type: "bool" }] }, { type: "function", name: "transferFrom", inputs: [{ name: "from", type: "address" }, { name: "to", type: "address" }, { name: "tokenId", type: "uint256" }] }, { type: "function", name: "tokenByIndex", inputs: [{ name: "index", type: "uint256" }], outputs: [{ type: "uint256" }] }, { type: "function", name: "tokenOfOwnerByIndex", inputs: [{ name: "owner", type: "address" }, { name: "index", type: "uint256" }], outputs: [{ type: "uint256" }] }, { type: "function", name: "totalSupply", outputs: [{ type: "uint256" }] }, { type: "function", name: "name", outputs: [{ name: "name", type: "string" }] }, { type: "function", name: "symbol", outputs: [{ name: "symbol", type: "string" }] }, { type: "function", name: "tokenURI", inputs: [{ name: "tokenId", type: "uint256" }], outputs: [{ type: "string" }] }, { name: "Transfer", type: "event", inputs: [{ indexed: true, name: "from", type: "address" }, { indexed: true, name: "to", type: "address" }, { indexed: true, name: "tokenId", type: "uint256" }] }, { name: "Approval", type: "event", inputs: [{ indexed: true, name: "owner", type: "address" }, { indexed: true, name: "spender", type: "address" }, { indexed: true, name: "tokenId", type: "uint256" }] }, { name: "ApprovalForAll", type: "event", inputs: [{ indexed: true, name: "owner", type: "address" }, { indexed: true, name: "spender", type: "address" }, { indexed: false, name: "approved", type: "bool" }] }
|
||||
];
|
||||
exports.default = ABI;
|
||||
//# sourceMappingURL=erc721.js.map
|
||||
1
dev/env/node_modules/micro-eth-signer/abi/erc721.js.map
generated
vendored
Executable file
1
dev/env/node_modules/micro-eth-signer/abi/erc721.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"erc721.js","sourceRoot":"","sources":["../src/abi/erc721.ts"],"names":[],"mappings":";;AAAA,sEAAsE;AACtE,kBAAkB;AAClB,MAAM,GAAG,GAA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I,EAAC,SAAS,EAAC,EAAC,EAAC,OAAO,EAAC,IAAI,EAAC,IAAI,EAAC,SAAS,EAAC,IAAI,EAAC,SAAS,EAAC,CAAC,EAAC,EAAC,EAAC,IAAI,EAAC,UAAU,EAAC,IAAI,EAAC,OAAO,EAAC,MAAM,EAAC,CAAC,EAAC,OAAO,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,SAAS,EAAC,EAAC,EAAC,OAAO,EAAC,IAAI,EAAC,IAAI,EAAC,SAAS,EAAC,IAAI,EAAC,SAAS,EAAC,EAAC,EAAC,OAAO,EAAC,IAAI,EAAC,IAAI,EAAC,SAAS,EAAC,IAAI,EAAC,SAAS,EAAC,CAAC,EAAC,EAAC,EAAC,IAAI,EAAC,gBAAgB,EAAC,IAAI,EAAC,OAAO,EAAC,MAAM,EAAC,CAAC,EAAC,OAAO,EAAC,IAAI,EAAC,IAAI,EAAC,OAAO,EAAC,IAAI,EAAC,SAAS,EAAC,EAAC,EAAC,OAAO,EAAC,IAAI,EAAC,IAAI,EAAC,SAAS,EAAC,IAAI,EAAC,SAAS,EAAC,EAAC,EAAC,OAAO,EAAC,KAAK,EAAC,IAAI,EAAC,UAAU,EAAC,IAAI,EAAC,MAAM,EAAC,CAAC,EAAC;CAClvE,CAAC;AAEX,kBAAe,GAAG,CAAC"}
|
||||
24
dev/env/node_modules/micro-eth-signer/abi/index.d.ts
generated
vendored
Executable file
24
dev/env/node_modules/micro-eth-signer/abi/index.d.ts
generated
vendored
Executable file
@@ -0,0 +1,24 @@
|
||||
import { type ContractABI, type ContractInfo, Decoder, createContract, deployContract, events } from './decoder.ts';
|
||||
import { default as ERC1155 } from './erc1155.ts';
|
||||
import { default as ERC20 } from './erc20.ts';
|
||||
import { default as ERC721 } from './erc721.ts';
|
||||
import { KYBER_NETWORK_PROXY_CONTRACT } from './kyber.ts';
|
||||
import { UNISWAP_V2_ROUTER_CONTRACT } from './uniswap-v2.ts';
|
||||
import { UNISWAP_V3_ROUTER_CONTRACT } from './uniswap-v3.ts';
|
||||
import { default as WETH } from './weth.ts';
|
||||
export { ERC1155, ERC20, ERC721, KYBER_NETWORK_PROXY_CONTRACT, UNISWAP_V2_ROUTER_CONTRACT, UNISWAP_V3_ROUTER_CONTRACT, WETH, };
|
||||
export { Decoder, createContract, deployContract, events };
|
||||
export type { ContractABI, ContractInfo };
|
||||
export declare const TOKENS: Record<string, ContractInfo>;
|
||||
export declare const CONTRACTS: Record<string, ContractInfo>;
|
||||
export declare const tokenFromSymbol: (symbol: string) => {
|
||||
contract: string;
|
||||
} & ContractInfo;
|
||||
export type DecoderOpt = {
|
||||
customContracts?: Record<string, ContractInfo>;
|
||||
noDefault?: boolean;
|
||||
};
|
||||
export declare const decodeData: (to: string, data: string, amount?: bigint, opt?: DecoderOpt) => import("./decoder.ts").SignatureInfo | import("./decoder.ts").SignatureInfo[] | undefined;
|
||||
export declare const decodeTx: (transaction: string, opt?: DecoderOpt) => import("./decoder.ts").SignatureInfo | import("./decoder.ts").SignatureInfo[] | undefined;
|
||||
export declare const decodeEvent: (to: string, topics: string[], data: string, opt?: DecoderOpt) => import("./decoder.ts").SignatureInfo | import("./decoder.ts").SignatureInfo[] | undefined;
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
1
dev/env/node_modules/micro-eth-signer/abi/index.d.ts.map
generated
vendored
Executable file
1
dev/env/node_modules/micro-eth-signer/abi/index.d.ts.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/abi/index.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,OAAO,EACP,cAAc,EACd,cAAc,EACd,MAAM,EACP,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO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modules/micro-eth-signer/abi/index.js
generated
vendored
Executable file
141
dev/env/node_modules/micro-eth-signer/abi/index.js
generated
vendored
Executable file
@@ -0,0 +1,141 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.decodeEvent = exports.decodeTx = exports.decodeData = exports.tokenFromSymbol = exports.CONTRACTS = exports.TOKENS = exports.events = exports.deployContract = exports.createContract = exports.Decoder = exports.WETH = exports.UNISWAP_V3_ROUTER_CONTRACT = exports.UNISWAP_V2_ROUTER_CONTRACT = exports.KYBER_NETWORK_PROXY_CONTRACT = exports.ERC721 = exports.ERC20 = exports.ERC1155 = void 0;
|
||||
const address_ts_1 = require("../address.js");
|
||||
const index_ts_1 = require("../index.js");
|
||||
const utils_ts_1 = require("../utils.js");
|
||||
const decoder_ts_1 = require("./decoder.js");
|
||||
Object.defineProperty(exports, "Decoder", { enumerable: true, get: function () { return decoder_ts_1.Decoder; } });
|
||||
Object.defineProperty(exports, "createContract", { enumerable: true, get: function () { return decoder_ts_1.createContract; } });
|
||||
Object.defineProperty(exports, "deployContract", { enumerable: true, get: function () { return decoder_ts_1.deployContract; } });
|
||||
Object.defineProperty(exports, "events", { enumerable: true, get: function () { return decoder_ts_1.events; } });
|
||||
const erc1155_ts_1 = require("./erc1155.js");
|
||||
Object.defineProperty(exports, "ERC1155", { enumerable: true, get: function () { return erc1155_ts_1.default; } });
|
||||
const erc20_ts_1 = require("./erc20.js");
|
||||
Object.defineProperty(exports, "ERC20", { enumerable: true, get: function () { return erc20_ts_1.default; } });
|
||||
const erc721_ts_1 = require("./erc721.js");
|
||||
Object.defineProperty(exports, "ERC721", { enumerable: true, get: function () { return erc721_ts_1.default; } });
|
||||
const kyber_ts_1 = require("./kyber.js");
|
||||
Object.defineProperty(exports, "KYBER_NETWORK_PROXY_CONTRACT", { enumerable: true, get: function () { return kyber_ts_1.KYBER_NETWORK_PROXY_CONTRACT; } });
|
||||
const uniswap_v2_ts_1 = require("./uniswap-v2.js");
|
||||
Object.defineProperty(exports, "UNISWAP_V2_ROUTER_CONTRACT", { enumerable: true, get: function () { return uniswap_v2_ts_1.UNISWAP_V2_ROUTER_CONTRACT; } });
|
||||
const uniswap_v3_ts_1 = require("./uniswap-v3.js");
|
||||
Object.defineProperty(exports, "UNISWAP_V3_ROUTER_CONTRACT", { enumerable: true, get: function () { return uniswap_v3_ts_1.UNISWAP_V3_ROUTER_CONTRACT; } });
|
||||
const weth_ts_1 = require("./weth.js");
|
||||
Object.defineProperty(exports, "WETH", { enumerable: true, get: function () { return weth_ts_1.default; } });
|
||||
exports.TOKENS = (() => Object.freeze(Object.fromEntries([
|
||||
['UNI', '0x1f9840a85d5af5bf1d1762f925bdaddc4201f984'],
|
||||
['BAT', '0x0d8775f648430679a709e98d2b0cb6250d2887ef'],
|
||||
// Required for Uniswap multi-hop routing
|
||||
['USDT', '0xdac17f958d2ee523a2206206994597c13d831ec7', 6, 1],
|
||||
['USDC', '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', 6, 1],
|
||||
['WETH', '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'],
|
||||
['WBTC', '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599', 8],
|
||||
['DAI', '0x6b175474e89094c44da98b954eedeac495271d0f', 18, 1],
|
||||
['COMP', '0xc00e94cb662c3520282e6f5717214004a7f26888'],
|
||||
['MKR', '0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2'],
|
||||
['AMPL', '0xd46ba6d942050d489dbd938a2c909a5d5039a161', 9],
|
||||
].map(([symbol, addr, decimals, price]) => [
|
||||
addr,
|
||||
{ abi: 'ERC20', symbol, decimals: decimals || 18, price },
|
||||
]))))();
|
||||
// <address, contractInfo>
|
||||
exports.CONTRACTS = (() => Object.freeze({
|
||||
[uniswap_v2_ts_1.UNISWAP_V2_ROUTER_CONTRACT]: { abi: uniswap_v2_ts_1.default, name: 'UNISWAP V2 ROUTER' },
|
||||
[kyber_ts_1.KYBER_NETWORK_PROXY_CONTRACT]: { abi: kyber_ts_1.default, name: 'KYBER NETWORK PROXY' },
|
||||
[uniswap_v3_ts_1.UNISWAP_V3_ROUTER_CONTRACT]: { abi: uniswap_v3_ts_1.default, name: 'UNISWAP V3 ROUTER' },
|
||||
...exports.TOKENS,
|
||||
[weth_ts_1.WETH_CONTRACT]: { abi: weth_ts_1.default, name: 'WETH Token', decimals: 18, symbol: 'WETH' },
|
||||
}))();
|
||||
const tokenFromSymbol = (symbol) => {
|
||||
for (let c in exports.TOKENS) {
|
||||
if (exports.TOKENS[c].symbol === symbol)
|
||||
return Object.assign({ contract: c }, exports.TOKENS[c]);
|
||||
}
|
||||
throw new Error('unknown token');
|
||||
};
|
||||
exports.tokenFromSymbol = tokenFromSymbol;
|
||||
const getABI = (info) => {
|
||||
if (typeof info.abi === 'string') {
|
||||
if (info.abi === 'ERC20')
|
||||
return erc20_ts_1.default;
|
||||
else if (info.abi === 'ERC721')
|
||||
return erc721_ts_1.default;
|
||||
else
|
||||
throw new Error(`getABI: unknown abi type=${info.abi}`);
|
||||
}
|
||||
return info.abi;
|
||||
};
|
||||
// TODO: export? Seems useful enough
|
||||
// We cannot have this inside decoder itself,
|
||||
// since it will create dependencies on all default contracts
|
||||
const getDecoder = (opt = {}) => {
|
||||
const decoder = new decoder_ts_1.Decoder();
|
||||
const contracts = {};
|
||||
// Add contracts
|
||||
if (!opt.noDefault)
|
||||
Object.assign(contracts, exports.CONTRACTS);
|
||||
if (opt.customContracts) {
|
||||
for (const k in opt.customContracts)
|
||||
contracts[k.toLowerCase()] = opt.customContracts[k];
|
||||
}
|
||||
// Contract info validation
|
||||
for (const k in contracts) {
|
||||
if (!address_ts_1.addr.isValid(k))
|
||||
throw new Error(`getDecoder: invalid contract address=${k}`);
|
||||
const c = contracts[k];
|
||||
if (c.symbol !== undefined && typeof c.symbol !== 'string')
|
||||
throw new Error(`getDecoder: wrong symbol type=${c.symbol}`);
|
||||
if (c.decimals !== undefined && !Number.isSafeInteger(c.decimals))
|
||||
throw new Error(`getDecoder: wrong decimals type=${c.decimals}`);
|
||||
if (c.name !== undefined && typeof c.name !== 'string')
|
||||
throw new Error(`getDecoder: wrong name type=${c.name}`);
|
||||
if (c.price !== undefined && typeof c.price !== 'number')
|
||||
throw new Error(`getDecoder: wrong price type=${c.price}`);
|
||||
decoder.add(k, getABI(c)); // validates c.abi
|
||||
}
|
||||
return { decoder, contracts };
|
||||
};
|
||||
// These methods are for case when user wants to inspect tx/logs/receipt,
|
||||
// but doesn't know anything about which contract is used. If you work with
|
||||
// specific contract it is better to use 'createContract' which will return nice types.
|
||||
// 'to' can point to specific known contract, but also can point to any address (it is part of tx)
|
||||
// 'to' should be part of real tx you want to parse, not hardcoded contract!
|
||||
// Even if contract is unknown, we still try to process by known function signatures
|
||||
// from other contracts.
|
||||
// Can be used to parse tx or 'eth_getTransactionReceipt' output
|
||||
const decodeData = (to, data, amount, opt = {}) => {
|
||||
if (!address_ts_1.addr.isValid(to))
|
||||
throw new Error(`decodeData: wrong to=${to}`);
|
||||
if (amount !== undefined && typeof amount !== 'bigint')
|
||||
throw new Error(`decodeData: wrong amount=${amount}`);
|
||||
const { decoder, contracts } = getDecoder(opt);
|
||||
return decoder.decode(to, utils_ts_1.ethHex.decode(data), {
|
||||
contract: to,
|
||||
contracts, // NOTE: we need whole contracts list here, since exchanges can use info about other contracts (tokens)
|
||||
contractInfo: contracts[to.toLowerCase()], // current contract info (for tokens)
|
||||
amount, // Amount is not neccesary, but some hints won't work without it (exchange eth to some tokens)
|
||||
});
|
||||
};
|
||||
exports.decodeData = decodeData;
|
||||
// Requires deps on tx, but nicer API.
|
||||
// Doesn't cover all use cases of decodeData, since it can't parse 'eth_getTransactionReceipt'
|
||||
const decodeTx = (transaction, opt = {}) => {
|
||||
const tx = index_ts_1.Transaction.fromHex(transaction);
|
||||
return (0, exports.decodeData)(tx.raw.to, tx.raw.data, tx.raw.value, opt);
|
||||
};
|
||||
exports.decodeTx = decodeTx;
|
||||
// Parses output of eth_getLogs/eth_getTransactionReceipt
|
||||
const decodeEvent = (to, topics, data, opt = {}) => {
|
||||
if (!address_ts_1.addr.isValid(to))
|
||||
throw new Error(`decodeEvent: wrong to=${to}`);
|
||||
const { decoder, contracts } = getDecoder(opt);
|
||||
return decoder.decodeEvent(to, topics, data, {
|
||||
contract: to,
|
||||
contracts,
|
||||
contractInfo: contracts[to.toLowerCase()],
|
||||
// amount here is not used by our hooks. Should we ask it for consistency?
|
||||
});
|
||||
};
|
||||
exports.decodeEvent = decodeEvent;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
dev/env/node_modules/micro-eth-signer/abi/index.js.map
generated
vendored
Executable file
1
dev/env/node_modules/micro-eth-signer/abi/index.js.map
generated
vendored
Executable file
File diff suppressed because one or more lines are too long
141
dev/env/node_modules/micro-eth-signer/abi/kyber.d.ts
generated
vendored
Executable file
141
dev/env/node_modules/micro-eth-signer/abi/kyber.d.ts
generated
vendored
Executable file
@@ -0,0 +1,141 @@
|
||||
declare const ABI: readonly [{
|
||||
readonly type: "function";
|
||||
readonly name: "getExpectedRate";
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "src";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "dest";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "srcQty";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly outputs: readonly [{
|
||||
readonly name: "expectedRate";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly name: "worstRate";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "getExpectedRateAfterFee";
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "src";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "dest";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "srcQty";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly name: "platformFeeBps";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly name: "hint";
|
||||
readonly type: "bytes";
|
||||
}];
|
||||
readonly outputs: readonly [{
|
||||
readonly name: "expectedRate";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "trade";
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "src";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "srcAmount";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly name: "dest";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "destAddress";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "maxDestAmount";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly name: "minConversionRate";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly name: "platformWallet";
|
||||
readonly type: "address";
|
||||
}];
|
||||
readonly outputs: readonly [{
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "tradeWithHint";
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "src";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "srcAmount";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly name: "dest";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "destAddress";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "maxDestAmount";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly name: "minConversionRate";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly name: "walletId";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "hint";
|
||||
readonly type: "bytes";
|
||||
}];
|
||||
readonly outputs: readonly [{
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
}, {
|
||||
readonly type: "function";
|
||||
readonly name: "tradeWithHintAndFee";
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "src";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "srcAmount";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly name: "dest";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "destAddress";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "maxDestAmount";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly name: "minConversionRate";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly name: "platformWallet";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "platformFeeBps";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly name: "hint";
|
||||
readonly type: "bytes";
|
||||
}];
|
||||
readonly outputs: readonly [{
|
||||
readonly name: "destAmount";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
}];
|
||||
export default ABI;
|
||||
export declare const KYBER_NETWORK_PROXY_CONTRACT = "0x9aab3f75489902f3a48495025729a0af77d4b11e";
|
||||
//# sourceMappingURL=kyber.d.ts.map
|
||||
1
dev/env/node_modules/micro-eth-signer/abi/kyber.d.ts.map
generated
vendored
Executable file
1
dev/env/node_modules/micro-eth-signer/abi/kyber.d.ts.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"kyber.d.ts","sourceRoot":"","sources":["../src/abi/kyber.ts"],"names":[],"mappings":"AAqCA,QAAA,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAwC,CAAC;AAElD,eAAe,GAAG,CAAC;AACnB,eAAO,MAAM,4BAA4B,+CAA+C,CAAC"}
|
||||
33
dev/env/node_modules/micro-eth-signer/abi/kyber.js
generated
vendored
Executable file
33
dev/env/node_modules/micro-eth-signer/abi/kyber.js
generated
vendored
Executable file
@@ -0,0 +1,33 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.KYBER_NETWORK_PROXY_CONTRACT = void 0;
|
||||
const utils_ts_1 = require("../utils.js");
|
||||
const common_ts_1 = require("./common.js");
|
||||
// prettier-ignore
|
||||
const _ABI = [
|
||||
{ type: "function", name: "getExpectedRate", inputs: [{ name: "src", type: "address" }, { name: "dest", type: "address" }, { name: "srcQty", type: "uint256" }], outputs: [{ name: "expectedRate", type: "uint256" }, { name: "worstRate", type: "uint256" }] }, { type: "function", name: "getExpectedRateAfterFee", inputs: [{ name: "src", type: "address" }, { name: "dest", type: "address" }, { name: "srcQty", type: "uint256" }, { name: "platformFeeBps", type: "uint256" }, { name: "hint", type: "bytes" }], outputs: [{ name: "expectedRate", type: "uint256" }] }, { type: "function", name: "trade", inputs: [{ name: "src", type: "address" }, { name: "srcAmount", type: "uint256" }, { name: "dest", type: "address" }, { name: "destAddress", type: "address" }, { name: "maxDestAmount", type: "uint256" }, { name: "minConversionRate", type: "uint256" }, { name: "platformWallet", type: "address" }], outputs: [{ type: "uint256" }] }, { type: "function", name: "tradeWithHint", inputs: [{ name: "src", type: "address" }, { name: "srcAmount", type: "uint256" }, { name: "dest", type: "address" }, { name: "destAddress", type: "address" }, { name: "maxDestAmount", type: "uint256" }, { name: "minConversionRate", type: "uint256" }, { name: "walletId", type: "address" }, { name: "hint", type: "bytes" }], outputs: [{ type: "uint256" }] }, { type: "function", name: "tradeWithHintAndFee", inputs: [{ name: "src", type: "address" }, { name: "srcAmount", type: "uint256" }, { name: "dest", type: "address" }, { name: "destAddress", type: "address" }, { name: "maxDestAmount", type: "uint256" }, { name: "minConversionRate", type: "uint256" }, { name: "platformWallet", type: "address" }, { name: "platformFeeBps", type: "uint256" }, { name: "hint", type: "bytes" }], outputs: [{ name: "destAmount", type: "uint256" }] }
|
||||
];
|
||||
const _10n = BigInt(10);
|
||||
const hints = {
|
||||
tradeWithHintAndFee(v, opt) {
|
||||
if (!opt.contracts)
|
||||
throw Error('Not enough info');
|
||||
const tokenInfo = (c) => c === '0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee'
|
||||
? { symbol: 'ETH', decimals: 18 }
|
||||
: opt.contracts[c];
|
||||
const formatToken = (amount, info) => `${(0, utils_ts_1.createDecimal)(info.decimals).encode(amount)} ${info.symbol}`;
|
||||
const [srcInfo, destInfo] = [tokenInfo(v.src), tokenInfo(v.dest)];
|
||||
if (!srcInfo || !destInfo)
|
||||
throw Error('Not enough info');
|
||||
const destAmount = (v.srcAmount *
|
||||
v.minConversionRate *
|
||||
_10n ** BigInt(destInfo.decimals)) /
|
||||
_10n ** (BigInt(srcInfo.decimals) + BigInt(18));
|
||||
const fee = formatToken((BigInt(v.platformFeeBps) * BigInt(v.srcAmount)) / BigInt(10000), srcInfo);
|
||||
return `Swap ${formatToken(v.srcAmount, srcInfo)} For ${formatToken(destAmount, destInfo)} (with platform fee: ${fee})`;
|
||||
},
|
||||
};
|
||||
const ABI = /* @__PURE__ */ (0, common_ts_1.addHints)(_ABI, hints);
|
||||
exports.default = ABI;
|
||||
exports.KYBER_NETWORK_PROXY_CONTRACT = '0x9aab3f75489902f3a48495025729a0af77d4b11e';
|
||||
//# sourceMappingURL=kyber.js.map
|
||||
1
dev/env/node_modules/micro-eth-signer/abi/kyber.js.map
generated
vendored
Executable file
1
dev/env/node_modules/micro-eth-signer/abi/kyber.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"kyber.js","sourceRoot":"","sources":["../src/abi/kyber.ts"],"names":[],"mappings":";;;AAAA,0CAA4C;AAC5C,2CAAuC;AAGvC,kBAAkB;AAClB,MAAM,IAAI,GAAG;IACX,EAAC,IAAI,EAAC,UAAU,EAAC,IAAI,EAAC,iBAAiB,EAAC,MAAM,EAAC,CAAC,EAAC,IAAI,EAAC,KAAK,EAAC,IAAI,EAAC,SAAS,EAAC,EAAC,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,SAAS,EAAC,EAAC,EAAC,IAAI,EAAC,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rB,CAAC,MAAM,CAAC,CAAC,CAAC,cAAc,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,EAChE,OAAO,CACR,CAAC;QACF,OAAO,QAAQ,WAAW,CAAC,CAAC,CAAC,SAAS,EAAE,OAAO,CAAC,QAAQ,WAAW,CACjE,UAAU,EACV,QAAQ,CACT,wBAAwB,GAAG,GAAG,CAAC;IAClC,CAAC;CACF,CAAC;AAEF,MAAM,GAAG,GAAG,eAAe,CAAC,IAAA,oBAAQ,EAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AAElD,kBAAe,GAAG,CAAC;AACN,QAAA,4BAA4B,GAAG,4CAA4C,CAAC"}
|
||||
755
dev/env/node_modules/micro-eth-signer/abi/uniswap-v2.d.ts
generated
vendored
Executable file
755
dev/env/node_modules/micro-eth-signer/abi/uniswap-v2.d.ts
generated
vendored
Executable file
@@ -0,0 +1,755 @@
|
||||
declare const ABI: readonly [{
|
||||
readonly inputs: readonly [{
|
||||
readonly internalType: "address";
|
||||
readonly name: "_factory";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "address";
|
||||
readonly name: "_WETH";
|
||||
readonly type: "address";
|
||||
}];
|
||||
readonly stateMutability: "nonpayable";
|
||||
readonly type: "constructor";
|
||||
}, {
|
||||
readonly inputs: readonly [];
|
||||
readonly name: "WETH";
|
||||
readonly outputs: readonly [{
|
||||
readonly internalType: "address";
|
||||
readonly name: "";
|
||||
readonly type: "address";
|
||||
}];
|
||||
readonly stateMutability: "view";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [{
|
||||
readonly internalType: "address";
|
||||
readonly name: "tokenA";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "address";
|
||||
readonly name: "tokenB";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountADesired";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountBDesired";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountAMin";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountBMin";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "address";
|
||||
readonly name: "to";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "deadline";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly name: "addLiquidity";
|
||||
readonly outputs: readonly [{
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountA";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountB";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "liquidity";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly stateMutability: "nonpayable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [{
|
||||
readonly internalType: "address";
|
||||
readonly name: "token";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountTokenDesired";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountTokenMin";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountETHMin";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "address";
|
||||
readonly name: "to";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "deadline";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly name: "addLiquidityETH";
|
||||
readonly outputs: readonly [{
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountToken";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountETH";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "liquidity";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly stateMutability: "payable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [];
|
||||
readonly name: "factory";
|
||||
readonly outputs: readonly [{
|
||||
readonly internalType: "address";
|
||||
readonly name: "";
|
||||
readonly type: "address";
|
||||
}];
|
||||
readonly stateMutability: "view";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [{
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountOut";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "reserveIn";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "reserveOut";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly name: "getAmountIn";
|
||||
readonly outputs: readonly [{
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountIn";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly stateMutability: "pure";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [{
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountIn";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "reserveIn";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "reserveOut";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly name: "getAmountOut";
|
||||
readonly outputs: readonly [{
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountOut";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly stateMutability: "pure";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [{
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountOut";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "address[]";
|
||||
readonly name: "path";
|
||||
readonly type: "address[]";
|
||||
}];
|
||||
readonly name: "getAmountsIn";
|
||||
readonly outputs: readonly [{
|
||||
readonly internalType: "uint256[]";
|
||||
readonly name: "amounts";
|
||||
readonly type: "uint256[]";
|
||||
}];
|
||||
readonly stateMutability: "view";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [{
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountIn";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "address[]";
|
||||
readonly name: "path";
|
||||
readonly type: "address[]";
|
||||
}];
|
||||
readonly name: "getAmountsOut";
|
||||
readonly outputs: readonly [{
|
||||
readonly internalType: "uint256[]";
|
||||
readonly name: "amounts";
|
||||
readonly type: "uint256[]";
|
||||
}];
|
||||
readonly stateMutability: "view";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [{
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountA";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "reserveA";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "reserveB";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly name: "quote";
|
||||
readonly outputs: readonly [{
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountB";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly stateMutability: "pure";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [{
|
||||
readonly internalType: "address";
|
||||
readonly name: "tokenA";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "address";
|
||||
readonly name: "tokenB";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "liquidity";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountAMin";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountBMin";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "address";
|
||||
readonly name: "to";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "deadline";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly name: "removeLiquidity";
|
||||
readonly outputs: readonly [{
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountA";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountB";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly stateMutability: "nonpayable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [{
|
||||
readonly internalType: "address";
|
||||
readonly name: "token";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "liquidity";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountTokenMin";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountETHMin";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "address";
|
||||
readonly name: "to";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "deadline";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly name: "removeLiquidityETH";
|
||||
readonly outputs: readonly [{
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountToken";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountETH";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly stateMutability: "nonpayable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [{
|
||||
readonly internalType: "address";
|
||||
readonly name: "token";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "liquidity";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountTokenMin";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountETHMin";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "address";
|
||||
readonly name: "to";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "deadline";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly name: "removeLiquidityETHSupportingFeeOnTransferTokens";
|
||||
readonly outputs: readonly [{
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountETH";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly stateMutability: "nonpayable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [{
|
||||
readonly internalType: "address";
|
||||
readonly name: "token";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "liquidity";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountTokenMin";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountETHMin";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "address";
|
||||
readonly name: "to";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "deadline";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "bool";
|
||||
readonly name: "approveMax";
|
||||
readonly type: "bool";
|
||||
}, {
|
||||
readonly internalType: "uint8";
|
||||
readonly name: "v";
|
||||
readonly type: "uint8";
|
||||
}, {
|
||||
readonly internalType: "bytes32";
|
||||
readonly name: "r";
|
||||
readonly type: "bytes32";
|
||||
}, {
|
||||
readonly internalType: "bytes32";
|
||||
readonly name: "s";
|
||||
readonly type: "bytes32";
|
||||
}];
|
||||
readonly name: "removeLiquidityETHWithPermit";
|
||||
readonly outputs: readonly [{
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountToken";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountETH";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly stateMutability: "nonpayable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [{
|
||||
readonly internalType: "address";
|
||||
readonly name: "token";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "liquidity";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountTokenMin";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountETHMin";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "address";
|
||||
readonly name: "to";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "deadline";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "bool";
|
||||
readonly name: "approveMax";
|
||||
readonly type: "bool";
|
||||
}, {
|
||||
readonly internalType: "uint8";
|
||||
readonly name: "v";
|
||||
readonly type: "uint8";
|
||||
}, {
|
||||
readonly internalType: "bytes32";
|
||||
readonly name: "r";
|
||||
readonly type: "bytes32";
|
||||
}, {
|
||||
readonly internalType: "bytes32";
|
||||
readonly name: "s";
|
||||
readonly type: "bytes32";
|
||||
}];
|
||||
readonly name: "removeLiquidityETHWithPermitSupportingFeeOnTransferTokens";
|
||||
readonly outputs: readonly [{
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountETH";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly stateMutability: "nonpayable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [{
|
||||
readonly internalType: "address";
|
||||
readonly name: "tokenA";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "address";
|
||||
readonly name: "tokenB";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "liquidity";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountAMin";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountBMin";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "address";
|
||||
readonly name: "to";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "deadline";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "bool";
|
||||
readonly name: "approveMax";
|
||||
readonly type: "bool";
|
||||
}, {
|
||||
readonly internalType: "uint8";
|
||||
readonly name: "v";
|
||||
readonly type: "uint8";
|
||||
}, {
|
||||
readonly internalType: "bytes32";
|
||||
readonly name: "r";
|
||||
readonly type: "bytes32";
|
||||
}, {
|
||||
readonly internalType: "bytes32";
|
||||
readonly name: "s";
|
||||
readonly type: "bytes32";
|
||||
}];
|
||||
readonly name: "removeLiquidityWithPermit";
|
||||
readonly outputs: readonly [{
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountA";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountB";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly stateMutability: "nonpayable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [{
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountOut";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "address[]";
|
||||
readonly name: "path";
|
||||
readonly type: "address[]";
|
||||
}, {
|
||||
readonly internalType: "address";
|
||||
readonly name: "to";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "deadline";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly name: "swapETHForExactTokens";
|
||||
readonly outputs: readonly [{
|
||||
readonly internalType: "uint256[]";
|
||||
readonly name: "amounts";
|
||||
readonly type: "uint256[]";
|
||||
}];
|
||||
readonly stateMutability: "payable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [{
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountOutMin";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "address[]";
|
||||
readonly name: "path";
|
||||
readonly type: "address[]";
|
||||
}, {
|
||||
readonly internalType: "address";
|
||||
readonly name: "to";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "deadline";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly name: "swapExactETHForTokens";
|
||||
readonly outputs: readonly [{
|
||||
readonly internalType: "uint256[]";
|
||||
readonly name: "amounts";
|
||||
readonly type: "uint256[]";
|
||||
}];
|
||||
readonly stateMutability: "payable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [{
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountOutMin";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "address[]";
|
||||
readonly name: "path";
|
||||
readonly type: "address[]";
|
||||
}, {
|
||||
readonly internalType: "address";
|
||||
readonly name: "to";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "deadline";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly name: "swapExactETHForTokensSupportingFeeOnTransferTokens";
|
||||
readonly outputs: readonly [];
|
||||
readonly stateMutability: "payable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [{
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountIn";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountOutMin";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "address[]";
|
||||
readonly name: "path";
|
||||
readonly type: "address[]";
|
||||
}, {
|
||||
readonly internalType: "address";
|
||||
readonly name: "to";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "deadline";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly name: "swapExactTokensForETH";
|
||||
readonly outputs: readonly [{
|
||||
readonly internalType: "uint256[]";
|
||||
readonly name: "amounts";
|
||||
readonly type: "uint256[]";
|
||||
}];
|
||||
readonly stateMutability: "nonpayable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [{
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountIn";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountOutMin";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "address[]";
|
||||
readonly name: "path";
|
||||
readonly type: "address[]";
|
||||
}, {
|
||||
readonly internalType: "address";
|
||||
readonly name: "to";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "deadline";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly name: "swapExactTokensForETHSupportingFeeOnTransferTokens";
|
||||
readonly outputs: readonly [];
|
||||
readonly stateMutability: "nonpayable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [{
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountIn";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountOutMin";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "address[]";
|
||||
readonly name: "path";
|
||||
readonly type: "address[]";
|
||||
}, {
|
||||
readonly internalType: "address";
|
||||
readonly name: "to";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "deadline";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly name: "swapExactTokensForTokens";
|
||||
readonly outputs: readonly [{
|
||||
readonly internalType: "uint256[]";
|
||||
readonly name: "amounts";
|
||||
readonly type: "uint256[]";
|
||||
}];
|
||||
readonly stateMutability: "nonpayable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [{
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountIn";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountOutMin";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "address[]";
|
||||
readonly name: "path";
|
||||
readonly type: "address[]";
|
||||
}, {
|
||||
readonly internalType: "address";
|
||||
readonly name: "to";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "deadline";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly name: "swapExactTokensForTokensSupportingFeeOnTransferTokens";
|
||||
readonly outputs: readonly [];
|
||||
readonly stateMutability: "nonpayable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [{
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountOut";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountInMax";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "address[]";
|
||||
readonly name: "path";
|
||||
readonly type: "address[]";
|
||||
}, {
|
||||
readonly internalType: "address";
|
||||
readonly name: "to";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "deadline";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly name: "swapTokensForExactETH";
|
||||
readonly outputs: readonly [{
|
||||
readonly internalType: "uint256[]";
|
||||
readonly name: "amounts";
|
||||
readonly type: "uint256[]";
|
||||
}];
|
||||
readonly stateMutability: "nonpayable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [{
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountOut";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountInMax";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "address[]";
|
||||
readonly name: "path";
|
||||
readonly type: "address[]";
|
||||
}, {
|
||||
readonly internalType: "address";
|
||||
readonly name: "to";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "deadline";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly name: "swapTokensForExactTokens";
|
||||
readonly outputs: readonly [{
|
||||
readonly internalType: "uint256[]";
|
||||
readonly name: "amounts";
|
||||
readonly type: "uint256[]";
|
||||
}];
|
||||
readonly stateMutability: "nonpayable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly stateMutability: "payable";
|
||||
readonly type: "receive";
|
||||
}];
|
||||
export default ABI;
|
||||
export declare const UNISWAP_V2_ROUTER_CONTRACT = "0x7a250d5630b4cf539739df2c5dacb4c659f2488d";
|
||||
//# sourceMappingURL=uniswap-v2.d.ts.map
|
||||
1
dev/env/node_modules/micro-eth-signer/abi/uniswap-v2.d.ts.map
generated
vendored
Executable file
1
dev/env/node_modules/micro-eth-signer/abi/uniswap-v2.d.ts.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"uniswap-v2.d.ts","sourceRoot":"","sources":["../src/abi/uniswap-v2.ts"],"names":[],"mappings":"AAsFA,QAAA,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAwC,CAAC;AAClD,eAAe,GAAG,CAAC;AACnB,eAAO,MAAM,0BAA0B,+CAA+C,CAAC"}
|
||||
82
dev/env/node_modules/micro-eth-signer/abi/uniswap-v2.js
generated
vendored
Executable file
82
dev/env/node_modules/micro-eth-signer/abi/uniswap-v2.js
generated
vendored
Executable file
File diff suppressed because one or more lines are too long
1
dev/env/node_modules/micro-eth-signer/abi/uniswap-v2.js.map
generated
vendored
Executable file
1
dev/env/node_modules/micro-eth-signer/abi/uniswap-v2.js.map
generated
vendored
Executable file
File diff suppressed because one or more lines are too long
441
dev/env/node_modules/micro-eth-signer/abi/uniswap-v3.d.ts
generated
vendored
Executable file
441
dev/env/node_modules/micro-eth-signer/abi/uniswap-v3.d.ts
generated
vendored
Executable file
@@ -0,0 +1,441 @@
|
||||
declare const ABI: readonly [{
|
||||
readonly inputs: readonly [{
|
||||
readonly internalType: "address";
|
||||
readonly name: "_factory";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "address";
|
||||
readonly name: "_WETH9";
|
||||
readonly type: "address";
|
||||
}];
|
||||
readonly stateMutability: "nonpayable";
|
||||
readonly type: "constructor";
|
||||
}, {
|
||||
readonly inputs: readonly [];
|
||||
readonly name: "WETH9";
|
||||
readonly outputs: readonly [{
|
||||
readonly internalType: "address";
|
||||
readonly name: "";
|
||||
readonly type: "address";
|
||||
}];
|
||||
readonly stateMutability: "view";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [{
|
||||
readonly components: readonly [{
|
||||
readonly internalType: "bytes";
|
||||
readonly name: "path";
|
||||
readonly type: "bytes";
|
||||
}, {
|
||||
readonly internalType: "address";
|
||||
readonly name: "recipient";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "deadline";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountIn";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountOutMinimum";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly internalType: "struct ISwapRouter.ExactInputParams";
|
||||
readonly name: "params";
|
||||
readonly type: "tuple";
|
||||
}];
|
||||
readonly name: "exactInput";
|
||||
readonly outputs: readonly [{
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountOut";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly stateMutability: "payable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [{
|
||||
readonly components: readonly [{
|
||||
readonly internalType: "address";
|
||||
readonly name: "tokenIn";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "address";
|
||||
readonly name: "tokenOut";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint24";
|
||||
readonly name: "fee";
|
||||
readonly type: "uint24";
|
||||
}, {
|
||||
readonly internalType: "address";
|
||||
readonly name: "recipient";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "deadline";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountIn";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountOutMinimum";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint160";
|
||||
readonly name: "sqrtPriceLimitX96";
|
||||
readonly type: "uint160";
|
||||
}];
|
||||
readonly internalType: "struct ISwapRouter.ExactInputSingleParams";
|
||||
readonly name: "params";
|
||||
readonly type: "tuple";
|
||||
}];
|
||||
readonly name: "exactInputSingle";
|
||||
readonly outputs: readonly [{
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountOut";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly stateMutability: "payable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [{
|
||||
readonly components: readonly [{
|
||||
readonly internalType: "bytes";
|
||||
readonly name: "path";
|
||||
readonly type: "bytes";
|
||||
}, {
|
||||
readonly internalType: "address";
|
||||
readonly name: "recipient";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "deadline";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountOut";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountInMaximum";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly internalType: "struct ISwapRouter.ExactOutputParams";
|
||||
readonly name: "params";
|
||||
readonly type: "tuple";
|
||||
}];
|
||||
readonly name: "exactOutput";
|
||||
readonly outputs: readonly [{
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountIn";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly stateMutability: "payable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [{
|
||||
readonly components: readonly [{
|
||||
readonly internalType: "address";
|
||||
readonly name: "tokenIn";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "address";
|
||||
readonly name: "tokenOut";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint24";
|
||||
readonly name: "fee";
|
||||
readonly type: "uint24";
|
||||
}, {
|
||||
readonly internalType: "address";
|
||||
readonly name: "recipient";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "deadline";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountOut";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountInMaximum";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint160";
|
||||
readonly name: "sqrtPriceLimitX96";
|
||||
readonly type: "uint160";
|
||||
}];
|
||||
readonly internalType: "struct ISwapRouter.ExactOutputSingleParams";
|
||||
readonly name: "params";
|
||||
readonly type: "tuple";
|
||||
}];
|
||||
readonly name: "exactOutputSingle";
|
||||
readonly outputs: readonly [{
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountIn";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly stateMutability: "payable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [];
|
||||
readonly name: "factory";
|
||||
readonly outputs: readonly [{
|
||||
readonly internalType: "address";
|
||||
readonly name: "";
|
||||
readonly type: "address";
|
||||
}];
|
||||
readonly stateMutability: "view";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [{
|
||||
readonly internalType: "bytes[]";
|
||||
readonly name: "data";
|
||||
readonly type: "bytes[]";
|
||||
}];
|
||||
readonly name: "multicall";
|
||||
readonly outputs: readonly [{
|
||||
readonly internalType: "bytes[]";
|
||||
readonly name: "results";
|
||||
readonly type: "bytes[]";
|
||||
}];
|
||||
readonly stateMutability: "payable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [];
|
||||
readonly name: "refundETH";
|
||||
readonly outputs: readonly [];
|
||||
readonly stateMutability: "payable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [{
|
||||
readonly internalType: "address";
|
||||
readonly name: "token";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "value";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "deadline";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint8";
|
||||
readonly name: "v";
|
||||
readonly type: "uint8";
|
||||
}, {
|
||||
readonly internalType: "bytes32";
|
||||
readonly name: "r";
|
||||
readonly type: "bytes32";
|
||||
}, {
|
||||
readonly internalType: "bytes32";
|
||||
readonly name: "s";
|
||||
readonly type: "bytes32";
|
||||
}];
|
||||
readonly name: "selfPermit";
|
||||
readonly outputs: readonly [];
|
||||
readonly stateMutability: "payable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [{
|
||||
readonly internalType: "address";
|
||||
readonly name: "token";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "nonce";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "expiry";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint8";
|
||||
readonly name: "v";
|
||||
readonly type: "uint8";
|
||||
}, {
|
||||
readonly internalType: "bytes32";
|
||||
readonly name: "r";
|
||||
readonly type: "bytes32";
|
||||
}, {
|
||||
readonly internalType: "bytes32";
|
||||
readonly name: "s";
|
||||
readonly type: "bytes32";
|
||||
}];
|
||||
readonly name: "selfPermitAllowed";
|
||||
readonly outputs: readonly [];
|
||||
readonly stateMutability: "payable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [{
|
||||
readonly internalType: "address";
|
||||
readonly name: "token";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "nonce";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "expiry";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint8";
|
||||
readonly name: "v";
|
||||
readonly type: "uint8";
|
||||
}, {
|
||||
readonly internalType: "bytes32";
|
||||
readonly name: "r";
|
||||
readonly type: "bytes32";
|
||||
}, {
|
||||
readonly internalType: "bytes32";
|
||||
readonly name: "s";
|
||||
readonly type: "bytes32";
|
||||
}];
|
||||
readonly name: "selfPermitAllowedIfNecessary";
|
||||
readonly outputs: readonly [];
|
||||
readonly stateMutability: "payable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [{
|
||||
readonly internalType: "address";
|
||||
readonly name: "token";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "value";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "deadline";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "uint8";
|
||||
readonly name: "v";
|
||||
readonly type: "uint8";
|
||||
}, {
|
||||
readonly internalType: "bytes32";
|
||||
readonly name: "r";
|
||||
readonly type: "bytes32";
|
||||
}, {
|
||||
readonly internalType: "bytes32";
|
||||
readonly name: "s";
|
||||
readonly type: "bytes32";
|
||||
}];
|
||||
readonly name: "selfPermitIfNecessary";
|
||||
readonly outputs: readonly [];
|
||||
readonly stateMutability: "payable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [{
|
||||
readonly internalType: "address";
|
||||
readonly name: "token";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountMinimum";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "address";
|
||||
readonly name: "recipient";
|
||||
readonly type: "address";
|
||||
}];
|
||||
readonly name: "sweepToken";
|
||||
readonly outputs: readonly [];
|
||||
readonly stateMutability: "payable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [{
|
||||
readonly internalType: "address";
|
||||
readonly name: "token";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountMinimum";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "address";
|
||||
readonly name: "recipient";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "feeBips";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "address";
|
||||
readonly name: "feeRecipient";
|
||||
readonly type: "address";
|
||||
}];
|
||||
readonly name: "sweepTokenWithFee";
|
||||
readonly outputs: readonly [];
|
||||
readonly stateMutability: "payable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [{
|
||||
readonly internalType: "int256";
|
||||
readonly name: "amount0Delta";
|
||||
readonly type: "int256";
|
||||
}, {
|
||||
readonly internalType: "int256";
|
||||
readonly name: "amount1Delta";
|
||||
readonly type: "int256";
|
||||
}, {
|
||||
readonly internalType: "bytes";
|
||||
readonly name: "_data";
|
||||
readonly type: "bytes";
|
||||
}];
|
||||
readonly name: "uniswapV3SwapCallback";
|
||||
readonly outputs: readonly [];
|
||||
readonly stateMutability: "nonpayable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [{
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountMinimum";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "address";
|
||||
readonly name: "recipient";
|
||||
readonly type: "address";
|
||||
}];
|
||||
readonly name: "unwrapWETH9";
|
||||
readonly outputs: readonly [];
|
||||
readonly stateMutability: "payable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly inputs: readonly [{
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "amountMinimum";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "address";
|
||||
readonly name: "recipient";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly internalType: "uint256";
|
||||
readonly name: "feeBips";
|
||||
readonly type: "uint256";
|
||||
}, {
|
||||
readonly internalType: "address";
|
||||
readonly name: "feeRecipient";
|
||||
readonly type: "address";
|
||||
}];
|
||||
readonly name: "unwrapWETH9WithFee";
|
||||
readonly outputs: readonly [];
|
||||
readonly stateMutability: "payable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly stateMutability: "payable";
|
||||
readonly type: "receive";
|
||||
}];
|
||||
export default ABI;
|
||||
export declare const UNISWAP_V3_ROUTER_CONTRACT = "0xe592427a0aece92de3edee1f18e0157c05861564";
|
||||
//# sourceMappingURL=uniswap-v3.d.ts.map
|
||||
1
dev/env/node_modules/micro-eth-signer/abi/uniswap-v3.d.ts.map
generated
vendored
Executable file
1
dev/env/node_modules/micro-eth-signer/abi/uniswap-v3.d.ts.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"uniswap-v3.d.ts","sourceRoot":"","sources":["../src/abi/uniswap-v3.ts"],"names":[],"mappings":"AA0EA,QAAA,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAiD,CAAC;AAE3D,eAAe,GAAG,CAAC;AACnB,eAAO,MAAM,0BAA0B,+CAA+C,CAAC"}
|
||||
81
dev/env/node_modules/micro-eth-signer/abi/uniswap-v3.js
generated
vendored
Executable file
81
dev/env/node_modules/micro-eth-signer/abi/uniswap-v3.js
generated
vendored
Executable file
File diff suppressed because one or more lines are too long
1
dev/env/node_modules/micro-eth-signer/abi/uniswap-v3.js.map
generated
vendored
Executable file
1
dev/env/node_modules/micro-eth-signer/abi/uniswap-v3.js.map
generated
vendored
Executable file
File diff suppressed because one or more lines are too long
216
dev/env/node_modules/micro-eth-signer/abi/weth.d.ts
generated
vendored
Executable file
216
dev/env/node_modules/micro-eth-signer/abi/weth.d.ts
generated
vendored
Executable file
@@ -0,0 +1,216 @@
|
||||
declare const ABI: readonly [{
|
||||
readonly constant: true;
|
||||
readonly inputs: readonly [];
|
||||
readonly name: "name";
|
||||
readonly outputs: readonly [{
|
||||
readonly name: "";
|
||||
readonly type: "string";
|
||||
}];
|
||||
readonly payable: false;
|
||||
readonly stateMutability: "view";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly constant: false;
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "guy";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "wad";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly name: "approve";
|
||||
readonly outputs: readonly [{
|
||||
readonly name: "";
|
||||
readonly type: "bool";
|
||||
}];
|
||||
readonly payable: false;
|
||||
readonly stateMutability: "nonpayable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly constant: true;
|
||||
readonly inputs: readonly [];
|
||||
readonly name: "totalSupply";
|
||||
readonly outputs: readonly [{
|
||||
readonly name: "";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly payable: false;
|
||||
readonly stateMutability: "view";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly constant: false;
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "src";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "dst";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "wad";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly name: "transferFrom";
|
||||
readonly outputs: readonly [{
|
||||
readonly name: "";
|
||||
readonly type: "bool";
|
||||
}];
|
||||
readonly payable: false;
|
||||
readonly stateMutability: "nonpayable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly constant: false;
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "wad";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly name: "withdraw";
|
||||
readonly outputs: readonly [];
|
||||
readonly payable: false;
|
||||
readonly stateMutability: "nonpayable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly constant: true;
|
||||
readonly inputs: readonly [];
|
||||
readonly name: "decimals";
|
||||
readonly outputs: readonly [{
|
||||
readonly name: "";
|
||||
readonly type: "uint8";
|
||||
}];
|
||||
readonly payable: false;
|
||||
readonly stateMutability: "view";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly constant: true;
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "";
|
||||
readonly type: "address";
|
||||
}];
|
||||
readonly name: "balanceOf";
|
||||
readonly outputs: readonly [{
|
||||
readonly name: "";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly payable: false;
|
||||
readonly stateMutability: "view";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly constant: true;
|
||||
readonly inputs: readonly [];
|
||||
readonly name: "symbol";
|
||||
readonly outputs: readonly [{
|
||||
readonly name: "";
|
||||
readonly type: "string";
|
||||
}];
|
||||
readonly payable: false;
|
||||
readonly stateMutability: "view";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly constant: false;
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "dst";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "wad";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly name: "transfer";
|
||||
readonly outputs: readonly [{
|
||||
readonly name: "";
|
||||
readonly type: "bool";
|
||||
}];
|
||||
readonly payable: false;
|
||||
readonly stateMutability: "nonpayable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly constant: false;
|
||||
readonly inputs: readonly [];
|
||||
readonly name: "deposit";
|
||||
readonly outputs: readonly [];
|
||||
readonly payable: true;
|
||||
readonly stateMutability: "payable";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly constant: true;
|
||||
readonly inputs: readonly [{
|
||||
readonly name: "";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly name: "";
|
||||
readonly type: "address";
|
||||
}];
|
||||
readonly name: "allowance";
|
||||
readonly outputs: readonly [{
|
||||
readonly name: "";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly payable: false;
|
||||
readonly stateMutability: "view";
|
||||
readonly type: "function";
|
||||
}, {
|
||||
readonly payable: true;
|
||||
readonly stateMutability: "payable";
|
||||
readonly type: "fallback";
|
||||
}, {
|
||||
readonly anonymous: false;
|
||||
readonly inputs: readonly [{
|
||||
readonly indexed: true;
|
||||
readonly name: "src";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly indexed: true;
|
||||
readonly name: "guy";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly indexed: false;
|
||||
readonly name: "wad";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly name: "Approval";
|
||||
readonly type: "event";
|
||||
}, {
|
||||
readonly anonymous: false;
|
||||
readonly inputs: readonly [{
|
||||
readonly indexed: true;
|
||||
readonly name: "src";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly indexed: true;
|
||||
readonly name: "dst";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly indexed: false;
|
||||
readonly name: "wad";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly name: "Transfer";
|
||||
readonly type: "event";
|
||||
}, {
|
||||
readonly anonymous: false;
|
||||
readonly inputs: readonly [{
|
||||
readonly indexed: true;
|
||||
readonly name: "dst";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly indexed: false;
|
||||
readonly name: "wad";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly name: "Deposit";
|
||||
readonly type: "event";
|
||||
}, {
|
||||
readonly anonymous: false;
|
||||
readonly inputs: readonly [{
|
||||
readonly indexed: true;
|
||||
readonly name: "src";
|
||||
readonly type: "address";
|
||||
}, {
|
||||
readonly indexed: false;
|
||||
readonly name: "wad";
|
||||
readonly type: "uint256";
|
||||
}];
|
||||
readonly name: "Withdrawal";
|
||||
readonly type: "event";
|
||||
}];
|
||||
export default ABI;
|
||||
export declare const WETH_CONTRACT = "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2";
|
||||
//# sourceMappingURL=weth.d.ts.map
|
||||
1
dev/env/node_modules/micro-eth-signer/abi/weth.d.ts.map
generated
vendored
Executable file
1
dev/env/node_modules/micro-eth-signer/abi/weth.d.ts.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"weth.d.ts","sourceRoot":"","sources":["../src/abi/weth.ts"],"names":[],"mappings":"AAQA,QAAA,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAA6C,CAAC;AACvD,eAAe,GAAG,CAAC;AACnB,eAAO,MAAM,aAAa,+CAA+C,CAAC"}
|
||||
13
dev/env/node_modules/micro-eth-signer/abi/weth.js
generated
vendored
Executable file
13
dev/env/node_modules/micro-eth-signer/abi/weth.js
generated
vendored
Executable file
@@ -0,0 +1,13 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.WETH_CONTRACT = void 0;
|
||||
const common_ts_1 = require("./common.js");
|
||||
const erc20_ts_1 = require("./erc20.js");
|
||||
// prettier-ignore
|
||||
const _ABI = [
|
||||
{ constant: true, inputs: [], name: "name", outputs: [{ name: "", type: "string" }], payable: false, stateMutability: "view", type: "function" }, { constant: false, inputs: [{ name: "guy", type: "address" }, { name: "wad", type: "uint256" }], name: "approve", outputs: [{ name: "", type: "bool" }], payable: false, stateMutability: "nonpayable", type: "function" }, { constant: true, inputs: [], name: "totalSupply", outputs: [{ name: "", type: "uint256" }], payable: false, stateMutability: "view", type: "function" }, { constant: false, inputs: [{ name: "src", type: "address" }, { name: "dst", type: "address" }, { name: "wad", type: "uint256" }], name: "transferFrom", outputs: [{ name: "", type: "bool" }], payable: false, stateMutability: "nonpayable", type: "function" }, { constant: false, inputs: [{ name: "wad", type: "uint256" }], name: "withdraw", outputs: [], payable: false, stateMutability: "nonpayable", type: "function" }, { constant: true, inputs: [], name: "decimals", outputs: [{ name: "", type: "uint8" }], payable: false, stateMutability: "view", type: "function" }, { constant: true, inputs: [{ name: "", type: "address" }], name: "balanceOf", outputs: [{ name: "", type: "uint256" }], payable: false, stateMutability: "view", type: "function" }, { constant: true, inputs: [], name: "symbol", outputs: [{ name: "", type: "string" }], payable: false, stateMutability: "view", type: "function" }, { constant: false, inputs: [{ name: "dst", type: "address" }, { name: "wad", type: "uint256" }], name: "transfer", outputs: [{ name: "", type: "bool" }], payable: false, stateMutability: "nonpayable", type: "function" }, { constant: false, inputs: [], name: "deposit", outputs: [], payable: true, stateMutability: "payable", type: "function" }, { constant: true, inputs: [{ name: "", type: "address" }, { name: "", type: "address" }], name: "allowance", outputs: [{ name: "", type: "uint256" }], payable: false, stateMutability: "view", type: "function" }, { payable: true, stateMutability: "payable", type: "fallback" }, { anonymous: false, inputs: [{ indexed: true, name: "src", type: "address" }, { indexed: true, name: "guy", type: "address" }, { indexed: false, name: "wad", type: "uint256" }], name: "Approval", type: "event" }, { anonymous: false, inputs: [{ indexed: true, name: "src", type: "address" }, { indexed: true, name: "dst", type: "address" }, { indexed: false, name: "wad", type: "uint256" }], name: "Transfer", type: "event" }, { anonymous: false, inputs: [{ indexed: true, name: "dst", type: "address" }, { indexed: false, name: "wad", type: "uint256" }], name: "Deposit", type: "event" }, { anonymous: false, inputs: [{ indexed: true, name: "src", type: "address" }, { indexed: false, name: "wad", type: "uint256" }], name: "Withdrawal", type: "event" }
|
||||
];
|
||||
const ABI = /* @__PURE__ */ (0, common_ts_1.addHints)(_ABI, erc20_ts_1.hints);
|
||||
exports.default = ABI;
|
||||
exports.WETH_CONTRACT = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2';
|
||||
//# sourceMappingURL=weth.js.map
|
||||
1
dev/env/node_modules/micro-eth-signer/abi/weth.js.map
generated
vendored
Executable file
1
dev/env/node_modules/micro-eth-signer/abi/weth.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"weth.js","sourceRoot":"","sources":["../src/abi/weth.ts"],"names":[],"mappings":";;;AAAA,2CAAuC;AACvC,yCAAiD;AAEjD,kBAAkB;AAClB,MAAM,IAAI,GAAG;IACX,EAAC,QAAQ,EAAC,IAAI,EAAC,MAAM,EAAC,EAAE,EAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,CAAC,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,QAAQ,EAAC,CAAC,EAAC,OAAO,EAAC,KAAK,EAAC,eAAe,EAAC,MAAM,EAAC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