diff --git a/contracts/demo/StandardToken.sol b/contracts/demo/StandardToken.sol index c4dcb09ac..eb36ae96e 100644 --- a/contracts/demo/StandardToken.sol +++ b/contracts/demo/StandardToken.sol @@ -114,7 +114,7 @@ contract StandardToken is ERC20Protocol { using SafeMath for uint; string public constant name = "WanToken-Beta"; - string public constant symbol = "WanToken"; + string public constant symbol = "WTB"; uint public constant decimals = 18; function transfer(address _to, uint _value) public returns (bool success) { @@ -155,16 +155,11 @@ contract StandardToken is ERC20Protocol { return allowed[_owner][_spender]; } - //////////////////////////////////////////////////////////////////////// function () public payable { buyWanCoin(msg.sender); } - function buyWanCoin(address receipient) - public - payable - returns (bool) - { + function buyWanCoin(address receipient) public payable returns (bool) { require(receipient != 0x0); require(msg.value >= 0.1 ether); @@ -175,9 +170,7 @@ contract StandardToken is ERC20Protocol { return true; } - - - address public wanport = 0x2cc79fa3b80c5b9b02051facd02478ea88a78e2c; + address public wanport = 0x2CC79FA3B80c5b9b02051fACD02478EA88a78E2c; mapping (address => uint) balances; mapping (address => mapping (address => uint)) allowed; @@ -207,3 +200,5 @@ contract StandardToken is ERC20Protocol { } } + +1000000000000000000 diff --git a/contracts/demo/deploy.js b/contracts/demo/deploy.js index 40ebf3812..ec8ccbf21 100644 --- a/contracts/demo/deploy.js +++ b/contracts/demo/deploy.js @@ -6,15 +6,10 @@ var standardtoken = standardtokenContract.new( gas: '4700000' }, function (e, contract){ if (e) { - console.log('deploy contract error: ', e) + console.log('Deploy contract error: ', e) } - // console.log('transaction hash: ', contract.transactionHash); - - // if (contract.address) { - // console.log('contract address is: ', contract.address) - // } if (typeof contract.address !== 'undefined') { - console.log('Contract mined! address: ' + contract.address + ' transactionHash: ' + contract.transactionHash); + console.log('Contract mined! address: ' + contract.address + ' transactionHash: ' + contract.transactionHash); } }) \ No newline at end of file diff --git a/deploySmartContractsOnWanchain.md b/deploySmartContractsOnWanchain.md new file mode 100644 index 000000000..b9a381c59 --- /dev/null +++ b/deploySmartContractsOnWanchain.md @@ -0,0 +1,21 @@ +How to Deploy your Dapp onto Wanchain + +Requirement: + +1: a working Wanchain client, go to the github site, https://github.com/wanchain/go-wanchain, to get the latest version +2: remix https://remix.ethereum.org, which is an amazing online smart contract development IDE +3: your awesome Dapp consists of one or multiple smart contracts + +Steps: + +1: go to remix, copy and paste your smart contract code, make static syntax analysis, and compile it +2: click Details on the right panel of remix, copy all the code of WEB3DEPLOY section from the pop-up +3: open your favorite editor and comment out whatever inside contracts/demo/deploy.js +4: paste those scripts from step-3 into a javascript file, say, /some/directory/deploy.js +5: switch to root directory of go-wanchain project, +6: launch a wanchain client console, make sure it is connected with either various wanchain public networks, or your private blockchain network +7: run loadScript('/path/to/your/javascript/script/in/step/4/deploy.js') in the console, what you are basically doing is sending a transaction to the Wanchain infra to deploy the contract +8: the transaction id and contract address (hash values starting with '0x') will be printed out onto the console after few seconds +9: now, you can play with your Dapp + +You can locate a demo wanchain token contract and involved scripts under contracts/demo/ directory \ No newline at end of file diff --git a/deployWanSmartContract.md b/deployWanSmartContract.md deleted file mode 100644 index ff55c21d3..000000000 --- a/deployWanSmartContract.md +++ /dev/null @@ -1,4 +0,0 @@ -Requirement: - -1: gwan client https://github.com/wanchain/go-wanchain -2: remix https://remix.ethereum.org \ No newline at end of file diff --git a/params/bootnodes.go b/params/bootnodes.go index 59448be02..29955b0a2 100644 --- a/params/bootnodes.go +++ b/params/bootnodes.go @@ -19,9 +19,21 @@ package params // MainnetBootnodes are the enode URLs of the P2P bootstrap nodes running on // the main Ethereum network. var MainnetBootnodes = []string{ - // Wanchain Foundation Go Bootnodes - "enode://dfa95c2be31b3541895df452678355ef4b38988863959fe56d1a217cd9fdeee27024cb13688cab56373ac597968aa2faf0da8cd87f4238366ddb41f03fc78884@13.250.146.205:17717", // IE + // Wanchain Foundation Bootnodes,SG NK001 + "enode://dfa95c2be31b3541895df452678355ef4b38988863959fe56d1a217cd9fdeee27024cb13688cab56373ac597968aa2faf0da8cd87f4238366ddb41f03fc78884@13.250.146.205:17717", + // Wanchain Foundation Bootnodes,SG NK002 "enode://9e41c167954d33f5f5b7740a0f6a03b90ddab423cfd4e1fc6c844feff32e3a5d82e76c20d1823915676b58505efb6d33ea1fa6f7e6e22812b1d7ae7a90874881@13.250.146.14:17717", + + //Wanchain Foundation Bootnodes,US EAST NK003 + "enode://52d23259b4b30eb3d8e2c8cb7aaf2debac9d731476dcb516d11fa4931dd39d4158f474bb1aff47e8897b50820ba404c3927f1ec833707e594d4b9238411ac465@18.216.140.128:17717", + //Wanchain Foundation Bootnodes,US EAST NK004 + "enode://262f3b1db1652c21dfd21df7b07ad244c81d4f92dc9523281ac657b0723f64a80c8e01d8518d6fe7ca3981149234a54ab6b549005f9741e509b5c186122f6d5f@52.51.203.224:17717", + + //Wanchain Foundation Bootnodes,US WEST NK005 + "enode://cd003df4a1883493b5f86c1d1d1bd6c39dc2ab171b76d66fce2526e22eda83517a892724d7b8200f0edf9e0d9c7f1b1d4e207faa68847eafd41e3fd325ecc82d@34.211.235.236:17717", + //Wanchain Foundation Bootnodes,US WEST NK006 + "enode://e82ad9b30bd10d3359c1db0d6be72a49b783b5c8bc040b3c0d09651fdc7ff0874156c89284fb70b03b0c520caf904f5f92442aad7a705e56067556ffd6f15fed@35.165.177.61:17717", + } // TestnetBootnodes are the enode URLs of the P2P bootstrap nodes running on the diff --git a/params/version.go b/params/version.go index 446707658..4d28fbc65 100644 --- a/params/version.go +++ b/params/version.go @@ -23,7 +23,7 @@ import ( const ( VersionMajor = 0 // Major version component of the current release VersionMinor = 9 // Minor version component of the current release - VersionPatch = 6 // Patch version component of the current release + VersionPatch = 7 // Patch version component of the current release VersionMeta = "wan" // Version metadata to append to the version string )