|
|
|
@ -1,9 +1,7 @@ |
|
|
|
|
const version = require('../../package.json').version |
|
|
|
|
import web3 from 'web3' |
|
|
|
|
import Web3 from 'web3' |
|
|
|
|
|
|
|
|
|
export class Misc { |
|
|
|
|
|
|
|
|
|
methods () { |
|
|
|
|
export function methods () { |
|
|
|
|
return { |
|
|
|
|
web3_clientVersion: this.web3_clientVersion.bind(this), |
|
|
|
|
eth_protocolVersion: this.eth_protocolVersion.bind(this), |
|
|
|
@ -18,45 +16,45 @@ export class Misc { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
web3_clientVersion (payload, cb) { |
|
|
|
|
export function web3_clientVersion (payload, cb) { |
|
|
|
|
cb(null, 'Remix Simulator/' + version) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
eth_protocolVersion (payload, cb) { |
|
|
|
|
export function eth_protocolVersion (payload, cb) { |
|
|
|
|
cb(null, '0x3f') |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
eth_syncing (payload, cb) { |
|
|
|
|
export function eth_syncing (payload, cb) { |
|
|
|
|
cb(null, false) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
eth_mining (payload, cb) { |
|
|
|
|
export function eth_mining (payload, cb) { |
|
|
|
|
// TODO: should depend on the state
|
|
|
|
|
cb(null, false) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
eth_hashrate (payload, cb) { |
|
|
|
|
export function eth_hashrate (payload, cb) { |
|
|
|
|
cb(null, '0x0') |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
web3_sha3 (payload, cb) { |
|
|
|
|
const str = payload.params[0] |
|
|
|
|
cb(null, web3.utils.sha3(str)) |
|
|
|
|
export function web3_sha3 (payload, cb) { |
|
|
|
|
const str: string = payload.params[0] |
|
|
|
|
cb(null, Web3.utils.sha3(str)) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
eth_getCompilers (payload, cb) { |
|
|
|
|
export function eth_getCompilers (payload, cb) { |
|
|
|
|
cb(null, []) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
eth_compileSolidity (payload, cb) { |
|
|
|
|
export function eth_compileSolidity (payload, cb) { |
|
|
|
|
cb(null, 'unsupported') |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
eth_compileLLL (payload, cb) { |
|
|
|
|
export function eth_compileLLL (payload, cb) { |
|
|
|
|
cb(null, 'unsupported') |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
eth_compileSerpent (payload, cb) { |
|
|
|
|
export function eth_compileSerpent (payload, cb) { |
|
|
|
|
cb(null, 'unsupported') |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|