如果你想參加抽獎,首先你要得到 Smart Contract Access,詳情請參照另一篇文章的「第一點」

因為,GTC 暫時只得一個抽獎遊戲,game number 是 “0”

選取 “ListOfGames” 功能,在 number 輸入 “0”,再按 READ 按鈕

之後你會得到一個 contract address 和 JSON string (分別是上圖第一個及第三個灰色格內的字串。

Contract Address:
0x1b988dc1ed1b340149cf12fe56b04cb50e6b3820
JSON Interface:
[ { "constant": true, "inputs": [], "name": "pool", "outputs": [ { "name": "", "type": "uint256", "value": "0" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "id", "type": "uint256" } ], "name": "showWinners", "outputs": [ { "name": "", "type": "address", "value": "0x0000000000000000000000000000000000000000" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "introduction", "outputs": [ { "name": "", "type": "string", "value": "100GTC (inc. 8 for pool, 1 for your referrer, 1 for main contract) per lucky draw ticket. 10 tickets per game, 1 winner with 900 gtc. When pool reach 1000gtc, it will draw 1 winner from all participants(with weighting) for 1000gtc" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [], "name": "owner", "outputs": [ { "name": "", "type": "address", "value": "0x0bdc4acfe59d476ffceea732a5b043bbbf3911d4" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "id", "type": "uint256" } ], "name": "showGames", "outputs": [ { "name": "", "type": "address[10]", "value": [ "0x0000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000", "0x0000000000000000000000000000000000000000" ] } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": true, "inputs": [ { "name": "id", "type": "uint256" } ], "name": "gtc1000Winner", "outputs": [ { "name": "", "type": "address", "value": "0x" } ], "payable": false, "stateMutability": "view", "type": "function" }, { "constant": false, "inputs": [], "name": "buyTicket", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "name": "superAddress", "type": "address", "index": 0, "typeShort": "address", "bits": "", "displayName": "super Address", "template": "elements_input_address", "value": "0xd6465fcBD94c10aff5bd786F7085A0905c6f42C5" } ], "payable": false, "stateMutability": "nonpayable", "type": "constructor" }, { "payable": true, "stateMutability": "payable", "type": "fallback" } ]

請用 Chrome 進入: https://www.myetherwallet.com/#contracts
(建議用 CTRL + T 開一個新的 Tab)

將上一個步驟得到的 address 和 JSON string 再得到另一個的 Smart Contract Access

對!就是一開始時的步驟再來一次,可這一次是用 GTC 玩抽獎的 Smart Contract 不一樣的。

當我到 Smart Contract Access 後,你會看到另一堆 Functions
要買 Tickets 的話,選取 buyTicket 功能,再使用跟你購入 GTC 之同一 Wallet 付 Gas 購買 Ticket

每執行一次 butTicket function 只會購買一張 Ticket,如你想在購買多於一張 Ticket,必須再次執行 buyTicket function 及繳付 Gas 給予 network 確認。

請注意: 
– 購買 Lucky Draw Ticket 的話,閣下是需要先行擁有 Green Tea Coin 的。
– 購買 Lucky Draw Ticket,除必需先行擁有 Green Tea Coin 外,購入 Tickets 時亦必須使用擁有 Green Tea Coin 之 Wallet 購買。
任何不正確之操作而導致閣下任何損失,本人一概不負責。

當繳付 Gas 以後,待 Network 確認,你可以用 showGames 功能看到自己的 Address

如上文所提到,每一 Round 有10張 Ticket,在 address[10] 框中,每一個 address 即代表一張 Ticket。

而 0x0000000000000000000000000000000000000000 代表還沒有人購買。所以,上圖代表已經有人購入了兩張 Lucky Draw Tickets,而且是同一人購買。

你還可以用其他的 Functions 查看 Lucky Draw 及 Jackpot Winner



SOURCE

LEAVE A REPLY

Please enter your comment!
Please enter your name here