From ae8fab12172a46ec1a73f5b134482c0f89677ba3 Mon Sep 17 00:00:00 2001 From: Daniel Chew Date: Sun, 12 May 2024 19:11:24 +0100 Subject: [PATCH] fix(target_chains/fuel): initialize all storage variables (#1566) * initialize all storage variables * initialize all storage vars --- target_chains/fuel/contracts/pyth-contract/src/main.sw | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/target_chains/fuel/contracts/pyth-contract/src/main.sw b/target_chains/fuel/contracts/pyth-contract/src/main.sw index 4fd155f9b..07b686ead 100644 --- a/target_chains/fuel/contracts/pyth-contract/src/main.sw +++ b/target_chains/fuel/contracts/pyth-contract/src/main.sw @@ -502,6 +502,7 @@ impl PythInit for Contract { i += 1; } + storage.latest_price_feed.write(StorageMap:: {}); storage .valid_time_period_seconds @@ -529,8 +530,12 @@ impl PythInit for Contract { storage.governance_data_source.write(governance_data_source); storage.wormhole_governance_data_source.write(wormhole_governance_data_source); - + storage.governance_data_source_index.write(0); + storage.wormhole_consumed_governance_actions.write(StorageMap:: {}); storage.chain_id.write(chain_id); + storage.last_executed_governance_sequence.write(0); + + storage.current_implementation.write(Identity::Address(Address::from(ZERO_B256))); // This function revokes ownership of the current owner and disallows any new owners. https://github.com/FuelLabs/sway-libs/blob/8045a19e3297599750abdf6300c11e9927a29d40/libs/src/ownership.sw#L89-L99 renounce_ownership();