Blockwell

SWARM

ERC20

This contract is an ERC20 token.

Name SWARM
Symbol SWM
Decimals 18
Total Supply 100,000,000 SWM

About link description

Swarm provides a blockchain agnostic open infrastructure for digital securities, powered by the SWM ERC-20 utility token. Token issuers stake SWM when issuing a security token on any integrated blockchain (Ethereum, Stellar, or TRON), and SWM is staked to own and operate Swarm Masternodes, which maintain Market Access Protocol (MAP) and facilitate the compliant transfer of digital securities. Token holders may use SWM for community governance of the network, and SWM can also be used, alongside many other cryptocurrencies, for fundraising and settlement with service providers across the MAP network. Swarm's vision is to improve access to financial investment opportunities by promoting and supporting the tokenization of assets, and by providing infrastructure for free.

Stats

Public Functions 21
Event Types 6
Code Size 9,215 bytes

Approval Event

Parameters help
owner
address help
spender
address help
value
uint256 help

ClaimedEther Event

Parameters help
controller
address help
amount
uint256 help

ClaimedTokens Event

Parameters help
token
address help
controller
address help
amount
uint256 help

ControllerTransferred Event

Parameters help
recipient
address help

DocumentUpdated Event

Parameters help
hash
bytes32 help
url
string help

Transfer Event

Parameters help
from
address help
to
address help
value
uint256 help

Document Event

Members
hash
bytes32 help
url
string help

Functions Expand All Collapse All

controller keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
    function controller() public view returns (address) {
        return _controller;
    }

transferController keyboard_arrow_up

Parameters help

Name Type
recipient
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function transferController(address recipient) public onlyController {
        require(recipient != address(0), "Controlled: new controller is the zero address");
        _controller = recipient;
        emit ControllerTransferred(_controller);
    }

name keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
    function name() public view returns (string memory) {
        return _name;
    }

symbol keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
    function symbol() public view returns (string memory) {
        return _symbol;
    }

decimals keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
    function decimals() public view returns (uint8) {
        return _decimals;
    }

totalSupply keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
    function totalSupply() public view returns (uint256) {
        return _totalSupply;
    }

balanceOf keyboard_arrow_up

Parameters help

Name Type
account
address help

Properties

Visibility help public
Mutability help view
Source Code
    function balanceOf(address account) public view returns (uint256) {
        return _balances[account];
    }

transfer keyboard_arrow_up

Parameters help

Name Type
recipient
address help
amount
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function transfer(address recipient, uint256 amount) public returns (bool) {
        _transfer(msg.sender, recipient, amount);
        return true;
    }

allowance keyboard_arrow_up

Parameters help

Name Type
owner
address help
spender
address help

Properties

Visibility help public
Mutability help view
Source Code
    function allowance(address owner, address spender) public view returns (uint256) {
        return _allowances[owner][spender];
    }

approve keyboard_arrow_up

Parameters help

Name Type
spender
address help
value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function approve(address spender, uint256 value) public returns (bool) {
        _approve(msg.sender, spender, value);
        return true;
    }

transferFrom keyboard_arrow_up

Parameters help

Name Type
sender
address help
recipient
address help
amount
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount));
        return true;
    }

increaseAllowance keyboard_arrow_up

Parameters help

Name Type
spender
address help
addedValue
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
        _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));
        return true;
    }

decreaseAllowance keyboard_arrow_up

Parameters help

Name Type
spender
address help
subtractedValue
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
        _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue));
        return true;
    }

burn keyboard_arrow_up

Parameters help

Name Type
amount
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
    function burn(uint256 amount) public {
        _burn(msg.sender, amount);
    }

burnFrom keyboard_arrow_up

Parameters help

Name Type
account
address help
amount
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function burnFrom(address account, uint256 amount) public {
        _burnFrom(account, amount);
    }

approveAndCall keyboard_arrow_up

Parameters help

Name Type
spender
address help
value
uint256 help
extraData
bytes help

Properties

Visibility help public
Mutability help transaction
Source Code
    function approveAndCall(address spender, uint256 value, bytes memory extraData) public returns (bool) {
        require(value == 0 || allowance(msg.sender, spender) == 0, 'SwarmToken: not clean allowance state');

        _approve(msg.sender, spender, value);
        ISwarmTokenRecipient(spender).receiveApproval(msg.sender, value, address(this), extraData);
        return true;
    }

getDocument keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help view
Source Code
    function getDocument() external view returns (bytes32, string memory) {
        return (_document.hash, _document.url);
    }

updateDocument keyboard_arrow_up

Parameters help

Name Type
hash
bytes32 help
url
string help

Properties

Visibility help public
Mutability help transaction
Source Code
    function updateDocument(bytes32 hash, string calldata url) external onlyController returns (bool) {
        return _updateDocument(hash, url);
    }

claimTokens keyboard_arrow_up

Parameters help

Name Type
token
IERC20 help

Properties

Visibility help public
Mutability help transaction
Source Code
    function claimTokens(IERC20 token) external onlyController returns (bool) {
        uint256 balance = token.balanceOf(address(this));
        token.transfer(msg.sender, balance);

        emit ClaimedTokens(address(token), msg.sender, balance);

        return true;
    }

claimEther keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
    function claimEther() external onlyController returns (bool) {
        uint256 balance = address(this).balance;
        msg.sender.transfer(balance);

        emit ClaimedEther(msg.sender, balance);

        return true;
    }

constructor keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help payable

Requirements help

Source Code
    function() external payable {
        require(msg.data.length == 0);
    }