aboutsummaryrefslogtreecommitdiffstats
path: root/RPCTests/scripts
diff options
context:
space:
mode:
authorDimitry <dimitry@ethdev.com>2017-01-25 05:31:44 +0800
committerDimitry <dimitry@ethdev.com>2017-01-25 05:31:44 +0800
commitbc8ad7422d32a940bab194173083a684adcc2706 (patch)
treeb951c685b5c44ab7ce5618b275da19dbbf8ec157 /RPCTests/scripts
parent3035858d203314f3e83c4e898a7c3e78c1d287fa (diff)
downloadtangerine-tests-bc8ad7422d32a940bab194173083a684adcc2706.tar
tangerine-tests-bc8ad7422d32a940bab194173083a684adcc2706.tar.gz
tangerine-tests-bc8ad7422d32a940bab194173083a684adcc2706.tar.bz2
tangerine-tests-bc8ad7422d32a940bab194173083a684adcc2706.tar.lz
tangerine-tests-bc8ad7422d32a940bab194173083a684adcc2706.tar.xz
tangerine-tests-bc8ad7422d32a940bab194173083a684adcc2706.tar.zst
tangerine-tests-bc8ad7422d32a940bab194173083a684adcc2706.zip
RPC tests
Diffstat (limited to 'RPCTests/scripts')
-rw-r--r--RPCTests/scripts/genesis.json34
-rw-r--r--RPCTests/scripts/getNewAccount.js3
-rw-r--r--RPCTests/scripts/sleep.js4
3 files changed, 41 insertions, 0 deletions
diff --git a/RPCTests/scripts/genesis.json b/RPCTests/scripts/genesis.json
new file mode 100644
index 000000000..e4545e6d2
--- /dev/null
+++ b/RPCTests/scripts/genesis.json
@@ -0,0 +1,34 @@
+{
+ "sealEngine": "NoProof",
+ "params": {
+ "accountStartNonce": "0x00",
+ "frontierCompatibilityModeLimit": "0xffffffff",
+ "maximumExtraDataSize": "0x0400",
+ "tieBreakingGas": false,
+ "minGasLimit": "125000",
+ "gasLimitBoundDivisor": "0x0400",
+ "minimumDifficulty": "0x020000",
+ "difficultyBoundDivisor": "0x0800",
+ "durationLimit": "0x08",
+ "blockReward": "0x14D1120D7B160000",
+ "registrar": "5e70c0bbcd5636e0f9f9316e9f8633feb64d4050",
+ "networkID" : "0x25"
+ },
+ "genesis": {
+ "nonce": "0x000000000000002a",
+ "difficulty": "0x2000",
+ "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
+ "author": "0x0000000000000000000000000000000000000000",
+ "timestamp": "0x00",
+ "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
+ "extraData": "0x",
+ "gasLimit": "0x2fefd8"
+ },
+ "accounts": {
+ "0000000000000000000000000000000000000001": { "wei": "1", "precompiled": { "name": "ecrecover", "linear": { "base": 3000, "word": 0 } } },
+ "0000000000000000000000000000000000000002": { "wei": "1", "precompiled": { "name": "sha256", "linear": { "base": 60, "word": 12 } } },
+ "0000000000000000000000000000000000000003": { "wei": "1", "precompiled": { "name": "ripemd160", "linear": { "base": 600, "word": 120 } } },
+ "0000000000000000000000000000000000000004": { "wei": "1", "precompiled": { "name": "identity", "linear": { "base": 15, "word": 3 } } },
+ "[ADDRESS]": { "wei": "100000000000000000000" }
+ }
+}
diff --git a/RPCTests/scripts/getNewAccount.js b/RPCTests/scripts/getNewAccount.js
new file mode 100644
index 000000000..eceacc23f
--- /dev/null
+++ b/RPCTests/scripts/getNewAccount.js
@@ -0,0 +1,3 @@
+sleep = require('./modules/sleep.js');
+var result;
+web3.personal.newAccount("123", function(err,res){result = res; console.log(res);})
diff --git a/RPCTests/scripts/sleep.js b/RPCTests/scripts/sleep.js
new file mode 100644
index 000000000..8308c93d3
--- /dev/null
+++ b/RPCTests/scripts/sleep.js
@@ -0,0 +1,4 @@
+function sleep(ms) {
+ return new Promise(resolve => setTimeout(resolve, ms));
+}
+module.exports = sleep