Home

Is it possible to test contract with bytecode only?

Is it possible to test contract with bytecode only? ##background I only have the bytecode of the contract, and bytecode-level constuctor for the contract. I want to deploy the contract to my local private chain and invoke some methods to run my test logic on the contract. At first, I was thinking about geth, and have done a lot of preperation. ...

Read more

Truffle Test| a bug?

Description Depositing one token without transferFrom into EtherDelta: The contract of EtherDelta: /** *Submitted for verification at Etherscan.io on 2016-08-30 */ //last compiled with soljson-v0.3.6-2016-08-29-b8060c5.js contract SafeMath { //internals function safeMul(uint a, uint b) internal returns (uint) { uint c = a * b; ...

Read more

ganache-cli problem

Truffle|xxx Token has not been deployed to detected network (network/artifact mismatch) Description I’m testing one contract today with truffle console, and at the beginning I was running truffle test to test the contract. However, for some reason, I shifted to truffle console method. And I got the error above. Solutions on line I looked up many...

Read more

Truffle version

Truffle version Background Met with one problem today, when using truffle, there are some conflicts with the solc version. Migration.sol pragma solidity >=0.4.21 <0.6.0; Contract_code.sol pragma solidity 0.4.19; solc version 0.4.24 truffle-config.js module.exports = {networks: {development: {host: "127.0.0.1", port: 8545, network_i...

Read more

Expecting property name enclosed in double quotes

Expecting property name enclosed in double quotes Background In this project, I have to dump json file and open this json file in a loop. At first, I looked up some blogs on the internet, most of them talks about the misuse of quotes and double quotes, I checked my code, I found all of the keys in the dictionary used quotes instead of double q...

Read more

CSV超过限制行数

CSV问题 背景 需要处理一个10w余行的csv文件,其中存在大量的文本信息,文本信息本身也比较大。有一些粘贴的邮件内容。csv文件是,分割,然而邮件中有大量的,和双引号。 问题描述   遇到了一个超级让人头大的问题,csv的行数超过了numbers的限制行数,且表格中存在双引号的使用问题。CSV实际上是用逗号来分隔不同的数据的,但是由于在正常的文本里面存在了双引号,这个双引号会和整个文本的外边引号结合,因此逗号就会暴露在外面。所以需要将单个双引号的使用改成两个双引号。比如: "这是一句话" 要修改成 ""这是一句话""   实际操作表明,用numbers修改挺方便的,就是修改过后会丢个几万行。(最后只会保留65535行)这个时候就想起来了Excel,但是用Excel打开,又出现了大...

Read more