@0xbow/privacy-pools-core-sdk 0.0.0-c084059
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +73 -0
- package/dist/esm/ccip-nJye9Itm.js +166 -0
- package/dist/esm/ccip-nJye9Itm.js.map +1 -0
- package/dist/esm/index-DAWUECi8.js +84043 -0
- package/dist/esm/index-DAWUECi8.js.map +1 -0
- package/dist/esm/index.mjs +4 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/index.d.mts +666 -0
- package/dist/node/ccip-lPhPeJab.js +183 -0
- package/dist/node/ccip-lPhPeJab.js.map +1 -0
- package/dist/node/index-BiU5Ef8Z.js +90625 -0
- package/dist/node/index-BiU5Ef8Z.js.map +1 -0
- package/dist/node/index.mjs +21 -0
- package/dist/node/index.mjs.map +1 -0
- package/dist/types/abi/ERC20.d.ts +38 -0
- package/dist/types/abi/IEntrypoint.d.ts +794 -0
- package/dist/types/abi/IPrivacyPool.d.ts +51 -0
- package/dist/types/ccip-BZzz1Y5w.js +182 -0
- package/dist/types/circuits/circuits.impl.d.ts +108 -0
- package/dist/types/circuits/circuits.interface.d.ts +127 -0
- package/dist/types/circuits/index.d.ts +2 -0
- package/dist/types/constants.d.ts +2 -0
- package/dist/types/core/bruteForce.service.d.ts +61 -0
- package/dist/types/core/commitment.service.d.ts +30 -0
- package/dist/types/core/contracts.service.d.ts +106 -0
- package/dist/types/core/sdk.d.ts +44 -0
- package/dist/types/core/withdrawal.service.d.ts +32 -0
- package/dist/types/crypto.d.ts +45 -0
- package/dist/types/dirname.helper.d.ts +2 -0
- package/dist/types/errors/base.error.d.ts +52 -0
- package/dist/types/exceptions/circuitInitialization.exception.d.ts +3 -0
- package/dist/types/exceptions/fetchArtifacts.exception.d.ts +3 -0
- package/dist/types/exceptions/index.d.ts +4 -0
- package/dist/types/exceptions/invalidRpcUrl.exception.d.ts +3 -0
- package/dist/types/exceptions/privacyPool.exception.d.ts +13 -0
- package/dist/types/external.d.ts +7 -0
- package/dist/types/filename.helper.d.ts +2 -0
- package/dist/types/index-D-_1h8-n.js +90638 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/index.js +20 -0
- package/dist/types/interfaces/blockchainProvider.interface.d.ts +12 -0
- package/dist/types/interfaces/circuits.interface.d.ts +30 -0
- package/dist/types/interfaces/contracts.interface.d.ts +28 -0
- package/dist/types/interfaces/index.d.ts +1 -0
- package/dist/types/internal.d.ts +6 -0
- package/dist/types/providers/blockchainProvider.d.ts +8 -0
- package/dist/types/providers/index.d.ts +1 -0
- package/dist/types/types/commitment.d.ts +48 -0
- package/dist/types/types/index.d.ts +2 -0
- package/dist/types/types/withdrawal.d.ts +30 -0
- package/package.json +81 -0
- package/src/abi/ERC20.ts +222 -0
- package/src/abi/IEntrypoint.ts +1059 -0
- package/src/abi/IPrivacyPool.ts +576 -0
- package/src/circuits/circuits.impl.ts +232 -0
- package/src/circuits/circuits.interface.ts +166 -0
- package/src/circuits/fetchArtifacts.esm.ts +12 -0
- package/src/circuits/fetchArtifacts.node.ts +23 -0
- package/src/circuits/fetchArtifacts.ts +7 -0
- package/src/circuits/index.ts +2 -0
- package/src/constants.ts +3 -0
- package/src/core/account.service.ts +1077 -0
- package/src/core/bruteForce.service.ts +120 -0
- package/src/core/commitment.service.ts +84 -0
- package/src/core/contracts.service.ts +442 -0
- package/src/core/data.service.ts +272 -0
- package/src/core/sdk.ts +92 -0
- package/src/core/withdrawal.service.ts +126 -0
- package/src/crypto.ts +226 -0
- package/src/dirname.helper.ts +4 -0
- package/src/errors/account.error.ts +49 -0
- package/src/errors/base.error.ts +125 -0
- package/src/errors/data.error.ts +34 -0
- package/src/errors/events.error.ts +38 -0
- package/src/exceptions/circuitInitialization.exception.ts +6 -0
- package/src/exceptions/fetchArtifacts.exception.ts +7 -0
- package/src/exceptions/index.ts +4 -0
- package/src/exceptions/invalidRpcUrl.exception.ts +6 -0
- package/src/exceptions/privacyPool.exception.ts +19 -0
- package/src/external.ts +13 -0
- package/src/filename.helper.ts +4 -0
- package/src/index.ts +21 -0
- package/src/interfaces/blockchainProvider.interface.ts +13 -0
- package/src/interfaces/circuits.interface.ts +34 -0
- package/src/interfaces/contracts.interface.ts +66 -0
- package/src/interfaces/index.ts +1 -0
- package/src/internal.ts +6 -0
- package/src/keys.ts +42 -0
- package/src/providers/blockchainProvider.ts +26 -0
- package/src/providers/index.ts +1 -0
- package/src/types/account.ts +35 -0
- package/src/types/commitment.ts +50 -0
- package/src/types/events.ts +82 -0
- package/src/types/index.ts +3 -0
- package/src/types/keys.ts +6 -0
- package/src/types/withdrawal.ts +33 -0
- package/src/utils/logger.ts +56 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export * from "./types/index.js";
|
|
2
|
+
export * from "./crypto.js";
|
|
3
|
+
export * from "./external.js";
|
|
4
|
+
export { PrivacyPoolSDK } from "./core/sdk.js";
|
|
5
|
+
export * from "./types/commitment.js";
|
|
6
|
+
export * from "./types/withdrawal.js";
|
|
7
|
+
export * from "./errors/base.error.js";
|
|
8
|
+
export * from "./interfaces/circuits.interface.js";
|
|
9
|
+
export { CommitmentService } from "./core/commitment.service.js";
|
|
10
|
+
export { WithdrawalService } from "./core/withdrawal.service.js";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export { o as BlockchainProvider, u as CircuitName, p as Circuits, C as CommitmentService, t as ContractError, q as ContractInteractionsService, E as ErrorCode, I as InvalidRpcUrl, P as PrivacyPoolSDK, r as ProofError, S as SDKError, W as WithdrawalService, l as bigintToHash, m as bigintToHex, n as calculateContext, k as generateMerkleProof, f as generateSecrets, j as getCommitment, h as hashPrecommitment } from './index-D-_1h8-n.js';
|
|
2
|
+
import 'buffer';
|
|
3
|
+
import 'http';
|
|
4
|
+
import 'https';
|
|
5
|
+
import 'zlib';
|
|
6
|
+
import 'crypto';
|
|
7
|
+
import 'node:crypto';
|
|
8
|
+
import 'events';
|
|
9
|
+
import 'net';
|
|
10
|
+
import 'tls';
|
|
11
|
+
import 'stream';
|
|
12
|
+
import 'url';
|
|
13
|
+
import 'assert';
|
|
14
|
+
import 'os';
|
|
15
|
+
import 'vm';
|
|
16
|
+
import 'worker_threads';
|
|
17
|
+
import 'fs';
|
|
18
|
+
import 'constants';
|
|
19
|
+
import 'readline';
|
|
20
|
+
import 'path';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Address } from "../internal.js";
|
|
2
|
+
/**
|
|
3
|
+
* Represents an interface for a blockchain provider.
|
|
4
|
+
*/
|
|
5
|
+
export interface IBlockchainProvider {
|
|
6
|
+
/**
|
|
7
|
+
* Retrieves the balance of the specified address.
|
|
8
|
+
* @param {Address} address The address for which to retrieve the balance.
|
|
9
|
+
* @returns {Promise<bigint>} A Promise that resolves to the balance of the address.
|
|
10
|
+
*/
|
|
11
|
+
getBalance(address: Address): Promise<bigint>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Available circuit types in the system.
|
|
3
|
+
*/
|
|
4
|
+
export declare enum CircuitName {
|
|
5
|
+
Commitment = "commitment",
|
|
6
|
+
Withdraw = "withdraw"
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Type for circuit input signals.
|
|
10
|
+
*/
|
|
11
|
+
export type CircuitSignals = {
|
|
12
|
+
[key: string]: bigint | bigint[] | string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Interface for accessing circuit-related resources.
|
|
16
|
+
*/
|
|
17
|
+
export interface CircuitsInterface {
|
|
18
|
+
/**
|
|
19
|
+
* Gets the WASM binary for a circuit.
|
|
20
|
+
*/
|
|
21
|
+
getWasm(name: CircuitName): Promise<Uint8Array>;
|
|
22
|
+
/**
|
|
23
|
+
* Gets the proving key for a circuit.
|
|
24
|
+
*/
|
|
25
|
+
getProvingKey(name: CircuitName): Promise<Uint8Array>;
|
|
26
|
+
/**
|
|
27
|
+
* Gets the verification key for a circuit.
|
|
28
|
+
*/
|
|
29
|
+
getVerificationKey(name: CircuitName): Promise<Uint8Array>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Address } from "viem";
|
|
2
|
+
import { Withdrawal, WithdrawalProof } from "../types/withdrawal.js";
|
|
3
|
+
import { CommitmentProof, Hash } from "../types/commitment.js";
|
|
4
|
+
export interface SolidityGroth16Proof {
|
|
5
|
+
pA: [bigint, bigint];
|
|
6
|
+
pB: [[bigint, bigint], [bigint, bigint]];
|
|
7
|
+
pC: [bigint, bigint];
|
|
8
|
+
pubSignals: bigint[];
|
|
9
|
+
}
|
|
10
|
+
export interface TransactionResponse {
|
|
11
|
+
hash: string;
|
|
12
|
+
wait: () => Promise<void>;
|
|
13
|
+
}
|
|
14
|
+
export interface ContractInteractions {
|
|
15
|
+
depositERC20(asset: Address, amount: bigint, precommitment: bigint): Promise<TransactionResponse>;
|
|
16
|
+
depositETH(amount: bigint, precommitment: bigint): Promise<TransactionResponse>;
|
|
17
|
+
withdraw(withdrawal: Withdrawal, withdrawalProof: WithdrawalProof, scope: Hash): Promise<TransactionResponse>;
|
|
18
|
+
relay(withdrawal: Withdrawal, withdrawalProof: WithdrawalProof, scope: Hash): Promise<TransactionResponse>;
|
|
19
|
+
ragequit(commitmentProof: CommitmentProof, privacyPoolAddress: Address): Promise<TransactionResponse>;
|
|
20
|
+
getScope(privacyPoolAddress: Address): Promise<bigint>;
|
|
21
|
+
getStateRoot(privacyPoolAddress: Address): Promise<bigint>;
|
|
22
|
+
getStateSize(privacyPoolAddress: Address): Promise<bigint>;
|
|
23
|
+
getScopeData(scope: bigint): Promise<{
|
|
24
|
+
poolAddress: Address | null;
|
|
25
|
+
assetAddress: Address | null;
|
|
26
|
+
}>;
|
|
27
|
+
approveERC20(spenderAddress: Address, tokenAddress: Address, amount: bigint): Promise<TransactionResponse>;
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./blockchainProvider.interface.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Address } from "viem";
|
|
2
|
+
import { IBlockchainProvider } from "../internal.js";
|
|
3
|
+
export declare class BlockchainProvider implements IBlockchainProvider {
|
|
4
|
+
private client;
|
|
5
|
+
constructor(rpcUrl: string);
|
|
6
|
+
/** @inheritdoc */
|
|
7
|
+
getBalance(address: Address): Promise<bigint>;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./blockchainProvider.js";
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Groth16Proof, PublicSignals } from "snarkjs";
|
|
2
|
+
/**
|
|
3
|
+
* Represents a hash value in the system.
|
|
4
|
+
* This is a branded type to ensure type safety.
|
|
5
|
+
*/
|
|
6
|
+
export type Hash = bigint & {
|
|
7
|
+
readonly __brand: unique symbol;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Represents a secret value in the system.
|
|
11
|
+
* This is a branded type to ensure type safety.
|
|
12
|
+
*/
|
|
13
|
+
export type Secret = bigint & {
|
|
14
|
+
readonly __brand: unique symbol;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Represents a precommitment structure containing the hash, nullifier, and secret.
|
|
18
|
+
* All hashes are computed using Poseidon.
|
|
19
|
+
*/
|
|
20
|
+
export interface Precommitment {
|
|
21
|
+
readonly hash: Hash;
|
|
22
|
+
readonly nullifier: Secret;
|
|
23
|
+
readonly secret: Secret;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Represents the preimage of a commitment containing the value, label, and precommitment.
|
|
27
|
+
*/
|
|
28
|
+
export interface CommitmentPreimage {
|
|
29
|
+
readonly value: bigint;
|
|
30
|
+
readonly label: bigint;
|
|
31
|
+
readonly precommitment: Precommitment;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Represents a complete commitment structure.
|
|
35
|
+
* All hashes are computed using Poseidon.
|
|
36
|
+
*/
|
|
37
|
+
export interface Commitment {
|
|
38
|
+
readonly hash: Hash;
|
|
39
|
+
readonly nullifierHash: Hash;
|
|
40
|
+
readonly preimage: CommitmentPreimage;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Represents the result of a commitment proof operation.
|
|
44
|
+
*/
|
|
45
|
+
export interface CommitmentProof {
|
|
46
|
+
readonly proof: Groth16Proof;
|
|
47
|
+
readonly publicSignals: PublicSignals;
|
|
48
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Address, Hex } from "viem";
|
|
2
|
+
import { Groth16Proof, PublicSignals } from "snarkjs";
|
|
3
|
+
import { LeanIMTMerkleProof } from "@zk-kit/lean-imt";
|
|
4
|
+
import { Hash, Secret } from "./commitment.js";
|
|
5
|
+
/**
|
|
6
|
+
* Represents a withdrawal request in the system.
|
|
7
|
+
*/
|
|
8
|
+
export interface Withdrawal {
|
|
9
|
+
readonly processooor: Address;
|
|
10
|
+
readonly data: Hex;
|
|
11
|
+
}
|
|
12
|
+
export interface WithdrawalProof {
|
|
13
|
+
readonly proof: Groth16Proof;
|
|
14
|
+
readonly publicSignals: PublicSignals;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Input parameters required for withdrawal proof generation.
|
|
18
|
+
*/
|
|
19
|
+
export interface WithdrawalProofInput {
|
|
20
|
+
readonly context: bigint;
|
|
21
|
+
readonly withdrawalAmount: bigint;
|
|
22
|
+
readonly stateMerkleProof: LeanIMTMerkleProof<bigint>;
|
|
23
|
+
readonly aspMerkleProof: LeanIMTMerkleProof<bigint>;
|
|
24
|
+
readonly stateRoot: Hash;
|
|
25
|
+
readonly stateTreeDepth: bigint;
|
|
26
|
+
readonly aspRoot: Hash;
|
|
27
|
+
readonly aspTreeDepth: bigint;
|
|
28
|
+
readonly newSecret: Secret;
|
|
29
|
+
readonly newNullifier: Secret;
|
|
30
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@0xbow/privacy-pools-core-sdk",
|
|
3
|
+
"version": "0.0.0-c084059",
|
|
4
|
+
"description": "Typescript SDK for the Privacy Pool protocol",
|
|
5
|
+
"repository": "https://github.com/0xbow-io/privacy-pools-core",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"author": "Wonderland",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"main": "./dist/node/index.mjs",
|
|
10
|
+
"module": "./dist/esm/index.mjs",
|
|
11
|
+
"browser": "./dist/esm/index.mjs",
|
|
12
|
+
"types": "./dist/index.d.mts",
|
|
13
|
+
"exports": {
|
|
14
|
+
"node": {
|
|
15
|
+
"types": "./dist/index.d.mts",
|
|
16
|
+
"default": "./dist/node/index.mjs"
|
|
17
|
+
},
|
|
18
|
+
"import": {
|
|
19
|
+
"types": "./dist/index.d.mts",
|
|
20
|
+
"default": "./dist/esm/index.mjs"
|
|
21
|
+
},
|
|
22
|
+
"browser": {
|
|
23
|
+
"types": "./dist/index.d.mts",
|
|
24
|
+
"default": "./dist/esm/index.mjs"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"directories": {
|
|
28
|
+
"src": "src"
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"dist/*",
|
|
32
|
+
"src",
|
|
33
|
+
"package.json",
|
|
34
|
+
"!**/*.tsbuildinfo"
|
|
35
|
+
],
|
|
36
|
+
"scripts": {
|
|
37
|
+
"circuits:setup": "cd ../circuits/ && yarn install && yarn compile && yarn setup:all",
|
|
38
|
+
"circuits:copy": "sh ./scripts/copy_circuits.sh",
|
|
39
|
+
"build": "yarn clean && rollup -c ./configs/rollup.config.mjs",
|
|
40
|
+
"build:bundle": "yarn clean && rollup -c ./configs/rollup.config.mjs && yarn circuits:copy",
|
|
41
|
+
"check-types": "tsc --noEmit -p ./tsconfig.json",
|
|
42
|
+
"clean": "rm -rf dist .rollup.cache tsconfig.build.tsbuildinfo",
|
|
43
|
+
"format": "prettier --check \"{src,test}/**/*.{js,ts,json}\"",
|
|
44
|
+
"format:fix": "prettier --write \"{src,test}/**/*.{js,ts,json}\"",
|
|
45
|
+
"lint": "eslint \"{src,test}/**/*.{js,ts,json}\"",
|
|
46
|
+
"lint:fix": "eslint \"{src,test}/**/*.{js,ts,json}\" --fix",
|
|
47
|
+
"test": "vitest run --config vitest.config.ts --passWithNoTests",
|
|
48
|
+
"test:cov": "vitest run --config vitest.config.ts --coverage"
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"@types/snarkjs": "0.7.9",
|
|
52
|
+
"@zk-kit/lean-imt": "2.2.4",
|
|
53
|
+
"maci-crypto": "2.5.0",
|
|
54
|
+
"snarkjs": "0.7.5",
|
|
55
|
+
"typescript": "^5.7.3",
|
|
56
|
+
"viem": "2.22.14"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@commitlint/config-conventional": "19.4.1",
|
|
60
|
+
"@eslint/js": "9.18.0",
|
|
61
|
+
"@ianvs/prettier-plugin-sort-imports": "4.3.1",
|
|
62
|
+
"@rollup/plugin-alias": "5.1.1",
|
|
63
|
+
"@rollup/plugin-commonjs": "28.0.2",
|
|
64
|
+
"@rollup/plugin-inject": "5.0.5",
|
|
65
|
+
"@rollup/plugin-json": "6.1.0",
|
|
66
|
+
"@rollup/plugin-node-resolve": "16.0.0",
|
|
67
|
+
"@rollup/plugin-typescript": "12.1.2",
|
|
68
|
+
"@rollup/plugin-wasm": "6.2.2",
|
|
69
|
+
"@types/node": "20.3.1",
|
|
70
|
+
"@types/snarkjs": "0.7.9",
|
|
71
|
+
"commitlint": "19.4.1",
|
|
72
|
+
"globals": "15.14.0",
|
|
73
|
+
"husky": "9.1.5",
|
|
74
|
+
"lint-staged": "15.2.10",
|
|
75
|
+
"memfs": "4.17.0",
|
|
76
|
+
"rollup": "4.30.1",
|
|
77
|
+
"rollup-plugin-dts": "6.1.1",
|
|
78
|
+
"snarkjs": "0.7.5",
|
|
79
|
+
"sort-package-json": "2.10.1"
|
|
80
|
+
}
|
|
81
|
+
}
|
package/src/abi/ERC20.ts
ADDED
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
export const ERC20ABI = [
|
|
2
|
+
{
|
|
3
|
+
"constant": true,
|
|
4
|
+
"inputs": [],
|
|
5
|
+
"name": "name",
|
|
6
|
+
"outputs": [
|
|
7
|
+
{
|
|
8
|
+
"name": "",
|
|
9
|
+
"type": "string"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"payable": false,
|
|
13
|
+
"stateMutability": "view",
|
|
14
|
+
"type": "function"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"constant": false,
|
|
18
|
+
"inputs": [
|
|
19
|
+
{
|
|
20
|
+
"name": "_spender",
|
|
21
|
+
"type": "address"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "_value",
|
|
25
|
+
"type": "uint256"
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
"name": "approve",
|
|
29
|
+
"outputs": [
|
|
30
|
+
{
|
|
31
|
+
"name": "",
|
|
32
|
+
"type": "bool"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"payable": false,
|
|
36
|
+
"stateMutability": "nonpayable",
|
|
37
|
+
"type": "function"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"constant": true,
|
|
41
|
+
"inputs": [],
|
|
42
|
+
"name": "totalSupply",
|
|
43
|
+
"outputs": [
|
|
44
|
+
{
|
|
45
|
+
"name": "",
|
|
46
|
+
"type": "uint256"
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"payable": false,
|
|
50
|
+
"stateMutability": "view",
|
|
51
|
+
"type": "function"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"constant": false,
|
|
55
|
+
"inputs": [
|
|
56
|
+
{
|
|
57
|
+
"name": "_from",
|
|
58
|
+
"type": "address"
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"name": "_to",
|
|
62
|
+
"type": "address"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "_value",
|
|
66
|
+
"type": "uint256"
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"name": "transferFrom",
|
|
70
|
+
"outputs": [
|
|
71
|
+
{
|
|
72
|
+
"name": "",
|
|
73
|
+
"type": "bool"
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"payable": false,
|
|
77
|
+
"stateMutability": "nonpayable",
|
|
78
|
+
"type": "function"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"constant": true,
|
|
82
|
+
"inputs": [],
|
|
83
|
+
"name": "decimals",
|
|
84
|
+
"outputs": [
|
|
85
|
+
{
|
|
86
|
+
"name": "",
|
|
87
|
+
"type": "uint8"
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
"payable": false,
|
|
91
|
+
"stateMutability": "view",
|
|
92
|
+
"type": "function"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"constant": true,
|
|
96
|
+
"inputs": [
|
|
97
|
+
{
|
|
98
|
+
"name": "_owner",
|
|
99
|
+
"type": "address"
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
"name": "balanceOf",
|
|
103
|
+
"outputs": [
|
|
104
|
+
{
|
|
105
|
+
"name": "balance",
|
|
106
|
+
"type": "uint256"
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"payable": false,
|
|
110
|
+
"stateMutability": "view",
|
|
111
|
+
"type": "function"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"constant": true,
|
|
115
|
+
"inputs": [],
|
|
116
|
+
"name": "symbol",
|
|
117
|
+
"outputs": [
|
|
118
|
+
{
|
|
119
|
+
"name": "",
|
|
120
|
+
"type": "string"
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
"payable": false,
|
|
124
|
+
"stateMutability": "view",
|
|
125
|
+
"type": "function"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"constant": false,
|
|
129
|
+
"inputs": [
|
|
130
|
+
{
|
|
131
|
+
"name": "_to",
|
|
132
|
+
"type": "address"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"name": "_value",
|
|
136
|
+
"type": "uint256"
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
"name": "transfer",
|
|
140
|
+
"outputs": [
|
|
141
|
+
{
|
|
142
|
+
"name": "",
|
|
143
|
+
"type": "bool"
|
|
144
|
+
}
|
|
145
|
+
],
|
|
146
|
+
"payable": false,
|
|
147
|
+
"stateMutability": "nonpayable",
|
|
148
|
+
"type": "function"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"constant": true,
|
|
152
|
+
"inputs": [
|
|
153
|
+
{
|
|
154
|
+
"name": "_owner",
|
|
155
|
+
"type": "address"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
"name": "_spender",
|
|
159
|
+
"type": "address"
|
|
160
|
+
}
|
|
161
|
+
],
|
|
162
|
+
"name": "allowance",
|
|
163
|
+
"outputs": [
|
|
164
|
+
{
|
|
165
|
+
"name": "",
|
|
166
|
+
"type": "uint256"
|
|
167
|
+
}
|
|
168
|
+
],
|
|
169
|
+
"payable": false,
|
|
170
|
+
"stateMutability": "view",
|
|
171
|
+
"type": "function"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"payable": true,
|
|
175
|
+
"stateMutability": "payable",
|
|
176
|
+
"type": "fallback"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"anonymous": false,
|
|
180
|
+
"inputs": [
|
|
181
|
+
{
|
|
182
|
+
"indexed": true,
|
|
183
|
+
"name": "owner",
|
|
184
|
+
"type": "address"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"indexed": true,
|
|
188
|
+
"name": "spender",
|
|
189
|
+
"type": "address"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"indexed": false,
|
|
193
|
+
"name": "value",
|
|
194
|
+
"type": "uint256"
|
|
195
|
+
}
|
|
196
|
+
],
|
|
197
|
+
"name": "Approval",
|
|
198
|
+
"type": "event"
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"anonymous": false,
|
|
202
|
+
"inputs": [
|
|
203
|
+
{
|
|
204
|
+
"indexed": true,
|
|
205
|
+
"name": "from",
|
|
206
|
+
"type": "address"
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
"indexed": true,
|
|
210
|
+
"name": "to",
|
|
211
|
+
"type": "address"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"indexed": false,
|
|
215
|
+
"name": "value",
|
|
216
|
+
"type": "uint256"
|
|
217
|
+
}
|
|
218
|
+
],
|
|
219
|
+
"name": "Transfer",
|
|
220
|
+
"type": "event"
|
|
221
|
+
}
|
|
222
|
+
];
|