Remove deployments folder and add README for previous files references

This commit is contained in:
Arnaud 2025-05-19 09:18:56 +02:00
parent 6d732b7e6c
commit 184355e338
No known key found for this signature in database
GPG Key ID: 20E40A5D3110766F
2 changed files with 33 additions and 102 deletions

File diff suppressed because one or more lines are too long

33
ignition/README.md Normal file
View File

@ -0,0 +1,33 @@
# Deployment
Hardhat Ignition is now used to deploy the contracts, so the old
deployment files are no longer relevant.
However, the ABI of the contracts has changed due to an OpenZeppelin update.
If we ever need to recreate the artifacts from the previous ABI contracts (for any reason),
we can do so using a small script that imports the previously generated files.
Here is an example:
```js
module.exports = buildModule("Token", (m) => {
const previousJsonFile = path.join(__dirname, "./TestToken.json");
const artifact = JSON.parse(fs.readFileSync(previousJsonFile, "utf8"));
const address = artifact.address;
const token = m.contractAt("TestToken", address, {});
return { token };
});
```
Then we can run:
```bash
npx hardhat ignition deploy ignition/modules/migration/token.js --network taiko_test
```
**Note:** Check [this comment](https://github.com/codex-storage/codex-contracts-eth/pull/231#issuecomment-2808996517) for more context.
Here is the list of previous commits containing the ABI contracts that were deployed:
- [Taiko](https://github.com/codex-storage/codex-contracts-eth/commit/1854dfba9991a25532de5f6a53cf50e66afb3c8b)
- [Testnet](https://github.com/codex-storage/codex-contracts-eth/commit/8d19f7650b8516a15aa61e4bec413250dcd24e77)
- [Linea](https://github.com/codex-storage/codex-contracts-eth/pull/226/commits/18253f8a8734900e67abd2410b65a3c369abe326)