August 2018
Intermediate to advanced
404 pages
11h 19m
English
All the preceding examples use the already deployed contract abstraction. We can deploy a different version to the network using the new() method:
TokenContract.new().then(function(instance) { // New contract instance console.log(instance.address); }).catch(function(err) { // Exception});
Truffle also provides an option to create an instance from any deployed address. The instance can be created using the at() method:
var instance = TokenContract.at("0x...");