Not sure if I get your question correctly. Assuming you have a private network running with 5 clients on network ID 13337
and myGenesis.json
chain configuration.
enode://0000..0001@192.168.178.101:36541
enode://0000..0002@192.168.178.102:36542
enode://0000..0003@192.168.178.103:36543
enode://0000..0004@192.168.178.104:36544
enode://0000..0005@192.168.178.105:36545
Add these nodes to a file, let's say myPrivateNetwork.txt
, one entry per line:
enode://0000..0001@192.168.178.101:36541
enode://0000..0002@192.168.178.102:36542
enode://0000..0003@192.168.178.103:36543
enode://0000..0004@192.168.178.104:36544
enode://0000..0005@192.168.178.105:36545
And subsequently, run Parity with --chain myGenesis.json --network-id 13337 --reserved-peers myPrivateNetwork.txt --reserved-only
. Or add it to the config file:
[parity]
chain = "myGenesis.json"
[network]
id = 13337
reserved_only = true
reserved_peers = "./myPrivateNetwork.txt"
This will establish a private network containing only your nodes:
--reserved-peers FILE Provide a file containing enodes, one per line.
These nodes will always have a reserved slot on top
of the normal maximum peers. (default: None)
--reserved-only Connect only to reserved nodes. (default: false)
Adding reserved peers also works from the Web3 console by issuing:
api.parity.addReservedPeer('enode://0000..0007@192.168.178.107:36547')
Note, that you have to enable the parity
json rpc api.
You can also run a private development chain with parity --chain dev
.
As blockchain networks only take into consideration what is happening in the chain, probably you should connect your private network to your erc20 tokens through oracles. Therefore, depending on what is going on with your smart contracts you can trigger actions on your private network or the oposite.
Following this link you can test how to build an oracle, it is quite straight forward:
https://medium.com/@mustwin/building-an-oracle-for-an-ethereum-contract-6096d3e39551
But also you could use the service oraclize
http://www.oraclize.it
Best Answer
It is not possible to deploy a contract to an address of your choice
The address a contract is deployed to is generated deterministically using the address of the deployer and the deployer's total number of transactions (the nonce): How is the address of an Ethereum contract computed?
This means you can work out the address of the contract before it is deployed:
(from https://stackoverflow.com/a/42416934)