Starknet Tokenbound
  • Starknet Tokenbound
    • Introduction to Tokenbound
    • 📘Glossary
    • 💡Frequently Asked Questions
  • SDK
    • Installation
    • ⚡API Reference
  • Toolings
    • 🔗Tokenbound Connectkit
    • 🖼️Tokenbound iFrame
  • Contracts
    • AccountV3
    • Registry
    • Components
      • 📔Account
      • 🔒Lockable
      • Permissionable
      • ✍️Signatory
      • Upgradeable
    • 📔Deployed Addresses
Powered by GitBook
On this page
  • Functions
  • _upgrade
  1. Contracts
  2. Components

Upgradeable

PreviousSignatoryNextDeployed Addresses

Last updated 6 months ago

The UpgradeableComponent is designed for easy upgradability of tokenbound accounts.

The full contract code of the UpgradableComponent can be found .

Functions

_upgrade

fn _upgrade(
    ref self: ComponentState<TContractState>, 
    new_class_hash: ClassHash
);

The _upgrade function replaces the current contract's class hash with a new one provided by new_class_hash.

Parameters

Name
Type
Description

new_class_hash

ClassHash

The class hash of the new contract implementation to upgrade to.

here