Coder Social home page Coder Social logo

hanzoai / solidity Goto Github PK

View Code? Open in Web Editor NEW
50.0 17.0 13.0 24 KB

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

Home Page: https://hanzo.ai

License: BSD 3-Clause "New" or "Revised" License

JavaScript 100.00%
ethereum ethereum-contract solidity solidity-contracts smart-contracts hanzo

solidity's Introduction

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

solidity's People

Contributors

auser avatar zeekay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.