diff --git a/smart-contract/assembly/contracts/deweb-interface.ts b/smart-contract/assembly/contracts/deweb-interface.ts index 0b7706a..0222613 100644 --- a/smart-contract/assembly/contracts/deweb-interface.ts +++ b/smart-contract/assembly/contracts/deweb-interface.ts @@ -3,6 +3,7 @@ import { Context, generateEvent, setBytecode, + Storage, transferCoins, } from '@massalabs/massa-as-sdk'; import { @@ -33,6 +34,7 @@ import { import { _getFileLocations } from './internals/location'; import { _fileInit } from './internals/fileInit'; import { FileInit } from './serializable/FileInit'; +import { DEWEB_VERSION_TAG } from './internals/storageKeys/tags'; /** * Initializes the smart contract. @@ -41,6 +43,9 @@ import { FileInit } from './serializable/FileInit'; export function constructor(_: StaticArray): void { if (!Context.isDeployingContract()) return; + const version = new Args().next().expect('Invalid version'); + Storage.set(DEWEB_VERSION_TAG, stringToBytes(version)); + _setOwner(Context.caller().toString()); }