Skip to content

Latest commit

 

History

History
187 lines (115 loc) · 5.01 KB

File metadata and controls

187 lines (115 loc) · 5.01 KB

Base Module

This document defines Base Module for the CMTA Token specification.

[TOC]

Rationale

The Base Module sets forth the basic functionalities a token must have to comply with the CMTAT framework, for tokens representing equity securities as well as tokens representing and debt securities. Here a quick list :

  • Terms of tokenization
  • Token ID (ISIN or other identifier)
  • Others fields to allow the issuer to add additional information: information, flag
  • The "killswitch" function

Schema

Inheritance

surya_inheritance_BaseModule.sol

UML

BaseModule

Graph

surya_graph_BaseModule.sol

Sūrya's Description Report

Files Description Table

File Name SHA-1 Hash
./modules/wrapper/mandatory/BaseModule.sol 2f3dff2a6760314b7469f2c1e95edc2a73709359

Contracts Description Table

Contract Type Bases
Function Name Visibility Mutability Modifiers
BaseModule Implementation AuthorizationModule, OnlyDelegateCallModule
__Base_init Internal 🔒 🛑 onlyInitializing
__Base_init_unchained Internal 🔒 🛑 onlyInitializing
setTokenId Public ❗️ 🛑 onlyRole
setTerms Public ❗️ 🛑 onlyRole
setInformation Public ❗️ 🛑 onlyRole
setFlag Public ❗️ 🛑 onlyRole
kill Public ❗️ 🛑 onlyRole onlyDelegateCall

Legend

Symbol Meaning
🛑 Function can modify state
💵 Function is payable

API for Ethereum

Functions

setTokenId(string)

Definition:
function setTokenId(string memory tokenId_) 
public
Description:

Set the token id to the given string. Only authorized users are allowed to call this function.

setTerms(string)

Definition:
function setTerms(string memory terms_) 
public onlyRole(DEFAULT_ADMIN_ROLE)
Description:

Set the terms to the given string. Only authorized users are allowed to call this function.

setInformation(string)

Definition:
function setInformation(string memory information_) 
public onlyRole(DEFAULT_ADMIN_ROLE) 
Description:

Set the informationto the givenuint256`. Only authorized users are allowed to call this function.

setFlag(uint256)

Definition:
function setFlag(uint256 flag_) 
public onlyRole(DEFAULT_ADMIN_ROLE)
Description:

Set the flag to the given uint256. Only authorized users are allowed to call this function.

kill

Definition:
function kill()
public onlyRole(DEFAULT_ADMIN_ROLE) onlyDelegateCall(deployedWithProxy)
Description:

Destroys the contract, send the remaining ethers to msg.sender

Events

Term(string)

Definition:
event Term(string indexed newTermIndexed, string newTerm)
Description:

Emitted when the variable terms is set to newTerm.

tokenId(string,string

Definition:
event TokenId(string indexed newTokenIdIndexed, string newTokenId)
Description:

Emitted when tokenId is set to newTokenId.

Information(string,string)

Definition:
event Information(string indexed newInformationIndexed, string newInformation)
Description:

Emitted when the variable information is set to newInformation.

Flag(uint256)

Definition:
event Flag(uint256 indexed newFlag)
Description:

Emitted when the variable flag is set to newFlag.