aboutsummaryrefslogtreecommitdiffstats
path: root/internal
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-04-10 18:24:12 +0800
committerFelix Lange <fjl@users.noreply.github.com>2017-04-10 18:24:12 +0800
commitfeeccdf4ec1084b38dac112ff4f86809efd7c0e5 (patch)
tree90729d779c305fc5e56b5c50316f32bda94258b8 /internal
parentbfe5eb7f8c05c49563b0f1165f98d0a18f0fdbd4 (diff)
downloadgo-tangerine-feeccdf4ec1084b38dac112ff4f86809efd7c0e5.tar
go-tangerine-feeccdf4ec1084b38dac112ff4f86809efd7c0e5.tar.gz
go-tangerine-feeccdf4ec1084b38dac112ff4f86809efd7c0e5.tar.bz2
go-tangerine-feeccdf4ec1084b38dac112ff4f86809efd7c0e5.tar.lz
go-tangerine-feeccdf4ec1084b38dac112ff4f86809efd7c0e5.tar.xz
go-tangerine-feeccdf4ec1084b38dac112ff4f86809efd7c0e5.tar.zst
go-tangerine-feeccdf4ec1084b38dac112ff4f86809efd7c0e5.zip
consensus/clique: Proof of Authority (#3753)
This PR is a prototype implementation of plugable consensus engines and the Clique PoA protocol ethereum/EIPs#225
Diffstat (limited to 'internal')
-rw-r--r--internal/web3ext/web3ext.go41
1 files changed, 41 insertions, 0 deletions
diff --git a/internal/web3ext/web3ext.go b/internal/web3ext/web3ext.go
index 4a8425d5c..dd325100f 100644
--- a/internal/web3ext/web3ext.go
+++ b/internal/web3ext/web3ext.go
@@ -20,6 +20,7 @@ package web3ext
var Modules = map[string]string{
"admin": Admin_JS,
"chequebook": Chequebook_JS,
+ "clique": Clique_JS,
"debug": Debug_JS,
"eth": Eth_JS,
"miner": Miner_JS,
@@ -29,8 +30,10 @@ var Modules = map[string]string{
"shh": Shh_JS,
"swarmfs": SWARMFS_JS,
"txpool": TxPool_JS,
+
}
+
const Chequebook_JS = `
web3._extend({
property: 'chequebook',
@@ -63,6 +66,44 @@ web3._extend({
});
`
+const Clique_JS = `
+web3._extend({
+ property: 'clique',
+ methods:
+ [
+ new web3._extend.Method({
+ name: 'getSnapshot',
+ call: 'clique_getSnapshot',
+ params: 1,
+ inputFormatter: [null]
+ }),
+ new web3._extend.Method({
+ name: 'getSigners',
+ call: 'clique_getSigners',
+ params: 1,
+ inputFormatter: [null]
+ }),
+ new web3._extend.Method({
+ name: 'propose',
+ call: 'clique_propose',
+ params: 2
+ }),
+ new web3._extend.Method({
+ name: 'discard',
+ call: 'clique_discard',
+ params: 1
+ })
+ ],
+ properties:
+ [
+ new web3._extend.Property({
+ name: 'proposals',
+ getter: 'clique_proposals'
+ }),
+ ]
+});
+`
+
const Admin_JS = `
web3._extend({
property: 'admin',