fbpx
February 17, 2019

Testing dates in Solidity smart contracts – Part I

Dates are a bit weird in Solidity. Solidity does have some keywords for working with dates, like now, or 1 day, but it does not have a native date type. Instead, dates are represented as integers, using timestamps in seconds. In our Truffle tests, we need to be able to…

Read Story
February 16, 2019

More tricks for bn.js (Big Number) library in Truffle tests

In the last video of the smart contract testing series I showed you the basic usage of the Big Number library to deal with integers. But Big Number has many more trick up his sleeves 🙂 In this video, I will show you all these tricks so that you feel…

Read Story
February 14, 2019

Testing integers in smart contract with Truffle and bn.js (Big Number)

In Solidity smart contract, you might have to deal with huge numbers, especially when doing financial transfers. Don't forget that we need to specify Ether transfers in Wei, a fundamental unit equals to 1 * 10 ^ -18 Ether, so very quickly even small financial values can lead to big…

Read Story
February 13, 2019

Etherdelta smart contract walkthrough

In this article, I will walk you through the code of the Etherdelta smart contract: ERC20 token transfers, orders creation, and trades settlement. The smart contract is written in Solidity, and the repo is publicly accessible on the Github of Etherdelta. Decentralized exchanges are one of the most fascinating Blockchain…

Read Story
February 12, 2019

Etherdelta decentralized exchanges walkthrough, 0x chrome extension | EatTheBlocks Newsletter 26

Etherdelta smart contract walkthrough - Full explanation of the Solidity smart contract of Etherdelta (decentralized exchange). How the trade process work? off-chain orderbook and integration with on-chain settlement. Introducing c0x: chrome-0x extension - a chrome extension to buy ERC20 tokens, using 0x Instant and radar-relay as a backend Ethereum Support…

Read Story
February 12, 2019

Isolate smart contract tests with Truffle clean room features

In Truffle tests, we have a mysterious contract() function: contract('my test', () => { if('it should ...', () => { }); }); It's Truffle replacement of Mocha describe() function, but with a twist: it defines a "clean room" and it's used to isolate tests. Very few Truffle users, but this…

Read Story

Never miss a minute

Get great content to your inbox every week. No spam.

[contact-form-7 id=”217″ title=”Simple Subscribe Form”]

Free 14 day trial • No set-up costs • Cancel any time
Arrow-up