Author: Thomas Wiesner
2017-11-01
[Video] Truffle 4 - Full Size Snickers
Truffle 4: Just released and packed with exciting features, we are looking close into Debugging and Testing.
In this Ethereum Session we are going to deep dive into Truffle 4 new features. I'm demonstrating the Debugger and how to use the internal blockchain with the testing framework. Sounds interesting for you? Then watch this video:
The code for the video is here:
//getBalance
MetaCoin.deployed()
.then(
function(instance) {
return instance.getBalance.call(web3.eth.accounts[0]);
}
).then(
function(result) {
return result.toNumber();
}
);
MetaCoin.deployed().then(function(instance) {return instance.getBalance.call(web3.eth.accounts[0]);}).then(function(result) {return result.toNumber(); });
//sendCoins
MetaCoin.deployed()
.then(
function(instance) {
return instance.sendCoin(web3.eth.accounts[1], 1000);
}
);
MetaCoin.deployed().then(function(instance) { return instance.sendCoin(web3.eth.accounts[1], 1000000);});