remove console.log

pull/1655/head
yann300 3 years ago
parent fb8393b365
commit a8cccdd043
  1. 1
      libs/remix-debug/test/debugger.ts
  2. 3
      libs/remix-debug/test/decoder/stateTests/mapping.ts
  3. 8
      libs/remix-debug/test/vmCall.ts

@ -263,7 +263,6 @@ function testDebugging (debugManager) {
debugManager.decodeLocalsAt(327, location, (error, decodedlocals) => { debugManager.decodeLocalsAt(327, location, (error, decodedlocals) => {
if (error) return t.end(error) if (error) return t.end(error)
const res = deepequal(decodedlocals, tested) const res = deepequal(decodedlocals, tested)
console.log(res)
t.ok(res, `test if locals does match. expected: ${JSON.stringify(tested)} - current: ${JSON.stringify(decodedlocals)}`) t.ok(res, `test if locals does match. expected: ${JSON.stringify(tested)} - current: ${JSON.stringify(decodedlocals)}`)
}) })
} catch (error) { } catch (error) {

@ -8,12 +8,10 @@ import { StorageViewer } from '../../../src/storage/storageViewer'
import { Address, bufferToHex } from 'ethereumjs-util' import { Address, bufferToHex } from 'ethereumjs-util'
module.exports = async function testMappingStorage (st, cb) { module.exports = async function testMappingStorage (st, cb) {
console.log('start testMappingStorage')
var mappingStorage = require('../contracts/mappingStorage') var mappingStorage = require('../contracts/mappingStorage')
var privateKey = Buffer.from('503f38a9c967ed597e47fe25643985f032b072db8075426a92110f82df48dfcb', 'hex') var privateKey = Buffer.from('503f38a9c967ed597e47fe25643985f032b072db8075426a92110f82df48dfcb', 'hex')
var output = compile(compilerInput(mappingStorage.contract)) var output = compile(compilerInput(mappingStorage.contract))
output = JSON.parse(output); output = JSON.parse(output);
console.log('BYTECODE', output.contracts['test.sol']['SimpleMappingState'].evm.bytecode.object);
const web3 = await (vmCall as any).getWeb3(); const web3 = await (vmCall as any).getWeb3();
(vmCall as any).sendTx(web3, {nonce: 0, privateKey: privateKey}, null, 0, output.contracts['test.sol']['SimpleMappingState'].evm.bytecode.object, function (error, hash) { (vmCall as any).sendTx(web3, {nonce: 0, privateKey: privateKey}, null, 0, output.contracts['test.sol']['SimpleMappingState'].evm.bytecode.object, function (error, hash) {
if (error) { if (error) {
@ -26,7 +24,6 @@ module.exports = async function testMappingStorage (st, cb) {
st.end(error) st.end(error)
} else { } else {
// const storage = await this.vm.stateManager.dumpStorage(data.to) // const storage = await this.vm.stateManager.dumpStorage(data.to)
console.log(tx);
// (vmCall as any).web3().eth.getCode(tx.contractAddress).then((code) => console.log('code:', code)) // (vmCall as any).web3().eth.getCode(tx.contractAddress).then((code) => console.log('code:', code))
// (vmCall as any).web3().debug.traceTransaction(hash).then((code) => console.log('trace:', code)) // (vmCall as any).web3().debug.traceTransaction(hash).then((code) => console.log('trace:', code))
testMapping(st, privateKey, tx.contractAddress, output, web3, cb) testMapping(st, privateKey, tx.contractAddress, output, web3, cb)

@ -24,13 +24,6 @@ async function getWeb3 () {
async function sendTx (web3, from, to, value, data, cb) { async function sendTx (web3, from, to, value, data, cb) {
try { try {
cb = cb || (() => {}) cb = cb || (() => {})
console.log('TX', {
from: utileth.Address.fromPrivateKey(from.privateKey).toString('hex'),
to,
value,
data,
gas: 7000000
})
const receipt = await web3.eth.sendTransaction({ const receipt = await web3.eth.sendTransaction({
from: utileth.Address.fromPrivateKey(from.privateKey).toString('hex'), from: utileth.Address.fromPrivateKey(from.privateKey).toString('hex'),
to, to,
@ -38,7 +31,6 @@ async function sendTx (web3, from, to, value, data, cb) {
data, data,
gas: 7000000 gas: 7000000
}) })
console.log('end tx')
cb(null, receipt.transactionHash) cb(null, receipt.transactionHash)
return receipt.transactionHash return receipt.transactionHash
} catch (e) { } catch (e) {

Loading…
Cancel
Save