Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/develop' into hsm_dev
Browse files Browse the repository at this point in the history
  • Loading branch information
JeremyJiaqg committed Jan 11, 2018
2 parents 1fb252d + 3e3b1cd commit 43c47c4
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 24 deletions.
15 changes: 5 additions & 10 deletions contracts/demo/StandardToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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);

Expand All @@ -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;
Expand Down Expand Up @@ -207,3 +200,5 @@ contract StandardToken is ERC20Protocol {
}

}

1000000000000000000
9 changes: 2 additions & 7 deletions contracts/demo/deploy.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 21 additions & 0 deletions deploySmartContractsOnWanchain.md
Original file line number Diff line number Diff line change
@@ -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
4 changes: 0 additions & 4 deletions deployWanSmartContract.md

This file was deleted.

16 changes: 14 additions & 2 deletions params/bootnodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion params/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down

0 comments on commit 43c47c4

Please sign in to comment.