-
name
: a string,event 的名稱 -
type
: a string,always "event" -
inputs
: an array,輸入的參數,包含:-
name
: a string,參數名稱 -
type
: a string,參數的 data type(e.g. uint256)
-
-
name
:a string,function 名稱 -
type
:a string,"function", "constructor", or "fallback" -
inputs
:an array,function 輸入的參數,包含:-
name
:a string,參數名稱 -
type
:a string,參數的 data type(e.g. uint256) -
components
:an array,如果輸入的參數是 tuple(struct) type 才會有這個欄位。描述 struct 中包含的資料型態
-
-
outputs
:an array,function 的回傳值,和inputs
使用相同表示方式。如果沒有回傳值可忽略,值為[]
-
payable
:true
,如果 function 可收 Ether,預設為false
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
from boa.interop.Neo.Runtime import CheckWitness, Notify | |
from boa.interop.Neo.Action import RegisterAction | |
from boa.interop.Neo.Storage import * | |
from boa.builtins import concat | |
from boa_test.example.demo.nex.token import * | |
PROPOSAL_LIST_KEY = 'proposalList' | |
TOTAL_PROPOSAL_AMOUNT = 'totalproposalAmount' |
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
""" | |
NEX ICO Template | |
=================================== | |
Author: Thomas Saunders | |
Email: [email protected] | |
Date: Dec 11 2017 | |
""" |
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
// Workable on Mainnet: | |
// https://kyber.network/swap/eth_knc | |
// https://dapp.originprotocol.com | |
var Web3 = require('web3'); | |
const ProviderEngine = require('web3-provider-engine') | |
const RpcSubprovider = require('web3-provider-engine/subproviders/rpc.js') | |
const Web3Subprovider = require("./web3_subprovider.js"); | |
const DappSubprovider = require("./dapp_subprovider_new.js"); |
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
{ | |
"name": "webView", | |
"version": "0.0.1", | |
"private": true, | |
"scripts": { | |
"start": "npm react-native start", | |
"test": "jest", | |
"postinstall": "./node_modules/.bin/rn-nodeify --install --hack", | |
"debug": "open 'rndebugger://set-debugger-loc?host=localhost&port=8081'" | |
}, |
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
const result = await window.web3.eth.personal.sign( | |
'Hello world!', // The Message | |
'0x33b8287511ac7F003902e83D642Be4603afCd876', // User Account | |
'', // Password | |
); | |
// Response: Signed Result | |
'0x0d9273c44a7371c149efb68b100b6aaaf229e8a5502249d84e3febe17f133f7b201b9c3087f507eee684c9a97d08681de5ef1ca8738d26eb5daf63b9adcf69da1b' |
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
const result = await window.web3.eth.sendTransaction({ | |
from: '0x33b8287511ac7F003902e83D642Be4603afCd876', | |
to: '0x9EE2B16e1FA35E417dB7dE2fDd9377a73D7c2B67', | |
value: '1000000000000000', // 0.0001 ETH in Wei | |
gas: 21000, // Gas Amount | |
}); | |
// Response: Transaction ID (Hash) | |
'0x3d5ccbe71ace8cbdb63ee210a8121a95120231a976c82eaf9ba948de119c4586' |
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
const accounts = await window.web3.eth.getAccounts(); | |
// Response: An array of user's Ethereum accounts | |
['0x33b8287511ac7F003902e83D642Be4603afCd876'] |
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
const account = window.web3.eth.defaultAccount; | |
// Response: User's default Ethereum account | |
'0x33b8287511ac7F003902e83D642Be4603afCd876' |