mirror of
https://github.com/logos-storage/logos-storage-contracts-eth.git
synced 2026-01-05 06:43:07 +00:00
* Move to ethers 6 and use hardhat ignition for deployments * Update prettier to the last version * Remove comment * Remove npx call in package.json * Remove useless comment * Add localhost configuration for hardhat ignition * Use contract initial balance instead of const value * Update dependencies and use extract mining to a script in order to use hardhat ignition deploy command * Fix deployment modules for local env * Remove unused function * Export contract deployment custom error assert into a function * Refactoring * Remove old deployments folder * Add process names when running concurrently * Remove conditional allowBlocksWithSameTimestamp, set true everytime * Update dependencies * Update Vault tests for ignition * Update token description * Add vault ignition module * Remove old .tool-versions * Fix formatting * Remove deployments folder and add README for previous files references * Put back the comment related to hardhat automine * Set hardhat gas limit to auto and restore manual mining for Vault tests * Apply prettier formatting and bug test with ignition syntax * Add deployments artifacts * Fix build-info ignore * Use HARDHAT_NETWORK env variable to deploy marketplace contract * Add guard to check that configs has tags * Add testnet deployment addresses * Add TOKEN_ADDRESS to reuse the token contract deployed * Fix token deployment with contractAt * Remove localhost deployment artifacts * Add section in README for deployments * Ignore localhost deployments in git * Set mine script for localhost deployment only and add deploy reset command * Remove previous deployment scripts * Fix typo in documentation * Add log when reusing token address * Update testnet artifact reference * Remove HARDHAT_NETWORK and update documentation * fix md format * Npm audit fix * Update dependencies * Remove default deployer * Update commit for last testnet artifacts * Remove deployments files from linea and testnet and update the last commit hashes to those artifacts
34 lines
1.4 KiB
Markdown
34 lines
1.4 KiB
Markdown
# 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/449d64ffc0dc1478d0690d36f037358084a17b09)
|
|
- [Linea](https://github.com/codex-storage/codex-contracts-eth/pull/226/commits/2dddc260152b6e9c24ae372397f9b9b2d27ce8e4)
|