hanzo-solidity
v0.2.1
Published
Solidity contracts developed for the Hanzo Platform
Downloads
5
Readme
hanzo-solidity
Smart contracts developed for the Hanzo Platform
This is a collection of Solidity contracts developed for the Hanzo Platform. Designed to meet a broad range of needs, our contracts play well with Truffle and provide a cutting edge framework for contract development.
Install
$ npm install hanzo-solidity
Usage
Import the contracts you want to use:
import "hanzo-solidity/contracts/Versioned.sol";
contract Version {
function version() public pure returns (string) {
return "1.0.0";
}
function boolean() public pure returns (bool) {
return true;
}
}
contract Contract is Versioned {}
And interact with them as you would normally:
let Contract = artifacts.require('./Contract.sol')
let Version = artifacts.require('./Version.sol')
contract('Contract', async () => {
let contract, version, proxy = null
before(async () => {
contract = await Contract.deployed()
version = await Version.deployed()
await contract.setVersion(version.address)
// Use current version's ABI and provide simple interface to a versioned
// smart contract.
proxy = await Version.at(contract.address)
})
it('should return result from proxied method', async () => {
let v = await proxy.boolean.call()
assert.equal(v, true, 'boolean() did not return expected boolean')
})
})
You can find more examples of our contracts in use in our test suite.
About Hanzo
Hanzo enables businesses to launch and operate blockchain networks, develop decentralized applications and deliver compelling experiences.