github.com/devkononov/go-func@v0.0.0-20190722084534-f14392d369a7/internal/web3ext/web3ext.go (about)

     1  // Copyright 2015 The go-ethereum Authors
     2  // This file is part of the go-ethereum library.
     3  //
     4  // The go-ethereum library is free software: you can redistribute it and/or modify
     5  // it under the terms of the GNU Lesser General Public License as published by
     6  // the Free Software Foundation, either version 3 of the License, or
     7  // (at your option) any later version.
     8  //
     9  // The go-ethereum library is distributed in the hope that it will be useful,
    10  // but WITHOUT ANY WARRANTY; without even the implied warranty of
    11  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    12  // GNU Lesser General Public License for more details.
    13  //
    14  // You should have received a copy of the GNU Lesser General Public License
    15  // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
    16  
    17  // package web3ext contains geth specific web3.js extensions.
    18  package web3ext
    19  
    20  var Modules = map[string]string{
    21  	"accounting": AccountingJs,
    22  	"admin":      AdminJs,
    23  	"chequebook": ChequebookJs,
    24  	"clique":     CliqueJs,
    25  	"ethash":     EthashJs,
    26  	"debug":      DebugJs,
    27  	"eth":        EthJs,
    28  	"miner":      MinerJs,
    29  	"net":        NetJs,
    30  	"personal":   PersonalJs,
    31  	"rpc":        RpcJs,
    32  	"shh":        ShhJs,
    33  	"swarmfs":    SwarmfsJs,
    34  	"txpool":     TxpoolJs,
    35  	"les":        LESJs,
    36  }
    37  
    38  const ChequebookJs = `
    39  web3._extend({
    40  	property: 'chequebook',
    41  	methods: [
    42  		new web3._extend.Method({
    43  			name: 'deposit',
    44  			call: 'chequebook_deposit',
    45  			params: 1,
    46  			inputFormatter: [null]
    47  		}),
    48  		new web3._extend.Property({
    49  			name: 'balance',
    50  			getter: 'chequebook_balance',
    51  			outputFormatter: web3._extend.utils.toDecimal
    52  		}),
    53  		new web3._extend.Method({
    54  			name: 'cash',
    55  			call: 'chequebook_cash',
    56  			params: 1,
    57  			inputFormatter: [null]
    58  		}),
    59  		new web3._extend.Method({
    60  			name: 'issue',
    61  			call: 'chequebook_issue',
    62  			params: 2,
    63  			inputFormatter: [null, null]
    64  		}),
    65  	]
    66  });
    67  `
    68  
    69  const CliqueJs = `
    70  web3._extend({
    71  	property: 'clique',
    72  	methods: [
    73  		new web3._extend.Method({
    74  			name: 'getSnapshot',
    75  			call: 'clique_getSnapshot',
    76  			params: 1,
    77  			inputFormatter: [null]
    78  		}),
    79  		new web3._extend.Method({
    80  			name: 'getSnapshotAtHash',
    81  			call: 'clique_getSnapshotAtHash',
    82  			params: 1
    83  		}),
    84  		new web3._extend.Method({
    85  			name: 'getSigners',
    86  			call: 'clique_getSigners',
    87  			params: 1,
    88  			inputFormatter: [null]
    89  		}),
    90  		new web3._extend.Method({
    91  			name: 'getSignersAtHash',
    92  			call: 'clique_getSignersAtHash',
    93  			params: 1
    94  		}),
    95  		new web3._extend.Method({
    96  			name: 'propose',
    97  			call: 'clique_propose',
    98  			params: 2
    99  		}),
   100  		new web3._extend.Method({
   101  			name: 'discard',
   102  			call: 'clique_discard',
   103  			params: 1
   104  		}),
   105  	],
   106  	properties: [
   107  		new web3._extend.Property({
   108  			name: 'proposals',
   109  			getter: 'clique_proposals'
   110  		}),
   111  	]
   112  });
   113  `
   114  
   115  const EthashJs = `
   116  web3._extend({
   117  	property: 'ethash',
   118  	methods: [
   119  		new web3._extend.Method({
   120  			name: 'getWork',
   121  			call: 'ethash_getWork',
   122  			params: 0
   123  		}),
   124  		new web3._extend.Method({
   125  			name: 'getHashrate',
   126  			call: 'ethash_getHashrate',
   127  			params: 0
   128  		}),
   129  		new web3._extend.Method({
   130  			name: 'submitWork',
   131  			call: 'ethash_submitWork',
   132  			params: 3,
   133  		}),
   134  		new web3._extend.Method({
   135  			name: 'submitHashRate',
   136  			call: 'ethash_submitHashRate',
   137  			params: 2,
   138  		}),
   139  	]
   140  });
   141  `
   142  
   143  const AdminJs = `
   144  web3._extend({
   145  	property: 'admin',
   146  	methods: [
   147  		new web3._extend.Method({
   148  			name: 'addPeer',
   149  			call: 'admin_addPeer',
   150  			params: 1
   151  		}),
   152  		new web3._extend.Method({
   153  			name: 'removePeer',
   154  			call: 'admin_removePeer',
   155  			params: 1
   156  		}),
   157  		new web3._extend.Method({
   158  			name: 'addTrustedPeer',
   159  			call: 'admin_addTrustedPeer',
   160  			params: 1
   161  		}),
   162  		new web3._extend.Method({
   163  			name: 'removeTrustedPeer',
   164  			call: 'admin_removeTrustedPeer',
   165  			params: 1
   166  		}),
   167  		new web3._extend.Method({
   168  			name: 'exportChain',
   169  			call: 'admin_exportChain',
   170  			params: 1,
   171  			inputFormatter: [null]
   172  		}),
   173  		new web3._extend.Method({
   174  			name: 'importChain',
   175  			call: 'admin_importChain',
   176  			params: 1
   177  		}),
   178  		new web3._extend.Method({
   179  			name: 'sleepBlocks',
   180  			call: 'admin_sleepBlocks',
   181  			params: 2
   182  		}),
   183  		new web3._extend.Method({
   184  			name: 'startRPC',
   185  			call: 'admin_startRPC',
   186  			params: 4,
   187  			inputFormatter: [null, null, null, null]
   188  		}),
   189  		new web3._extend.Method({
   190  			name: 'stopRPC',
   191  			call: 'admin_stopRPC'
   192  		}),
   193  		new web3._extend.Method({
   194  			name: 'startWS',
   195  			call: 'admin_startWS',
   196  			params: 4,
   197  			inputFormatter: [null, null, null, null]
   198  		}),
   199  		new web3._extend.Method({
   200  			name: 'stopWS',
   201  			call: 'admin_stopWS'
   202  		}),
   203  	],
   204  	properties: [
   205  		new web3._extend.Property({
   206  			name: 'nodeInfo',
   207  			getter: 'admin_nodeInfo'
   208  		}),
   209  		new web3._extend.Property({
   210  			name: 'peers',
   211  			getter: 'admin_peers'
   212  		}),
   213  		new web3._extend.Property({
   214  			name: 'datadir',
   215  			getter: 'admin_datadir'
   216  		}),
   217  	]
   218  });
   219  `
   220  
   221  const DebugJs = `
   222  web3._extend({
   223  	property: 'debug',
   224  	methods: [
   225  		new web3._extend.Method({
   226  			name: 'printBlock',
   227  			call: 'debug_printBlock',
   228  			params: 1
   229  		}),
   230  		new web3._extend.Method({
   231  			name: 'getBlockRlp',
   232  			call: 'debug_getBlockRlp',
   233  			params: 1
   234  		}),
   235  		new web3._extend.Method({
   236  			name: 'testSignCliqueBlock',
   237  			call: 'debug_testSignCliqueBlock',
   238  			params: 2,
   239  			inputFormatters: [web3._extend.formatters.inputAddressFormatter, null],
   240  		}),
   241  		new web3._extend.Method({
   242  			name: 'setHead',
   243  			call: 'debug_setHead',
   244  			params: 1
   245  		}),
   246  		new web3._extend.Method({
   247  			name: 'seedHash',
   248  			call: 'debug_seedHash',
   249  			params: 1
   250  		}),
   251  		new web3._extend.Method({
   252  			name: 'dumpBlock',
   253  			call: 'debug_dumpBlock',
   254  			params: 1
   255  		}),
   256  		new web3._extend.Method({
   257  			name: 'chaindbProperty',
   258  			call: 'debug_chaindbProperty',
   259  			params: 1,
   260  			outputFormatter: console.log
   261  		}),
   262  		new web3._extend.Method({
   263  			name: 'chaindbCompact',
   264  			call: 'debug_chaindbCompact',
   265  		}),
   266  		new web3._extend.Method({
   267  			name: 'verbosity',
   268  			call: 'debug_verbosity',
   269  			params: 1
   270  		}),
   271  		new web3._extend.Method({
   272  			name: 'vmodule',
   273  			call: 'debug_vmodule',
   274  			params: 1
   275  		}),
   276  		new web3._extend.Method({
   277  			name: 'backtraceAt',
   278  			call: 'debug_backtraceAt',
   279  			params: 1,
   280  		}),
   281  		new web3._extend.Method({
   282  			name: 'stacks',
   283  			call: 'debug_stacks',
   284  			params: 0,
   285  			outputFormatter: console.log
   286  		}),
   287  		new web3._extend.Method({
   288  			name: 'freeOSMemory',
   289  			call: 'debug_freeOSMemory',
   290  			params: 0,
   291  		}),
   292  		new web3._extend.Method({
   293  			name: 'setGCPercent',
   294  			call: 'debug_setGCPercent',
   295  			params: 1,
   296  		}),
   297  		new web3._extend.Method({
   298  			name: 'memStats',
   299  			call: 'debug_memStats',
   300  			params: 0,
   301  		}),
   302  		new web3._extend.Method({
   303  			name: 'gcStats',
   304  			call: 'debug_gcStats',
   305  			params: 0,
   306  		}),
   307  		new web3._extend.Method({
   308  			name: 'cpuProfile',
   309  			call: 'debug_cpuProfile',
   310  			params: 2
   311  		}),
   312  		new web3._extend.Method({
   313  			name: 'startCPUProfile',
   314  			call: 'debug_startCPUProfile',
   315  			params: 1
   316  		}),
   317  		new web3._extend.Method({
   318  			name: 'stopCPUProfile',
   319  			call: 'debug_stopCPUProfile',
   320  			params: 0
   321  		}),
   322  		new web3._extend.Method({
   323  			name: 'goTrace',
   324  			call: 'debug_goTrace',
   325  			params: 2
   326  		}),
   327  		new web3._extend.Method({
   328  			name: 'startGoTrace',
   329  			call: 'debug_startGoTrace',
   330  			params: 1
   331  		}),
   332  		new web3._extend.Method({
   333  			name: 'stopGoTrace',
   334  			call: 'debug_stopGoTrace',
   335  			params: 0
   336  		}),
   337  		new web3._extend.Method({
   338  			name: 'blockProfile',
   339  			call: 'debug_blockProfile',
   340  			params: 2
   341  		}),
   342  		new web3._extend.Method({
   343  			name: 'setBlockProfileRate',
   344  			call: 'debug_setBlockProfileRate',
   345  			params: 1
   346  		}),
   347  		new web3._extend.Method({
   348  			name: 'writeBlockProfile',
   349  			call: 'debug_writeBlockProfile',
   350  			params: 1
   351  		}),
   352  		new web3._extend.Method({
   353  			name: 'mutexProfile',
   354  			call: 'debug_mutexProfile',
   355  			params: 2
   356  		}),
   357  		new web3._extend.Method({
   358  			name: 'setMutexProfileFraction',
   359  			call: 'debug_setMutexProfileFraction',
   360  			params: 1
   361  		}),
   362  		new web3._extend.Method({
   363  			name: 'writeMutexProfile',
   364  			call: 'debug_writeMutexProfile',
   365  			params: 1
   366  		}),
   367  		new web3._extend.Method({
   368  			name: 'writeMemProfile',
   369  			call: 'debug_writeMemProfile',
   370  			params: 1
   371  		}),
   372  		new web3._extend.Method({
   373  			name: 'traceBlock',
   374  			call: 'debug_traceBlock',
   375  			params: 2,
   376  			inputFormatter: [null, null]
   377  		}),
   378  		new web3._extend.Method({
   379  			name: 'traceBlockFromFile',
   380  			call: 'debug_traceBlockFromFile',
   381  			params: 2,
   382  			inputFormatter: [null, null]
   383  		}),
   384  		new web3._extend.Method({
   385  			name: 'traceBadBlock',
   386  			call: 'debug_traceBadBlock',
   387  			params: 1,
   388  			inputFormatter: [null]
   389  		}),
   390  		new web3._extend.Method({
   391  			name: 'standardTraceBadBlockToFile',
   392  			call: 'debug_standardTraceBadBlockToFile',
   393  			params: 2,
   394  			inputFormatter: [null, null]
   395  		}),
   396  		new web3._extend.Method({
   397  			name: 'standardTraceBlockToFile',
   398  			call: 'debug_standardTraceBlockToFile',
   399  			params: 2,
   400  			inputFormatter: [null, null]
   401  		}),
   402  		new web3._extend.Method({
   403  			name: 'traceBlockByNumber',
   404  			call: 'debug_traceBlockByNumber',
   405  			params: 2,
   406  			inputFormatter: [null, null]
   407  		}),
   408  		new web3._extend.Method({
   409  			name: 'traceBlockByHash',
   410  			call: 'debug_traceBlockByHash',
   411  			params: 2,
   412  			inputFormatter: [null, null]
   413  		}),
   414  		new web3._extend.Method({
   415  			name: 'traceTransaction',
   416  			call: 'debug_traceTransaction',
   417  			params: 2,
   418  			inputFormatter: [null, null]
   419  		}),
   420  		new web3._extend.Method({
   421  			name: 'preimage',
   422  			call: 'debug_preimage',
   423  			params: 1,
   424  			inputFormatter: [null]
   425  		}),
   426  		new web3._extend.Method({
   427  			name: 'getBadBlocks',
   428  			call: 'debug_getBadBlocks',
   429  			params: 0,
   430  		}),
   431  		new web3._extend.Method({
   432  			name: 'storageRangeAt',
   433  			call: 'debug_storageRangeAt',
   434  			params: 5,
   435  		}),
   436  		new web3._extend.Method({
   437  			name: 'getModifiedAccountsByNumber',
   438  			call: 'debug_getModifiedAccountsByNumber',
   439  			params: 2,
   440  			inputFormatter: [null, null],
   441  		}),
   442  		new web3._extend.Method({
   443  			name: 'getModifiedAccountsByHash',
   444  			call: 'debug_getModifiedAccountsByHash',
   445  			params: 2,
   446  			inputFormatter:[null, null],
   447  		}),
   448  	],
   449  	properties: []
   450  });
   451  `
   452  
   453  const EthJs = `
   454  web3._extend({
   455  	property: 'eth',
   456  	methods: [
   457  		new web3._extend.Method({
   458  			name: 'chainId',
   459  			call: 'eth_chainId',
   460  			params: 0
   461  		}),
   462  		new web3._extend.Method({
   463  			name: 'sign',
   464  			call: 'eth_sign',
   465  			params: 2,
   466  			inputFormatter: [web3._extend.formatters.inputAddressFormatter, null]
   467  		}),
   468  		new web3._extend.Method({
   469  			name: 'resend',
   470  			call: 'eth_resend',
   471  			params: 3,
   472  			inputFormatter: [web3._extend.formatters.inputTransactionFormatter, web3._extend.utils.fromDecimal, web3._extend.utils.fromDecimal]
   473  		}),
   474  		new web3._extend.Method({
   475  			name: 'signTransaction',
   476  			call: 'eth_signTransaction',
   477  			params: 1,
   478  			inputFormatter: [web3._extend.formatters.inputTransactionFormatter]
   479  		}),
   480  		new web3._extend.Method({
   481  			name: 'submitTransaction',
   482  			call: 'eth_submitTransaction',
   483  			params: 1,
   484  			inputFormatter: [web3._extend.formatters.inputTransactionFormatter]
   485  		}),
   486  		new web3._extend.Method({
   487  			name: 'getRawTransaction',
   488  			call: 'eth_getRawTransactionByHash',
   489  			params: 1
   490  		}),
   491  		new web3._extend.Method({
   492  			name: 'getRawTransactionFromBlock',
   493  			call: function(args) {
   494  				return (web3._extend.utils.isString(args[0]) && args[0].indexOf('0x') === 0) ? 'eth_getRawTransactionByBlockHashAndIndex' : 'eth_getRawTransactionByBlockNumberAndIndex';
   495  			},
   496  			params: 2,
   497  			inputFormatter: [web3._extend.formatters.inputBlockNumberFormatter, web3._extend.utils.toHex]
   498  		}),
   499  		new web3._extend.Method({
   500  			name: 'getProof',
   501  			call: 'eth_getProof',
   502  			params: 3,
   503  			inputFormatter: [web3._extend.formatters.inputAddressFormatter, null, web3._extend.formatters.inputBlockNumberFormatter]
   504  		}),
   505  	],
   506  	properties: [
   507  		new web3._extend.Property({
   508  			name: 'pendingTransactions',
   509  			getter: 'eth_pendingTransactions',
   510  			outputFormatter: function(txs) {
   511  				var formatted = [];
   512  				for (var i = 0; i < txs.length; i++) {
   513  					formatted.push(web3._extend.formatters.outputTransactionFormatter(txs[i]));
   514  					formatted[i].blockHash = null;
   515  				}
   516  				return formatted;
   517  			}
   518  		}),
   519  	]
   520  });
   521  `
   522  
   523  const MinerJs = `
   524  web3._extend({
   525  	property: 'miner',
   526  	methods: [
   527  		new web3._extend.Method({
   528  			name: 'start',
   529  			call: 'miner_start',
   530  			params: 1,
   531  			inputFormatter: [null]
   532  		}),
   533  		new web3._extend.Method({
   534  			name: 'stop',
   535  			call: 'miner_stop'
   536  		}),
   537  		new web3._extend.Method({
   538  			name: 'setEtherbase',
   539  			call: 'miner_setEtherbase',
   540  			params: 1,
   541  			inputFormatter: [web3._extend.formatters.inputAddressFormatter]
   542  		}),
   543  		new web3._extend.Method({
   544  			name: 'setExtra',
   545  			call: 'miner_setExtra',
   546  			params: 1
   547  		}),
   548  		new web3._extend.Method({
   549  			name: 'setGasPrice',
   550  			call: 'miner_setGasPrice',
   551  			params: 1,
   552  			inputFormatter: [web3._extend.utils.fromDecimal]
   553  		}),
   554  		new web3._extend.Method({
   555  			name: 'setRecommitInterval',
   556  			call: 'miner_setRecommitInterval',
   557  			params: 1,
   558  		}),
   559  		new web3._extend.Method({
   560  			name: 'getHashrate',
   561  			call: 'miner_getHashrate'
   562  		}),
   563  	],
   564  	properties: []
   565  });
   566  `
   567  
   568  const NetJs = `
   569  web3._extend({
   570  	property: 'net',
   571  	methods: [],
   572  	properties: [
   573  		new web3._extend.Property({
   574  			name: 'version',
   575  			getter: 'net_version'
   576  		}),
   577  	]
   578  });
   579  `
   580  
   581  const PersonalJs = `
   582  web3._extend({
   583  	property: 'personal',
   584  	methods: [
   585  		new web3._extend.Method({
   586  			name: 'importRawKey',
   587  			call: 'personal_importRawKey',
   588  			params: 2
   589  		}),
   590  		new web3._extend.Method({
   591  			name: 'sign',
   592  			call: 'personal_sign',
   593  			params: 3,
   594  			inputFormatter: [null, web3._extend.formatters.inputAddressFormatter, null]
   595  		}),
   596  		new web3._extend.Method({
   597  			name: 'ecRecover',
   598  			call: 'personal_ecRecover',
   599  			params: 2
   600  		}),
   601  		new web3._extend.Method({
   602  			name: 'openWallet',
   603  			call: 'personal_openWallet',
   604  			params: 2
   605  		}),
   606  		new web3._extend.Method({
   607  			name: 'deriveAccount',
   608  			call: 'personal_deriveAccount',
   609  			params: 3
   610  		}),
   611  		new web3._extend.Method({
   612  			name: 'signTransaction',
   613  			call: 'personal_signTransaction',
   614  			params: 2,
   615  			inputFormatter: [web3._extend.formatters.inputTransactionFormatter, null]
   616  		}),
   617  		new web3._extend.Method({
   618  			name: 'unpair',
   619  			call: 'personal_unpair',
   620  			params: 2
   621  		}),
   622  		new web3._extend.Method({
   623  			name: 'initializeWallet',
   624  			call: 'personal_initializeWallet',
   625  			params: 1
   626  		})
   627  	],
   628  	properties: [
   629  		new web3._extend.Property({
   630  			name: 'listWallets',
   631  			getter: 'personal_listWallets'
   632  		}),
   633  	]
   634  })
   635  `
   636  
   637  const RpcJs = `
   638  web3._extend({
   639  	property: 'rpc',
   640  	methods: [],
   641  	properties: [
   642  		new web3._extend.Property({
   643  			name: 'modules',
   644  			getter: 'rpc_modules'
   645  		}),
   646  	]
   647  });
   648  `
   649  
   650  const ShhJs = `
   651  web3._extend({
   652  	property: 'shh',
   653  	methods: [
   654  	],
   655  	properties:
   656  	[
   657  		new web3._extend.Property({
   658  			name: 'version',
   659  			getter: 'shh_version',
   660  			outputFormatter: web3._extend.utils.toDecimal
   661  		}),
   662  		new web3._extend.Property({
   663  			name: 'info',
   664  			getter: 'shh_info'
   665  		}),
   666  	]
   667  });
   668  `
   669  
   670  const SwarmfsJs = `
   671  web3._extend({
   672  	property: 'swarmfs',
   673  	methods:
   674  	[
   675  		new web3._extend.Method({
   676  			name: 'mount',
   677  			call: 'swarmfs_mount',
   678  			params: 2
   679  		}),
   680  		new web3._extend.Method({
   681  			name: 'unmount',
   682  			call: 'swarmfs_unmount',
   683  			params: 1
   684  		}),
   685  		new web3._extend.Method({
   686  			name: 'listmounts',
   687  			call: 'swarmfs_listmounts',
   688  			params: 0
   689  		}),
   690  	]
   691  });
   692  `
   693  
   694  const TxpoolJs = `
   695  web3._extend({
   696  	property: 'txpool',
   697  	methods: [],
   698  	properties:
   699  	[
   700  		new web3._extend.Property({
   701  			name: 'content',
   702  			getter: 'txpool_content'
   703  		}),
   704  		new web3._extend.Property({
   705  			name: 'inspect',
   706  			getter: 'txpool_inspect'
   707  		}),
   708  		new web3._extend.Property({
   709  			name: 'status',
   710  			getter: 'txpool_status',
   711  			outputFormatter: function(status) {
   712  				status.pending = web3._extend.utils.toDecimal(status.pending);
   713  				status.queued = web3._extend.utils.toDecimal(status.queued);
   714  				return status;
   715  			}
   716  		}),
   717  	]
   718  });
   719  `
   720  
   721  const AccountingJs = `
   722  web3._extend({
   723  	property: 'accounting',
   724  	methods: [
   725  		new web3._extend.Property({
   726  			name: 'balance',
   727  			getter: 'account_balance'
   728  		}),
   729  		new web3._extend.Property({
   730  			name: 'balanceCredit',
   731  			getter: 'account_balanceCredit'
   732  		}),
   733  		new web3._extend.Property({
   734  			name: 'balanceDebit',
   735  			getter: 'account_balanceDebit'
   736  		}),
   737  		new web3._extend.Property({
   738  			name: 'bytesCredit',
   739  			getter: 'account_bytesCredit'
   740  		}),
   741  		new web3._extend.Property({
   742  			name: 'bytesDebit',
   743  			getter: 'account_bytesDebit'
   744  		}),
   745  		new web3._extend.Property({
   746  			name: 'msgCredit',
   747  			getter: 'account_msgCredit'
   748  		}),
   749  		new web3._extend.Property({
   750  			name: 'msgDebit',
   751  			getter: 'account_msgDebit'
   752  		}),
   753  		new web3._extend.Property({
   754  			name: 'peerDrops',
   755  			getter: 'account_peerDrops'
   756  		}),
   757  		new web3._extend.Property({
   758  			name: 'selfDrops',
   759  			getter: 'account_selfDrops'
   760  		}),
   761  	]
   762  });
   763  `
   764  
   765  const LESJs = `
   766  web3._extend({
   767  	property: 'les',
   768  	methods: 
   769  	[
   770  		new web3._extend.Method({
   771  			name: 'getCheckpoint',
   772  			call: 'les_getCheckpoint',
   773  			params: 1
   774  		}),
   775  	],
   776  	properties: 
   777  	[
   778  		new web3._extend.Property({
   779  			name: 'latestCheckpoint',
   780  			getter: 'les_latestCheckpoint'
   781  		}),
   782  		new web3._extend.Property({
   783  			name: 'checkpointContractAddress',
   784  			getter: 'les_getCheckpointContractAddress'
   785  		}),
   786  	]
   787  });
   788  `