This file contains hidden or 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
| [ { "constant": true, "inputs": [], "name": "seller", "outputs": [ { "name": "", "type": "address", "value": "0x13a9684203635a4f03e9cb30befdc3e0f69e8163", "displayName": "" } ], "type": "function", "displayName": "seller" }, { "constant": false, "inputs": [], "name": "abort", "outputs": [], "type": "function", "displayName": "abort" }, { "constant": true, "inputs": [], "name": "value", "outputs": [ { "name": "", "type": "uint256", "value": "5000000000000000", "displayName": "" } ], "type": "function", "displayName": "value" }, { "constant": true, "inputs": [], "name": "buyer", "outputs": [ { "name": "", "type": "address", "value": "0xdb271e79b114348915b0d7fca557f5e42cc90da8", "displayName": "" } ], "type": "function", "displayName": "buyer" }, { "constant": false, "inputs": [], "name": "confirmReceived", "outputs": [], "type": "function", "displayName": "confirm Received" }, { "constant": true, "inputs": [], "name": "state", "outputs": [ { "name": "", "type": "uint8", "value": "2", "displayName": "" } ], "typ |
This file contains hidden or 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
| // Solidity by Example — Solidity 0.2.0 documentation http://solidity.readthedocs.org/en/latest/solidity-by-example.html | |
| // Ethereum以太坊智能合約環境說明 https://gist.github.com/y12studio/f142cd9789c7d396d8f7 | |
| // | |
| // 1.賣家建立合約並放入價值商品2倍ETH當押金。 | |
| // 2.買家確認賣家合約押金無誤,confirmPurchase()轉入與賣家等值押金。 | |
| // 3.買家收到貨物後確認,confirmReceived()賣家收回押金加價金,買家收回押金減去價金。 | |
| // | |
| // Testnet Address : 0x4378717cb207EB27BF2f58d8Bb2C2deA66B1BF43 | |
| // JSON Interface | |
| // [ { "constant": true, "inputs": [], "name": "seller", "outputs": [ { "name": "", "type": "address", "value": "0x13a9684203635a4f03e9cb30befdc3e0f69e8163", "displayName": "" } ], "type": "function", "displayName": "seller" }, { "constant": false, "inputs": [], "name": "abort", "outputs": [], "type": "function", "displayName": "abort" }, { "constant": true, "inputs": [], "name": "value", "outputs": [ { "name": "", "type": "uint256", "value": "5000000000000000", "displayName": "" } ], "type": "function", "displayName": "value" }, { "constant": true, "inputs": [], "name": "buyer", "outputs": [ { "nam |
This file contains hidden or 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
| [ { "constant": false, "inputs": [ { "name": "reality_id", "type": "uint256", "typeShort": "uint", "bits": "256", "displayName": "reality <span class=\"punctuation\">_</span> id", "template": "elements_input_uint" }, { "name": "fact_hash", "type": "bytes32", "typeShort": "bytes", "bits": "32", "displayName": "fact <span class=\"punctuation\">_</span> hash", "template": "elements_input_bytes" }, { "name": "ethereum_address", "type": "address", "typeShort": "address", "bits": "", "displayName": "ethereum <span class=\"punctuation\">_</span> address", "template": "elements_input_address" }, { "name": "base_unit", "type": "uint256", "typeShort": "uint", "bits": "256", "displayName": "base <span class=\"punctuation\">_</span> unit", "template": "elements_input_uint" } ], "name": "setupRealityKey", "outputs": [], "type": "function", "displayName": "setup Reality Key" }, { "constant": true, "inputs": [], "name": "rkResult", "outputs": [ { "name": "", "type": "u |
This file contains hidden or 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
| // Ethereum以太坊智能合約環境說明 https://gist.github.com/y12studio/f142cd9789c7d396d8f7 | |
| contract YRealityKey { | |
| uint public realityId; | |
| bytes32 public factHash; | |
| address public factAddress; | |
| uint public baseUnit; | |
| uint public rkResult; | |
| function YRealityKey() { | |
This file contains hidden or 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
| // Solidity by Example — Solidity 0.2.0 documentation http://solidity.readthedocs.org/en/latest/solidity-by-example.html | |
| // Ethereum以太坊智能合約環境說明 https://gist.github.com/y12studio/f142cd9789c7d396d8f7 | |
| contract YSOA { | |
| // time periods in seconds. | |
| address public beneficiary; | |
| address public feeDao; | |
| uint public auctionStart; | |
| uint public biddingTime; | |
| uint32 public feePpm; | |
| uint8 public luckPercent; |
This file contains hidden or 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
| [ { "constant": false, "inputs": [], "name": "bid", "outputs": [], "type": "function", "displayName": "bid" }, { "constant": false, "inputs": [], "name": "auctionEnd", "outputs": [], "type": "function", "displayName": "auction End" }, { "constant": true, "inputs": [], "name": "beneficiary", "outputs": [ { "name": "", "type": "address", "value": "0x5de46a5fe56e7ebd1d24cf6cd64160ca99542b68", "displayName": "" } ], "type": "function", "displayName": "beneficiary" }, { "constant": true, "inputs": [ { "name": "seed", "type": "uint256", "typeShort": "uint", "bits": "256", "displayName": "seed", "template": "elements_input_uint" } ], "name": "randomGen", "outputs": [ { "name": "randomNumber", "type": "uint256", "value": "0", "displayName": "random Number" } ], "type": "function", "displayName": "random Gen" }, { "constant": true, "inputs": [], "name": "auctionStart", "outputs": [ { "name": "", "type": "uint256", "value": "1458550980", "displayName": "" } ], "type": "function", "displayName": "auction Start" }, { "co |
This file contains hidden or 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
| [ { "constant": false, "inputs": [], "name": "bid", "outputs": [], "type": "function", "displayName": "bid" }, { "constant": false, "inputs": [], "name": "auctionEnd", "outputs": [], "type": "function", "displayName": "auction End" }, { "constant": true, "inputs": [], "name": "beneficiary", "outputs": [ { "name": "", "type": "address", "value": "0x5de46a5fe56e7ebd1d24cf6cd64160ca99542b68", "displayName": "" } ], "type": "function", "displayName": "beneficiary" }, { "constant": true, "inputs": [], "name": "auctionStart", "outputs": [ { "name": "", "type": "uint256", "value": "1458531013", "displayName": "" } ], "type": "function", "displayName": "auction Start" }, { "constant": true, "inputs": [], "name": "feeBalance", "outputs": [ { "name": "", "type": "uint256", "value": "0", "displayName": "" } ], "type": "function", "displayName": "fee Balance" }, { "constant": true, "inputs": [], "name": "highestBidder", "outputs": [ { "name": "", "type": "address", "value": "0x0000000000000000000000000000000000000000", " |
This file contains hidden or 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
| // Solidity by Example — Solidity 0.2.0 documentation http://solidity.readthedocs.org/en/latest/solidity-by-example.html | |
| // Ethereum以太坊智能合約環境說明 https://gist.github.com/y12studio/f142cd9789c7d396d8f7 | |
| contract YSOA { | |
| // time periods in seconds. | |
| address public beneficiary; | |
| address public feeDao; | |
| uint public auctionStart; | |
| uint public biddingTime; | |
| uint32 public feePpm; | |
| uint public feeBalance; |
This file contains hidden or 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
| [ { "constant": false, "inputs": [], "name": "bid", "outputs": [], "type": "function", "displayName": "bid" }, { "constant": false, "inputs": [], "name": "auctionEnd", "outputs": [], "type": "function", "displayName": "auction End" }, { "constant": true, "inputs": [], "name": "beneficiary", "outputs": [ { "name": "", "type": "address", "value": "0x13a9684203635a4f03e9cb30befdc3e0f69e8163", "displayName": "" } ], "type": "function", "displayName": "beneficiary" }, { "constant": true, "inputs": [], "name": "auctionStart", "outputs": [ { "name": "", "type": "uint256", "value": "1458393276", "displayName": "" } ], "type": "function", "displayName": "auction Start" }, { "constant": true, "inputs": [], "name": "highestBidder", "outputs": [ { "name": "", "type": "address", "value": "0x0000000000000000000000000000000000000000", "displayName": "" } ], "type": "function", "displayName": "highest Bidder" }, { "constant": true, "inputs": [], "name": "biddingTime", "outputs": [ { "name": "", "type": "uint256", "value": "8 |
This file contains hidden or 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
| // Solidity by Example — Solidity 0.2.0 documentation http://solidity.readthedocs.org/en/latest/solidity-by-example.html | |
| contract SimpleAuction { | |
| // Parameters of the auction. Times are either | |
| // absolute unix timestamps (seconds since 1970-01-01) | |
| // ore time periods in seconds. | |
| address public beneficiary; | |
| uint public auctionStart; | |
| uint public biddingTime; | |
| // Current state of the auction. |