Skip to content

πŸ” Ethereum smart contracts developed for the Hanzo Platform.

License

Notifications You must be signed in to change notification settings

hanzoai/solidity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Jan 31, 2019
2bb4ca4 Β· Jan 31, 2019

History

34 Commits
Jan 31, 2019
Jan 31, 2019
Jan 31, 2019
May 8, 2018
May 8, 2018
May 8, 2018
May 8, 2018
Jul 5, 2018
May 8, 2018
Jul 5, 2018
Jan 31, 2019
Jan 31, 2019
May 9, 2018

Repository files navigation

hanzo-solidity

npm build dependencies downloads license chat

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.

License

BSD