This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Sample code to deploy smart contract on QuarkChain testnet using quarkchain-web3.js | |
// https://github.com/QuarkChain/quarkchain-web3.js | |
// Contract code is taken from https://testnet.quarkchain.io/contract | |
// The code can run in the browser console while on http://testnet.quarkchain.io/contract (not https) | |
// MetaMask is required to sign the transaction and you need testnet tokens in your account | |
var abi = [{"constant":true,"inputs":[],"name":"getBlockNumber","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newgreeting","type":"string"}],"name":"setGreeting","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"greet","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_greeting","type":"string"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"}]; | |
var byteCode = "0x6080 |