Skip to content

Commit

Permalink
Updated information regarding compiler verification, network configur…
Browse files Browse the repository at this point in the history
…ation.
  • Loading branch information
miohtama committed Aug 23, 2017
1 parent 767cd0b commit 6326801
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 8 deletions.
17 changes: 14 additions & 3 deletions crowdsales/allocated-token-sale-example.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
# To deploy this file
#
# deploy-contracts --address=[my deploy address account on geth] --deployment-file=crowdsales/allocated-token-sale-example.yml --deployment-name=mainnet
# deploy-contracts --address=[my deploy account address account on geth having some Kovan ETH] --deployment-file=crowdsales/allocated-token-sale-example.yml --deployment-name=kovan

mainnet:
kovan:

chain: mainnet
chain: kovan

# Use automated Chrome to verify all contracts on etherscan.io
# You need to install Splinter package:
# pip install splinter
verify_on_etherscan: yes
browser_driver: chrome

# This is the Solidity version tag we verify on EtherScan.
# For available versions see
# https://etherscan.io/address/0xa8659f5af01796b39e0dfb3323acc00d8fe97ea2#code
# Click Verify and Publish
# See values in Compiler drop down.
# You can also get the local compiler version with:
#
# solc --version
#
solc_version: 0.4.14+commit.c2215d46

contracts:
# This is the address of the multisig wallet where the paymnts eventually land
team_multisig:
Expand Down
17 changes: 15 additions & 2 deletions docs/source/chain.rst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,19 @@ Default configuration

The default configuration set in the packge distribution is in ``populus.json`` file. It is as

* ``http://127.0.0.1:8545`` is mainnet JSON-RPC
* ``http://127.0.0.1:8545`` is mainnet JSON-RPC, `populus.json` network sa `mainnet`

* ``http://127.0.0.1:8546`` is Kovan JSON-RPC, `populus.json` network sa `kovan`

* ``http://127.0.0.1:8547`` is Kovan JSON-RPC, `populus.json` network sa `ropsten`

Ethereum node software (geth, parity) must be started beforehand and configured to allow JSON-RPC in the particular port.

Unlocking the deployment account
================================

For Parity you need to have `parity --unlock` given from the command line to unlock the account for automatic access.

For Go Ethereum you need to use `geth console` and run `personal.unlockAccount` to unlock your account for some time, say 3600 seconds, before running scripts.


* ``http://127.0.0.1:8546`` is Kovan JSON-RPC
4 changes: 3 additions & 1 deletion ico/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ def deploy_crowdsale(project: Project, chain, source_definitions: dict, deploy_a
chain_name = runtime_data["chain"]
verify_on_etherscan = asbool(runtime_data["verify_on_etherscan"])
browser_driver = runtime_data.get("browser_driver", "chrome")
solc_version = runtime_data["solc_version"]

need_unlock = runtime_data.get("unlock_deploy_address", True)

Expand Down Expand Up @@ -143,7 +144,8 @@ def deploy_crowdsale(project: Project, chain, source_definitions: dict, deploy_a
contract_filename=fname,
constructor_args=runtime_data["contracts"][name]["constructor_args"],
libraries=runtime_data["contracts"][name]["libraries"],
browser_driver=browser_driver)
browser_driver=browser_driver,
compiler=solc_version)
runtime_data["contracts"][name]["etherscan_link"] = get_etherscan_link(chain_name, runtime_data["contracts"][name]["address"])

# Write out our expanded contract
Expand Down
1 change: 1 addition & 0 deletions ico/etherscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ def verify_contract(project: Project, chain_name: str, address: str, contract_na
time.sleep(1.0)

print("Contract verification failed. Check the browser for details.")
print("Make sure solc_version in your YAML file matches solc --version output.")
input("Press enter to continue")

return src
Expand Down
4 changes: 2 additions & 2 deletions populus.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"provider": {
"class": "web3.providers.rpc.HTTPProvider",
"settings": {
"endpoint_uri": "http://127.0.0.1:8546",
"endpoint_uri": "http://127.0.0.1:8547",
"request_kwargs": {
"timeout": 180
}
Expand Down Expand Up @@ -90,7 +90,7 @@
"provider": {
"class": "web3.providers.rpc.HTTPProvider",
"settings": {
"endpoint_uri": "http://127.0.0.1:8547",
"endpoint_uri": "http://127.0.0.1:8546",
"request_kwargs": {
"timeout": 180
}
Expand Down

0 comments on commit 6326801

Please sign in to comment.