codex-storage / codex-contracts-eth

Ethereum smart contracts for Codex
Other
5 stars 8 forks source link

Deploy Marketplace smart contract on Testnet #119

Closed veaceslavdoina closed 3 weeks ago

veaceslavdoina commented 3 weeks ago

This should be considered as a part of codex-storage/infra-codex/issues/186 and quick workaround for #112.

We would need to deploy an updated version of the Marketplace smart contract on existing Testnet before the EthCC, without changing anything around.

Plan is the following

  1. Use a separate branch devnet-testnet until we will finish #112
  2. Use an existing codexdisttestnetwork because it was used for previous deployment on Testnet
  3. Copy previous deployment (2024-04-03) /hardhat/deployments/codexdisttestnetwork folder content, excluding Marketplace.json
  4. Build a Docker image from the branch
  5. Deploy Marketplace smart contract using new Docker image
  6. Save and push Marketplace.json from the new deployment to the branch
veaceslavdoina commented 3 weeks ago

All data was added but looks like BuildJet is not working now. We've built Docker image manually

# Clone
git clone https://github.com/codex-storage/codex-contracts-eth.git
cd codex-contracts-eth

# Branch
git switch -C devnet-testnet origin/devnet-testnet

# Variables
user=docker-user
repository=codex-contracts-eth
tag=sha-`git rev-parse --short HEAD`-dist-tests-devnet

# Build
docker build -f docker/deploy.Dockerfile -t ${repository}:${tag} .

# Tag
docker tag ${repository}:$tag ${user}/${repository}:${tag}

# Login
docker login

# Push
docker push ${user}/${repository}:${tag}
docker pull codexstorage/codex-contracts-eth:sha-e21c28e-dist-tests-devnet
veaceslavdoina commented 3 weeks ago

BuildJet started to work and we have auto built images

veaceslavdoina commented 3 weeks ago

Contract was deployed and Codex Storage nodes were updated to use it.