Skip to main content
Change a library is one of the actions that a smart contract can perform during the action phase. It adds libraries to or removes them from the collection of libraries of this smart contract. It can be appended to an out action list by: The change library action consists of
  • a 7-bit bitmask mode specifying the way of changing the library;
  • a ref to a cell containing the new library code or the hash of this code as an unsigned 256-bit integer.

Modes

The mode can have the following values that can be combined together: The other values of mode are invalid and lead to an error. Simultaneous usage of the AddPrivateLibrary and AddPublicLibrary modes also leads to an error. If the library was present in the collection before, its public/private status is changed according to the mode.

Serialization