{"id":19070815,"url":"https://github.com/mento-protocol/mento-deployment","last_synced_at":"2025-04-28T14:44:44.593Z","repository":{"id":65322585,"uuid":"587800161","full_name":"mento-protocol/mento-deployment","owner":"mento-protocol","description":"This repository contains scripts necessary to deploy upgrades to the Mento protocol","archived":false,"fork":false,"pushed_at":"2025-04-24T13:10:58.000Z","size":18646,"stargazers_count":7,"open_issues_count":3,"forks_count":2,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-24T13:25:47.722Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mento-protocol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-01-11T16:06:25.000Z","updated_at":"2025-04-17T14:55:15.000Z","dependencies_parsed_at":"2024-11-14T13:35:18.916Z","dependency_job_id":"a383ba67-f7fc-4929-bdee-bb7e4cd8def2","html_url":"https://github.com/mento-protocol/mento-deployment","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mento-protocol%2Fmento-deployment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mento-protocol%2Fmento-deployment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mento-protocol%2Fmento-deployment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mento-protocol%2Fmento-deployment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mento-protocol","download_url":"https://codeload.github.com/mento-protocol/mento-deployment/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251332457,"owners_count":21572623,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T01:20:42.801Z","updated_at":"2025-04-28T14:44:44.528Z","avatar_url":"https://github.com/mento-protocol.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mento Deployment\n\nThis repo contains scripts for deploying \u0026 proposing upgrades to the Mento protocol. It can be used for both Mento and Celo governance proposals.\nDeployments for the core contracts are done using [Foundry solidity scripting](https://book.getfoundry.sh/tutorials/solidity-scripting).\n\n## Getting Started\n\n```bash\n# Get the latest code\ngit clone git@github.com:mento-protocol/mento-deployment.git\n\n# Change directory to the the newly cloned repo\ncd mento-deployment\n\n# Install the project dependencies \u0026 build the contracts\nyarn install \u0026\u0026 forge install \u0026\u0026 forge build\n\n# Create your .env file (Replace the PK for deployer account)\ncp .env.example .env\n\n# Pull secrets from GCP\nyarn secrets:get\n\n# Execute scripts using forge script command\nforge script DeployCircuitBreaker --rpc-url $ALFAJORES_RPC_URL --broadcast --legacy --verify --verifier sourcify\n```\n\n## Deployment Structure\n\nThe deployment scripts are organized in the following structure:\n\n- `contracts/`: Contains helper contracts that aren't core, for example a DummyERC20 contract used on testnets\n- `script/`: Contains all the Foundry deployment scripts\n  - `script/upgrades/`: Contains all the upgrade scripts, which serve as a migration from one version of mento to another\n    - `script/upgrades/MU01/`: Contains all the upgrade scripts to migrate from version v1.0.0. to v2.0.0\n  - `script/dev/`: Contains dev scripts that are used in the deployment process, especially on testnets, but aren't central to the upgrade.\n  - `script/utils/`: Contains helpers and utilities used in the deployment and governance operations using Celo Governance.\n  - `script/utils/mento`: Contains helpers and utilities used in the deployment and governance operations using Mento Governance.\n- `bin/`: Contains bash/typescript scripts that are used to execute the deployment process.\n- `broadcast/`: Contains the broadcasted transactions for the deployment process.\n\n## Scripts\n\nThe scripts tend to follow a similar structure, and are either simple helpers or wrappers for the `forge script` command.\n\nGeneral options will include:\n\n- `-n`: The network to run on, e.g. `celo` or `alfajores`\n- `-u`: The upgrade number, e.g. `MU01`\n- `-g`: The governance that will be used, e.g. `celo` or `mento`\n\nCheck the script file for more details on usage but here's a quick overview:\n\n```bash\n# Clean the broadcast folder, will remove all broadcast files pertaining to that network and upgrade combination\n\u003e yarn clean -n alfajores -u MU01\n\n# Show the list of deployed contracts and their addresses\n\u003e yarn show -n alfajores -u MU01\n{\"name\":\"BreakerBoxProxy\",\"address\":\"0xB881aF21C5A9ff8e8d5E4C900F67F066C6CB7936\"}\n{\"name\":\"BiPoolManagerProxy\",\"address\":\"0xFF9a3da00F42839CD6D33AD7adf50bCc97B41411\"}\n{\"name\":\"BrokerProxy\",\"address\":\"0x6723749339e320E1EFcd9f1B0D997ecb45587208\"}\n{\"name\":\"PartialReserveProxy\",\"address\":\"0x5186f2871b81F057E249c4f4c940a20D2\"}\n# ...\n\n# Run a development script, with no selector\n\u003e yarn script:dev -n alfajores\n Network is alfajores\n==================================================================\n👇 Pick a script to run\n------------------------------------------------------------------\n1) AddOtherReserveAddress        4) CreateMockBridgedUSDC\n2) ChangeTestnetMockBridgedUSDC  5) DrainPartialReserve\n3) CreateMockBridgedEUROC        6) FundPartialReserve\n#?\n\n# Run a development script by index\n\u003e yarn script:dev -n alfajores -i 2\n📠 Network is alfajores\n==================================================================\n🔥 Running CreateMockBridgedUSDC\n==================================================================\n\n# Run a development script by name\n\u003e yarn script:dev -n alfajores -s CreateMockBridgedUSDC\n📠 Network is alfajores\n==================================================================\n🔥 Running CreateMockBridgedUSDC\n==================================================================\n\n# Run an upgrade deployment, will run all deploy scripts in an upgrade\n\u003e yarn deploy -n alfajores -u MU01\n\n# Submit an upgrade proposal, will output the proposal ID\n\u003e yarn cgp -n alfajores -u MU01 -g celo\n\n# Pass a CGP on testnets\n\u003e yarn cgp:pass -n alfajores -g celo -p \u003cproposal-id\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmento-protocol%2Fmento-deployment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmento-protocol%2Fmento-deployment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmento-protocol%2Fmento-deployment/lists"}