Go to file
Gerardo Nardelli d7ccc3e7a4 Add support for tokenURI in token contracts (#8) 2019-10-04 16:55:36 +03:00
bridge-contracts@86b35f8382 Add mediators contracts (#6) 2019-09-27 20:32:54 +03:00
contracts Add support for tokenURI in token contracts (#8) 2019-10-04 16:55:36 +03:00
deploy Add mediators contracts (#6) 2019-09-27 20:32:54 +03:00
migrations Project setup (#4) 2019-09-16 23:43:30 +03:00
scripts Add mediators contracts (#6) 2019-09-27 20:32:54 +03:00
test Add support for tokenURI in token contracts (#8) 2019-10-04 16:55:36 +03:00
.editorconfig Project setup (#4) 2019-09-16 23:43:30 +03:00
.env.example Add mediators contracts (#6) 2019-09-27 20:32:54 +03:00
.eslintignore Add mediators contracts (#6) 2019-09-27 20:32:54 +03:00
.eslintrc Add mediators contracts (#6) 2019-09-27 20:32:54 +03:00
.gitattributes add syntax highlighting for solidity 2018-03-27 16:48:13 +02:00
.gitignore Project setup (#4) 2019-09-16 23:43:30 +03:00
.gitmodules Add mediators contracts (#6) 2019-09-27 20:32:54 +03:00
.nvmrc Project setup (#4) 2019-09-16 23:43:30 +03:00
.prettierrc Project setup (#4) 2019-09-16 23:43:30 +03:00
.solhint.json Add mediators contracts (#6) 2019-09-27 20:32:54 +03:00
.solhintignore Add reduced version of CryptoKitties contracts (#5) 2019-09-18 15:16:32 +03:00
LICENSE Project setup (#4) 2019-09-16 23:43:30 +03:00
README.md Add mediators contracts (#6) 2019-09-27 20:32:54 +03:00
package.json Add mediators contracts (#6) 2019-09-27 20:32:54 +03:00
truffle-config.js Add reduced version of CryptoKitties contracts (#5) 2019-09-18 15:16:32 +03:00
yarn.lock Add mediators contracts (#6) 2019-09-27 20:32:54 +03:00

README.md

cryptokitties-xdai-demo

Clone the repository

git clone --recursive https://github.com/poanetwork/cryptokitties-xdai-demo.git

Install dependencies

yarn

Compile contracts

yarn compile

Deploy contracts

Create .env file in project root with the following parameters:

#The private key hex value of the account responsible for contracts deployment
DEPLOYMENT_ACCOUNT_PRIVATE_KEY=67..14
# Extra gas added to the estimated gas of a particular deployment/configuration transaction
DEPLOYMENT_GAS_LIMIT_EXTRA=0.2
# The RPC channel to a Home node able to handle deployment/configuration transactions.
HOME_RPC_URL=https://sokol.poa.network
# The "gasPrice" parameter set in every deployment/configuration transaction on Home network (in Wei).
HOME_DEPLOYMENT_GAS_PRICE=1000000000
# The address of the existing AMB bridge in the Home network that will be used to pass messages
# to the Foreign network.
HOME_AMB_BRIDGE=0x0000000000000000000000000000000000000000
# The gas limit that will be used in the execution of the message passed to the mediator contract
# in the Foreign network.
HOME_MEDIATOR_REQUEST_GAS_LIMIT=1000000
# Address on Home network with permissions to change parameters of the mediator contract.
HOME_MEDIATOR_OWNER=0x0000000000000000000000000000000000000000
# Address on Home network with permissions to upgrade the mediator contract
HOME_UPGRADEABLE_ADMIN=0x0000000000000000000000000000000000000000

# The RPC channel to a Foreign node able to handle deployment/configuration transactions.
FOREIGN_RPC_URL=https://sokol.poa.network
# The "gasPrice" parameter set in every deployment/configuration transaction on Foreign network (in Wei).
FOREIGN_DEPLOYMENT_GAS_PRICE=1000000000
# The address of the existing AMB bridge in the Foreign network that will be used to pass messages
# to the Home network.
FOREIGN_AMB_BRIDGE=0x0000000000000000000000000000000000000000
# The gas limit that will be used in the execution of the message passed to the mediator contract
# in the Home network.
FOREIGN_MEDIATOR_REQUEST_GAS_LIMIT=1000000
# Address on Foreign network with permissions to change parameters of the mediator contract.
FOREIGN_MEDIATOR_OWNER=0x0000000000000000000000000000000000000000
# Address on Foreign network with permissions to upgrade the mediator contract
FOREIGN_UPGRADEABLE_ADMIN=0x0000000000000000000000000000000000000000

# Cryptokitties contract address on Foreign network. If not defined or set to address zero, the contract will be deployed on Foreign network.
CRYPTOKITTIES_ADDRESS=0x0000000000000000000000000000000000000000
# Amount of Kitties to Mint on Foreign network
KITTIES_AMOUNT=1

Then

yarn deploy

Tests

yarn test

Flat contracts

yarn flatten