diff --git a/contracts/v1/assets/ContentAsset.sol b/contracts/v1/assets/ContentAsset.sol index 407fbb30..0486b889 100644 --- a/contracts/v1/assets/ContentAsset.sol +++ b/contracts/v1/assets/ContentAsset.sol @@ -43,7 +43,7 @@ contract ContentAsset is Named, Versioned, HubDependent, Initializable { event AssetUpdatePaymentIncreased(address indexed assetContract, uint256 indexed tokenId, uint96 tokenAmount); string private constant _NAME = "ContentAsset"; - string private constant _VERSION = "1.0.2"; + string private constant _VERSION = "1.0.3"; Assertion public assertionContract; HashingProxy public hashingProxy; diff --git a/deployments/gnosis_chiado_dev_contracts.json b/deployments/gnosis_chiado_dev_contracts.json index 0133fb7e..7b7491a2 100644 --- a/deployments/gnosis_chiado_dev_contracts.json +++ b/deployments/gnosis_chiado_dev_contracts.json @@ -265,12 +265,12 @@ "deployed": true }, "ContentAsset": { - "evmAddress": "0x84a17b70881aaDC2D7af9d6b0C84F3a354aD86D7", - "version": "1.0.2", + "evmAddress": "0x0859A16c0A46276aB645F23B3a9de64fbF23f0f7", + "version": "1.0.3", "gitBranch": "main", - "gitCommitHash": "8877334d94d89edfa2fea5bff3cd7f367a8609ae", - "deploymentBlock": 8202448, - "deploymentTimestamp": 1707754968110, + "gitCommitHash": "a19d8d3030a292863fe2b84635f7917575952b32", + "deploymentBlock": 8868369, + "deploymentTimestamp": 1711100974304, "deployed": true } } diff --git a/deployments/otp_devnet_contracts.json b/deployments/otp_devnet_contracts.json index 3c76ffe5..76a491c5 100644 --- a/deployments/otp_devnet_contracts.json +++ b/deployments/otp_devnet_contracts.json @@ -33,13 +33,14 @@ "deployed": true }, "ContentAsset": { - "deployed": true, - "deploymentTimestamp": 1701163615555, - "evmAddress": "0xC13016c8E8053c482F806A4AEb1e91E045036c82", + "evmAddress": "0xC486F2F47D42fD65eC932354c39FD37F848727c6", + "substrateAddress": "5EMjsd11Z6ZhxveSJkRNWMWUfRpyojNDKu66p83W8rcLNFUQ", + "version": "1.0.3", "gitBranch": "main", - "gitCommitHash": "7c5fb6a77323e20d2a9be46e0533c9453300db4a", - "substrateAddress": "5EMjsczztHhHRgmof318UvrkvZegnvBgCUyo3fMPurMC6uJB", - "version": "1.0.2" + "gitCommitHash": "a19d8d3030a292863fe2b84635f7917575952b32", + "deploymentBlock": 4250400, + "deploymentTimestamp": 1711100907997, + "deployed": true }, "ContentAssetStorage": { "deployed": true, diff --git a/deployments/parameters.json b/deployments/parameters.json index 468c6100..38bd62c0 100644 --- a/deployments/parameters.json +++ b/deployments/parameters.json @@ -495,6 +495,84 @@ } }, "mainnet": { + "overrides": { + "otp_mainnet": { + "ParametersStorage": { + "stakeWithdrawalDelay": "300", + "updateCommitWindowDuration": "3600" + } + }, + "gnosis_mainnet": { + "CommitManagerV1": { + "reqs": [ + { + "desiredValue": false, + "getterArgs": [0], + "setter": "setReq", + "setterArgs": [0, false] + }, + { + "desiredValue": false, + "getterArgs": [1], + "setter": "setReq", + "setterArgs": [1, false] + }, + { + "desiredValue": false, + "getterArgs": [2], + "setter": "setReq", + "setterArgs": [2, false] + }, + { + "desiredValue": false, + "getterArgs": [3], + "setter": "setReq", + "setterArgs": [3, false] + } + ] + }, + "CommitManagerV1U1": { + "reqs": [ + { + "desiredValue": false, + "getterArgs": [0], + "setter": "setReq", + "setterArgs": [0, false] + }, + { + "desiredValue": false, + "getterArgs": [1], + "setter": "setReq", + "setterArgs": [1, false] + }, + { + "desiredValue": false, + "getterArgs": [2], + "setter": "setReq", + "setterArgs": [2, false] + }, + { + "desiredValue": false, + "getterArgs": [3], + "setter": "setReq", + "setterArgs": [3, false] + }, + { + "desiredValue": false, + "getterArgs": [4], + "setter": "setReq", + "setterArgs": [4, false] + }, + { + "desiredValue": false, + "getterArgs": [5], + "setter": "setReq", + "setterArgs": [5, false] + } + ] + } + } + }, "CommitManagerV1": { "reqs": [ { diff --git a/utils/helpers.ts b/utils/helpers.ts index 687a7657..b917dd06 100644 --- a/utils/helpers.ts +++ b/utils/helpers.ts @@ -55,10 +55,20 @@ type ContractParametersConfig = { [parameter: string]: ContractParameter | string | ContractParameter[]; }; -type EnvironmentParametersConfig = { +type BaseEnvironmentParametersConfig = { [contractName: string]: ContractParametersConfig; }; +type OverridesConfig = { + overrides?: { + [network: string]: { + [contractName: string]: ContractParametersConfig; + }; + }; +}; + +type EnvironmentParametersConfig = BaseEnvironmentParametersConfig & OverridesConfig; + type ParametersConfig = { [environment: string]: EnvironmentParametersConfig; }; @@ -230,8 +240,13 @@ export class Helpers { } public async updateContractParameters(contractName: string, contract: Contract) { - const parameters = - this.parametersConfig[this.hre.network.config.environment as keyof ParametersConfig]?.[contractName]; + let parameters = this.parametersConfig[this.hre.network.config.environment]?.[contractName]; + + const overrideParameters = + this.parametersConfig[this.hre.network.config.environment]?.overrides?.[this.hre.network.name]?.[contractName]; + + parameters = { ...parameters, ...overrideParameters }; + if (!parameters) { return; }