Skip to content

Instantly share code, notes, and snippets.

@y12studio
y12studio / yrt2.json
Created March 19, 2016 02:47
YRT2 Contract JSON Interface
[ { "constant": false, "inputs": [ { "name": "newSellPrice", "type": "uint256", "typeShort": "uint", "bits": "256", "displayName": "new Sell Price", "template": "elements_input_uint" }, { "name": "newBuyPrice", "type": "uint256", "typeShort": "uint", "bits": "256", "displayName": "new Buy Price", "template": "elements_input_uint" } ], "name": "setPrices", "outputs": [], "type": "function", "displayName": "set Prices" }, { "constant": true, "inputs": [], "name": "name", "outputs": [ { "name": "", "type": "string", "value": "YRT2", "displayName": "" } ], "type": "function", "displayName": "name" }, { "constant": false, "inputs": [ { "name": "_spender", "type": "address", "typeShort": "address", "bits": "", "displayName": "&thinsp;<span class=\"punctuation\">_</span>&thinsp;spender", "template": "elements_input_address" }, { "name": "_value", "type": "uint256", "typeShort": "uint", "bits": "256", "displayName": "&thinsp;<span class=\"punctuation\">_</span>&thinsp;value", "template": "elements_input_uint" } ], "n
@y12studio
y12studio / yrt3.json
Created March 18, 2016 10:51
YRT3 Contract JSON Interface
[ { "constant": false, "inputs": [ { "name": "newSellPrice", "type": "uint256", "typeShort": "uint", "bits": "256", "displayName": "new Sell Price", "template": "elements_input_uint" }, { "name": "newBuyPrice", "type": "uint256", "typeShort": "uint", "bits": "256", "displayName": "new Buy Price", "template": "elements_input_uint" } ], "name": "setPrices", "outputs": [], "type": "function", "displayName": "set Prices" }, { "constant": true, "inputs": [], "name": "name", "outputs": [ { "name": "", "type": "string", "value": "YRT3", "displayName": "" } ], "type": "function", "displayName": "name" }, { "constant": false, "inputs": [ { "name": "_spender", "type": "address", "typeShort": "address", "bits": "", "displayName": "&thinsp;<span class=\"punctuation\">_</span>&thinsp;spender", "template": "elements_input_address" }, { "name": "_value", "type": "uint256", "typeShort": "uint", "bits": "256", "displayName": "&thinsp;<span class=\"punctuation\">_</span>&thinsp;value", "template": "elements_input_uint" } ], "n
@y12studio
y12studio / RandomToken2.sol
Last active March 18, 2016 09:22
RandomToken2
// Create a cryptocurrency contract in Ethereum https://www.ethereum.org/token
contract owned {
address public owner;
function owned() {
owner = msg.sender;
}
modifier onlyOwner {
if (msg.sender != owner) throw;
@y12studio
y12studio / HowToSetupEthContract.md
Last active December 24, 2019 08:16
Ethereum以太坊智能合約環境說明

簡介

目前智能合約(智約)使用以太坊測試網部署測試,以智約驗證概念為主,未來可望新增Linux基金會的HyperLedger專案的商轉網路,或是外掛比特幣網路側鏈的Rootstock平台網路,就2016年來看,智約概念驗證可用網路裡以太坊較主流,次起智約網路預計2017年才會明朗。

Ethereum Project https://ethereum.org/

Hyper Ledger Foundation https://www.hyperledger.org/

環境設定

@y12studio
y12studio / LuckOne.sol
Created March 16, 2016 03:57
LuckOne Ethereum
// OneEther/OneThousand: A simple decentralized raffle https://github.com/OneEther/OneThousand
@y12studio
y12studio / RandomToken.sol
Last active March 18, 2016 09:22
RandomToken
// Create a cryptocurrency contract in Ethereum https://www.ethereum.org/token
contract owned {
address public owner;
function owned() {
owner = msg.sender;
}
modifier onlyOwner {
if (msg.sender != owner) throw;
Verifying issuance of colored coins asset with ID #U3uPyQeyNRafPy7popDfhZui8Hsw98B5XMUpP
package y12.tw;
// v4
message Y12Meta {
enum Type {
COMMON = 1;
COMMON_ARRAY = 11;
FILE_EXIST = 21;
ASSET_GENESIS = 31;
ASSET_TRANSCATION = 32;
@y12studio
y12studio / designer.html
Created August 14, 2014 12:10
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../chart-js/chart-js.html">
<polymer-element name="my-element">