From 07177095737744d44df0585c2aead056a324a540 Mon Sep 17 00:00:00 2001 From: Aleksandr Kuperman Date: Thu, 12 Oct 2023 20:48:10 +0100 Subject: [PATCH] doc: adding and updating readme-s --- README.md | 7 +++++++ scripts/deployment/README.md | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/README.md b/README.md index b1674d1..8e5f279 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,13 @@ Run the tests: npx hardhat test ``` +## Deployment and redeployment +The deployment of contracts to the test- and main-net is split into step-by-step series of scripts for more control and checkpoint convenience. +The description of deployment procedure can be found here: [deployment](https://github.com/valory-xyz/ai-registry-mech/blob/main/scripts/deployment). + +The finalized contract ABIs for deployment and their number of optimization passes are located here: [ABIs](https://github.com/valory-xyz/ai-registry-mech/blob/main/abis). +Each folder there contains contracts compiled with the solidity version before their deployment. + ## Acknowledgements The registries contracts were inspired and based on the following sources: - [Rari-Capital Solmate](https://github.com/Rari-Capital/solmate). diff --git a/scripts/deployment/README.md b/scripts/deployment/README.md index 3f633d2..b7abae4 100644 --- a/scripts/deployment/README.md +++ b/scripts/deployment/README.md @@ -44,3 +44,8 @@ Each script controls the obtained values by checking them against the expected o If a contract is deployed with arguments, these arguments are taken from the corresponding `verify_number_and_name` file, where `number_and_name` corresponds to the deployment script number and name. To verify a mech use `e_check_04_agent_mech.js` and first ensure that `globals.json` contains the mech data, e.g: `"agentMechAddress":"0x3504fb5053ec12f748017248a395b4ed31739705","agentId":1,"price":"10000000000000000"` + +## Redeployment in case of changing AgentMech or AgentFactory +Each AgentMech contract is created via the AgentFactory, essentially inheriting the AgentMech contract bytecode. If AgentMech +and / or AgentFactory is changed, the AgentFactory contract must be redeployed (`deploy_02_agent_factory.js`). Moreover, +the manager of the AgentRegistry must be updated with a new deployed AgentFactory contract address (`deploy_03_change_manager.js`).