Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
Shares
Compiler Version
v0.8.7+commit.e28d00a7
Contract Source Code (Solidity Standard Json-Input format)
/** * SPDX-License-Identifier: LicenseRef-Aktionariat * * MIT License with Automated License Fee Payments * * Copyright (c) 2020 Aktionariat AG (aktionariat.com) * * Permission is hereby granted to any person obtaining a copy of this software * and associated documentation files (the "Software"), to deal in the Software * without restriction, including without limitation the rights to use, copy, * modify, merge, publish, distribute, sublicense, and/or sell copies of the * Software, and to permit persons to whom the Software is furnished to do so, * subject to the following conditions: * * - The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * - All automated license fee payments integrated into this and related Software * are preserved. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ pragma solidity ^0.8.0; import "../ERC20/ERC20Named.sol"; import "../ERC20/IERC677Receiver.sol"; import "../recovery/ERC20Recoverable.sol"; import "../shares/IShares.sol"; /** * @title CompanyName AG Shares * @author Luzius Meisser, [email protected] * * These tokens represent ledger-based securities according to article 973d of the Swiss Code of Obligations. * This smart contract serves as an ownership registry, enabling the token holders to register them as * shareholders in the issuer's shareholder registry. This is equivalent to the traditional system * of having physical share certificates kept at home by the shareholders and a shareholder registry run by * the company. Just like with physical certificates, the owners of the tokens are the owners of the shares. * However, in order to exercise their rights (for example receive a dividend), shareholders must register * themselves. For example, in case the company pays out a dividend to a previous shareholder because * the current shareholder did not register, the company cannot be held liable for paying the dividend to * the "wrong" shareholder. In relation to the company, only the registered shareholders count as such. */ contract Shares is ERC20Recoverable, ERC20Named, IShares{ string public terms; uint256 public override totalShares; // total number of shares, maybe not all tokenized uint256 public invalidTokens; event Announcement(string message); event TokensDeclaredInvalid(address indexed holder, uint256 amount, string message); event ChangeTerms(string terms); event ChangeTotalShares(uint256 total); constructor( string memory _symbol, string memory _name, string memory _terms, uint256 _totalShares, address _owner, IRecoveryHub _recoveryHub ) ERC20Named(_symbol, _name, 0, _owner) ERC20Recoverable(_recoveryHub) { totalShares = _totalShares; terms = _terms; invalidTokens = 0; _recoveryHub.setRecoverable(false); } function setTerms(string memory _terms) external onlyOwner { terms = _terms; emit ChangeTerms(_terms); } /** * Declares the number of total shares, including those that have not been tokenized and those * that are held by the company itself. This number can be substiantially higher than totalSupply() * in case not all shares have been tokenized. Also, it can be lower than totalSupply() in case some * tokens have become invalid. */ function setTotalShares(uint256 _newTotalShares) external onlyOwner() { require(_newTotalShares >= totalValidSupply(), "below supply"); totalShares = _newTotalShares; emit ChangeTotalShares(_newTotalShares); } /** * Allows the issuer to make public announcements that are visible on the blockchain. */ function announcement(string calldata message) external onlyOwner() { emit Announcement(message); } /** * See parent method for collateral requirements. */ function setCustomClaimCollateral(IERC20 collateral, uint256 rate) external onlyOwner() { super._setCustomClaimCollateral(collateral, rate); } function getClaimDeleter() public override view returns (address) { return owner; } /** * Signals that the indicated tokens have been declared invalid (e.g. by a court ruling in accordance * with article 973g of the Swiss Code of Obligations) and got detached from * the underlying shares. Invalid tokens do not carry any shareholder rights any more. * * This function is purely declarative. It does not technically immobilize the affected tokens as * that would give the issuer too much power. */ function declareInvalid(address holder, uint256 amount, string calldata message) external onlyOwner() { uint256 holderBalance = balanceOf(holder); require(amount <= holderBalance, "amount too high"); invalidTokens += amount; emit TokensDeclaredInvalid(holder, amount, message); } /** * The total number of valid tokens in circulation. In case some tokens have been declared invalid, this * number might be lower than totalSupply(). Also, it will always be lower than or equal to totalShares(). */ function totalValidSupply() public view returns (uint256) { return totalSupply() - invalidTokens; } /** * Allows the company to tokenize shares and transfer them e.g to the draggable contract and wrap them. * If these shares are newly created, setTotalShares must be called first in order to adjust the total number of shares. */ function mintAndCall(address shareholder, address callee, uint256 amount, bytes calldata data) external { mint(callee, amount); require(IERC677Receiver(callee).onTokenTransfer(shareholder, amount, data)); } function mint(address target, uint256 amount) public onlyOwner { _mint(target, amount); } function _mint(address account, uint256 amount) internal virtual override { require(totalValidSupply() + amount <= totalShares, "total"); super._mint(account, amount); } function transfer(address to, uint256 value) virtual override(ERC20Recoverable, ERC20Flaggable) public returns (bool) { return super.transfer(to, value); } /** * Transfers _amount tokens to the company and burns them. * The meaning of this operation depends on the circumstances and the fate of the shares does * not necessarily follow the fate of the tokens. For example, the company itself might call * this function to implement a formal decision to destroy some of the outstanding shares. * Also, this function might be called by an owner to return the shares to the company and * get them back in another form under an according agreement (e.g. printed certificates or * tokens on a different blockchain). It is not recommended to call this function without * having agreed with the company on the further fate of the shares in question. */ function burn(uint256 _amount) override external { _transfer(msg.sender, address(this), _amount); _burn(address(this), _amount); } }
// SPDX-License-Identifier: MIT
// Copied and adjusted from OpenZeppelin
// Adjustments:
// - modifications to support ERC-677
// - removed unnecessary require statements
// - removed GSN Context
// - upgraded to 0.8 to drop SafeMath
// - let name() and symbol() be implemented by subclass
// - infinite allowance support, with 2^255 and above considered infinite
// - use upper 32 bits of balance for flags
// - add a global settings variable
pragma solidity ^0.8.0;
import "./IERC20.sol";
import "./IERC677Receiver.sol";
/**
* @dev Implementation of the `IERC20` interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using `_mint`.
* For a generic mechanism see `ERC20Mintable`.
*
* *For a detailed writeup see our guide [How to implement supply
* mechanisms](https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226).*
*
* We have followed general OpenZeppelin guidelines: functions revert instead
* of returning `false` on failure. This behavior is nonetheless conventional
* and does not conflict with the expectations of ERC20 applications.
*
* Additionally, an `Approval` event is emitted on calls to `transferFrom`.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard `decreaseAllowance` and `increaseAllowance`
* functions have been added to mitigate the well-known issues around setting
* allowances. See `IERC20.approve`.
*/
abstract contract ERC20Flaggable is IERC20 {
// as Documented in /doc/infiniteallowance.md
// 0x8000000000000000000000000000000000000000000000000000000000000000
uint256 constant private INFINITE_ALLOWANCE = 2**255;
uint256 private constant FLAGGING_MASK = 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000;
// Documentation of flags used by subclasses:
// NOTE: flags denote the bit number that is being used and must be smaller than 32
// ERC20Draggable: uint8 private constant FLAG_INDEX_VOTED = 1;
// ERC20Recoverable: uint8 private constant FLAG_INDEX_CLAIM_PRESENT = 10;
// ERCAllowlistable: uint8 private constant FLAG_INDEX_ALLOWLIST = 20;
// ERCAllowlistable: uint8 private constant FLAG_INDEX_FORBIDDEN = 21;
// ERCAllowlistable: uint8 private constant FLAG_INDEX_POWERLIST = 22;
mapping (address => uint256) private _balances; // upper 32 bits reserved for flags
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
uint8 public override decimals;
event NameChanged(string name, string symbol);
constructor(uint8 _decimals) {
decimals = _decimals;
}
/**
* @dev See `IERC20.totalSupply`.
*/
function totalSupply() public view override returns (uint256) {
return _totalSupply;
}
/**
* @dev See `IERC20.balanceOf`.
*/
function balanceOf(address account) public view override returns (uint256) {
return uint224 (_balances [account]);
}
function hasFlag(address account, uint8 number) external view returns (bool) {
return hasFlagInternal(account, number);
}
function setFlag(address account, uint8 index, bool value) internal {
uint256 flagMask = 1 << (index + 224);
uint256 balance = _balances [account];
if ((balance & flagMask == flagMask) != value) {
_balances [account] = balance ^ flagMask;
}
}
function hasFlagInternal(address account, uint8 number) internal view returns (bool) {
uint256 flag = 0x1 << (number + 224);
return _balances[account] & flag == flag;
}
/**
* @dev See `IERC20.transfer`.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(msg.sender, recipient, amount);
return true;
}
/**
* @dev See `IERC20.allowance`.
*/
function allowance(address owner, address spender) external view override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See `IERC20.approve`.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 value) external override returns (bool) {
_approve(msg.sender, spender, value);
return true;
}
/**
* @dev See `IERC20.transferFrom`.
*
* Emits an `Approval` event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of `ERC20`;
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `value`.
* - the caller must have allowance for `sender`'s tokens of at least
* `amount`.
*/
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
_transfer(sender, recipient, amount);
uint256 currentAllowance = _allowances[sender][msg.sender];
if (currentAllowance < INFINITE_ALLOWANCE){
// Only decrease the allowance if it was not set to 'infinite'
// Documented in /doc/infiniteallowance.md
_allowances[sender][msg.sender] = currentAllowance - amount;
}
return true;
}
/**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to `transfer`, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a `Transfer` event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
*/
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
_beforeTokenTransfer(sender, recipient, amount);
decreaseBalance(sender, amount);
increaseBalance(recipient, amount);
emit Transfer(sender, recipient, amount);
}
// ERC-677 functionality, can be useful for swapping and wrapping tokens
function transferAndCall(address recipient, uint amount, bytes calldata data) external virtual returns (bool) {
return transfer (recipient, amount)
&& IERC677Receiver (recipient).onTokenTransfer (msg.sender, amount, data);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a `Transfer` event with `from` set to the zero address.
*
* Requirements
*
* - `to` cannot be the zero address.
*/
function _mint(address recipient, uint256 amount) internal virtual {
_beforeTokenTransfer(address(0), recipient, amount);
_totalSupply += amount;
increaseBalance(recipient, amount);
emit Transfer(address(0), recipient, amount);
}
function increaseBalance(address recipient, uint256 amount) private {
require(recipient != address(0x0), "0x0"); // use burn instead
uint256 oldBalance = _balances[recipient];
uint256 newBalance = oldBalance + amount;
require(oldBalance & FLAGGING_MASK == newBalance & FLAGGING_MASK, "overflow");
_balances[recipient] = newBalance;
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a `Transfer` event with `to` set to the zero address.
*
* Requirements
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
_beforeTokenTransfer(account, address(0), amount);
_totalSupply -= amount;
decreaseBalance(account, amount);
emit Transfer(account, address(0), amount);
}
function decreaseBalance(address sender, uint256 amount) private {
uint256 oldBalance = _balances[sender];
uint256 newBalance = oldBalance - amount;
require(oldBalance & FLAGGING_MASK == newBalance & FLAGGING_MASK, "underflow");
_balances[sender] = newBalance;
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
*
* This is internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an `Approval` event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(address owner, address spender, uint256 value) internal {
_allowances[owner][spender] = value;
emit Approval(owner, spender, value);
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be to transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
// solhint-disable-next-line no-empty-blocks
function _beforeTokenTransfer(address from, address to, uint256 amount) virtual internal {
// intentionally left blank
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./ERC20Flaggable.sol";
import "../utils/Ownable.sol";
contract ERC20Named is ERC20Flaggable, Ownable {
string public override name;
string public override symbol;
constructor(string memory _symbol, string memory _name, uint8 _decimals, address _admin) ERC20Flaggable(_decimals) Ownable(_admin) {
setNameInternal(_symbol, _name);
}
function setName(string memory _symbol, string memory _name) external onlyOwner {
setNameInternal(_symbol, _name);
}
function setNameInternal(string memory _symbol, string memory _name) internal {
symbol = _symbol;
name = _name;
emit NameChanged(_name, _symbol);
}
}/**
* SPDX-License-Identifier: MIT
*
* Copyright (c) 2016-2019 zOS Global Limited
*
*/
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP. Does not include
* the optional functions; to access them see `ERC20Detailed`.
*/
interface IERC20 {
// Optional functions
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a `Transfer` event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through `transferFrom`. This is
* zero by default.
*
* This value changes when `approve` or `transferFrom` are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* > Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an `Approval` event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a `Transfer` event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to `approve`. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IERC677Receiver {
function onTokenTransfer(address from, uint256 amount, bytes calldata data) external returns (bool);
}/**
* SPDX-License-Identifier: LicenseRef-Aktionariat
*
* MIT License with Automated License Fee Payments
*
* Copyright (c) 2020 Aktionariat AG (aktionariat.com)
*
* Permission is hereby granted to any person obtaining a copy of this software
* and associated documentation files (the "Software"), to deal in the Software
* without restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies of the
* Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* - The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* - All automated license fee payments integrated into this and related Software
* are preserved.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
pragma solidity ^0.8.0;
import "../ERC20/ERC20Flaggable.sol";
import "./IRecoveryHub.sol";
import "./IRecoverable.sol";
/**
* @title Recoverable
* In case of tokens that represent real-world assets such as shares of a company, one needs a way
* to handle lost private keys. With physical certificates, courts can declare share certificates as
* invalid so the company can issue replacements. Here, we want a solution that does not depend on
* third parties to resolve such cases. Instead, when someone has lost a private key, he can use the
* declareLost function on the recovery hub to post a deposit and claim that the shares assigned to a
* specific address are lost.
* If an attacker trying to claim shares belonging to someone else, they risk losing the deposit
* as it can be claimed at anytime by the rightful owner.
* Furthermore, if "getClaimDeleter" is defined in the subclass, the returned address is allowed to
* delete claims, returning the collateral. This can help to prevent obvious cases of abuse of the claim
* function, e.g. cases of front-running.
* Most functionality is implemented in a shared RecoveryHub.
*/
abstract contract ERC20Recoverable is ERC20Flaggable, IRecoverable {
uint8 private constant FLAG_CLAIM_PRESENT = 10;
// ERC-20 token that can be used as collateral or 0x0 if disabled
IERC20 public customCollateralAddress;
// Rate the custom collateral currency is multiplied to be valued like one share.
uint256 public customCollateralRate;
uint256 constant CLAIM_PERIOD = 180 days;
IRecoveryHub public immutable recovery;
constructor(IRecoveryHub recoveryHub){
recovery = recoveryHub;
}
/**
* Returns the collateral rate for the given collateral type and 0 if that type
* of collateral is not accepted. By default, only the token itself is accepted at
* a rate of 1:1.
*
* Subclasses should override this method if they want to add additional types of
* collateral.
*/
function getCollateralRate(IERC20 collateralType) public override virtual view returns (uint256) {
if (address(collateralType) == address(this)) {
return 1;
} else if (collateralType == customCollateralAddress) {
return customCollateralRate;
} else {
return 0;
}
}
function claimPeriod() external pure override returns (uint256){
return CLAIM_PERIOD;
}
/**
* Allows subclasses to set a custom collateral besides the token itself.
* The collateral must be an ERC-20 token that returns true on successful transfers and
* throws an exception or returns false on failure.
* Also, do not forget to multiply the rate in accordance with the number of decimals of the collateral.
* For example, rate should be 7*10**18 for 7 units of a collateral with 18 decimals.
*/
function _setCustomClaimCollateral(IERC20 collateral, uint256 rate) internal {
customCollateralAddress = collateral;
if (address(customCollateralAddress) == address(0)) {
customCollateralRate = 0; // disabled
} else {
require(rate > 0, "zero");
customCollateralRate = rate;
}
}
function getClaimDeleter() virtual public view returns (address);
function transfer(address recipient, uint256 amount) override(ERC20Flaggable, IERC20) virtual public returns (bool) {
require(super.transfer(recipient, amount), "transfer");
if (hasFlagInternal(msg.sender, FLAG_CLAIM_PRESENT)){
recovery.clearClaimFromToken(msg.sender);
}
return true;
}
function notifyClaimMade(address target) external override {
require(msg.sender == address(recovery), "not recovery");
setFlag(target, FLAG_CLAIM_PRESENT, true);
}
function notifyClaimDeleted(address target) external override {
require(msg.sender == address(recovery), "not recovery");
setFlag(target, FLAG_CLAIM_PRESENT, false);
}
function deleteClaim(address lostAddress) external {
require(msg.sender == getClaimDeleter(), "not claim deleter");
recovery.deleteClaim(lostAddress);
}
function recover(address oldAddress, address newAddress) external override {
require(msg.sender == address(recovery), "not recovery");
_transfer(oldAddress, newAddress, balanceOf(oldAddress));
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../ERC20/IERC20.sol";
interface IRecoverable is IERC20{
function claimPeriod() external view returns (uint256);
function notifyClaimMade(address target) external;
function notifyClaimDeleted(address target) external;
function getCollateralRate(IERC20 collateral) external view returns(uint256);
function recover(address oldAddress, address newAddress) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IRecoveryHub {
function setRecoverable(bool flag) external;
// deletes claim and transfers collateral back to claimer
function deleteClaim(address target) external;
// clears claim and transfers collateral to holder
function clearClaimFromToken(address holder) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IShares {
function burn(uint256) external;
function totalShares() external view returns (uint256);
}// SPDX-License-Identifier: MIT
//
// From https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol
//
// Modifications:
// - Replaced Context._msgSender() with msg.sender
// - Made leaner
// - Extracted interface
pragma solidity ^0.8.0;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor (address initialOwner) {
owner = initialOwner;
emit OwnershipTransferred(address(0), owner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) external onlyOwner {
emit OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
modifier onlyOwner() {
require(owner == msg.sender, "not owner");
_;
}
}{
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs",
"useLiteralContent": true
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": [],
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_terms","type":"string"},{"internalType":"uint256","name":"_totalShares","type":"uint256"},{"internalType":"address","name":"_owner","type":"address"},{"internalType":"contract IRecoveryHub","name":"_recoveryHub","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"message","type":"string"}],"name":"Announcement","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"terms","type":"string"}],"name":"ChangeTerms","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"total","type":"uint256"}],"name":"ChangeTotalShares","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"string","name":"symbol","type":"string"}],"name":"NameChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"holder","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"string","name":"message","type":"string"}],"name":"TokensDeclaredInvalid","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"message","type":"string"}],"name":"announcement","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"customCollateralAddress","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customCollateralRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"holder","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"string","name":"message","type":"string"}],"name":"declareInvalid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"lostAddress","type":"address"}],"name":"deleteClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getClaimDeleter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"collateralType","type":"address"}],"name":"getCollateralRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint8","name":"number","type":"uint8"}],"name":"hasFlag","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"invalidTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"shareholder","type":"address"},{"internalType":"address","name":"callee","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"mintAndCall","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"notifyClaimDeleted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"notifyClaimMade","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"oldAddress","type":"address"},{"internalType":"address","name":"newAddress","type":"address"}],"name":"recover","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"recovery","outputs":[{"internalType":"contract IRecoveryHub","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"collateral","type":"address"},{"internalType":"uint256","name":"rate","type":"uint256"}],"name":"setCustomClaimCollateral","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_name","type":"string"}],"name":"setName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_terms","type":"string"}],"name":"setTerms","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newTotalShares","type":"uint256"}],"name":"setTotalShares","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"terms","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalValidSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"transferAndCall","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60a06040523480156200001157600080fd5b5060405162001e9b38038062001e9b8339810160408190526200003491620002e2565b6003805460ff19169055606081901b6001600160601b031916608052600580546001600160a01b0319166001600160a01b03841690811790915560405187918791600091869182919084907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350620000b1848462000140565b5050506009849055508351620000cf906008906020870190620001ab565b506000600a819055604051636427ed9760e01b815260048101919091526001600160a01b03821690636427ed9790602401600060405180830381600087803b1580156200011b57600080fd5b505af115801562000130573d6000803e3d6000fd5b50505050505050505050620004a7565b815162000155906007906020850190620001ab565b5080516200016b906006906020840190620001ab565b507f6c20b91d1723b78732eba64ff11ebd7966a6e4af568a00fa4f6b72c20f58b02a81836040516200019f929190620003d6565b60405180910390a15050565b828054620001b9906200043b565b90600052602060002090601f016020900481019282620001dd576000855562000228565b82601f10620001f857805160ff191683800117855562000228565b8280016001018555821562000228579182015b82811115620002285782518255916020019190600101906200020b565b50620002369291506200023a565b5090565b5b808211156200023657600081556001016200023b565b600082601f8301126200026357600080fd5b81516001600160401b038082111562000280576200028062000478565b604051601f8301601f19908116603f01168101908282118183101715620002ab57620002ab62000478565b81604052838152866020858801011115620002c557600080fd5b620002d884602083016020890162000408565b9695505050505050565b60008060008060008060c08789031215620002fc57600080fd5b86516001600160401b03808211156200031457600080fd5b620003228a838b0162000251565b975060208901519150808211156200033957600080fd5b620003478a838b0162000251565b965060408901519150808211156200035e57600080fd5b506200036d89828a0162000251565b94505060608701519250608087015162000387816200048e565b60a08801519092506200039a816200048e565b809150509295509295509295565b60008151808452620003c281602086016020860162000408565b601f01601f19169290920160200192915050565b604081526000620003eb6040830185620003a8565b8281036020840152620003ff8185620003a8565b95945050505050565b60005b83811015620004255781810151838201526020016200040b565b8381111562000435576000848401525b50505050565b600181811c908216806200045057607f821691505b602082108114156200047257634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114620004a457600080fd5b50565b60805160601c6119b2620004e960003960008181610493015281816106f90152818161099901528181610bb801528181610c1a015261103e01526119b26000f3fe608060405234801561001057600080fd5b506004361061021c5760003560e01c8063648bf77411610125578063b0d04c7a116100ad578063ddceafa91161007c578063ddceafa91461048e578063e5b824ec146104b5578063f2fde38b146104c8578063f54fc060146104db578063f5c0b95f146104ee57600080fd5b8063b0d04c7a14610432578063c18172c41461043a578063d50256251461044d578063dd62ed3e1461045557600080fd5b80637dc2cd98116100f45780637dc2cd98146103e85780638da5cb5b146103f157806395d89b4114610404578063a77384c11461040c578063a9059cbb1461041f57600080fd5b8063648bf7741461039c57806370a08231146103af57806377e071ad146103c257806378f86afc146103d557600080fd5b806337a8129c116101a857806340c10f191161017757806340c10f191461034757806342966c681461035a5780635c707f071461036d5780635d6624b714610380578063609181171461039357600080fd5b806337a8129c1461030f5780633a1cdf32146103185780633a98ef391461032b5780634000aea01461033457600080fd5b80631f0f06aa116101ef5780631f0f06aa146102a457806323b872dd146102b95780632a0a4ed5146102cc578063313ce567146102dd57806332a7ae95146102fc57600080fd5b806306fdde0314610221578063095ea7b31461023f5780630c6f0e5d1461026257806318160ddd14610292575b600080fd5b610229610501565b6040516102369190611811565b60405180910390f35b61025261024d36600461157b565b61058f565b6040519015158152602001610236565b60035461027a9061010090046001600160a01b031681565b6040516001600160a01b039091168152602001610236565b6002545b604051908152602001610236565b6102b76102b2366004611659565b6105a5565b005b6102526102c73660046114c7565b610615565b6005546001600160a01b031661027a565b6003546102ea9060ff1681565b60405160ff9091168152602001610236565b6102b761030a366004611471565b61068c565b610296600a5481565b6102b761032636600461157b565b610758565b61029660095481565b6102526103423660046115a7565b610790565b6102b761035536600461157b565b610830565b6102b761036836600461173c565b610864565b6102b761037b3660046116d8565b61087c565b6102b761038e3660046115a7565b6108b0565b61029660045481565b6102b76103aa36600461148e565b61098e565b6102966103bd366004611471565b6109e9565b6102966103d0366004611471565b610a0d565b6102b76103e336600461169b565b610a53565b62ed4e00610296565b60055461027a906001600160a01b031681565b610229610acb565b6102b761041a36600461173c565b610ad8565b61025261042d36600461157b565b610b7d565b610296610b90565b6102b7610448366004611471565b610bad565b610229610c02565b61029661046336600461148e565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61027a7f000000000000000000000000000000000000000000000000000000000000000081565b6102b76104c3366004611471565b610c0f565b6102b76104d6366004611471565b610c64565b6102b76104e9366004611508565b610cea565b6102526104fc366004611603565b610d81565b6006805461050e90611900565b80601f016020809104026020016040519081016040528092919081815260200182805461053a90611900565b80156105875780601f1061055c57610100808354040283529160200191610587565b820191906000526020600020905b81548152906001019060200180831161056a57829003601f168201915b505050505081565b600061059c338484610d8d565b50600192915050565b6005546001600160a01b031633146105d85760405162461bcd60e51b81526004016105cf9061186f565b60405180910390fd5b7f07ce702fc13ca0620c174dab22996a6d5fd9e7accb663555a4e85323692706ba82826040516106099291906117fd565b60405180910390a15050565b6000610622848484610def565b6001600160a01b0384166000908152600160209081526040808320338452909152902054600160ff1b8110156106815761065c83826118e9565b6001600160a01b03861660009081526001602090815260408083203384529091529020555b506001949350505050565b6005546001600160a01b031633146106da5760405162461bcd60e51b81526020600482015260116024820152703737ba1031b630b4b6903232b632ba32b960791b60448201526064016105cf565b6040516332a7ae9560e01b81526001600160a01b0382811660048301527f000000000000000000000000000000000000000000000000000000000000000016906332a7ae9590602401600060405180830381600087803b15801561073d57600080fd5b505af1158015610751573d6000803e3d6000fd5b5050505050565b6005546001600160a01b031633146107825760405162461bcd60e51b81526004016105cf9061186f565b61078c8282610e48565b5050565b600061079c8585610b7d565b80156108275750604051635260769b60e11b81526001600160a01b0386169063a4c0ed36906107d59033908890889088906004016117cb565b602060405180830381600087803b1580156107ef57600080fd5b505af1158015610803573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108279190611637565b95945050505050565b6005546001600160a01b0316331461085a5760405162461bcd60e51b81526004016105cf9061186f565b61078c8282610ebf565b61086f333083610def565b6108793082610f15565b50565b6005546001600160a01b031633146108a65760405162461bcd60e51b81526004016105cf9061186f565b61078c8282610f7d565b6005546001600160a01b031633146108da5760405162461bcd60e51b81526004016105cf9061186f565b60006108e5856109e9565b9050808411156109295760405162461bcd60e51b815260206004820152600f60248201526e0c2dadeeadce840e8dede40d0d2ced608b1b60448201526064016105cf565b83600a600082825461093b91906118ac565b92505081905550846001600160a01b03167f0a605cd1294f60fa3b73548ac68428f33300a051f225afcdcc75e56083c96ee785858560405161097f93929190611892565b60405180910390a25050505050565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109d65760405162461bcd60e51b81526004016105cf90611849565b61078c82826109e4856109e9565b610def565b6001600160a01b03166000908152602081905260409020546001600160e01b031690565b60006001600160a01b038216301415610a2857506001919050565b6003546001600160a01b03838116610100909204161415610a4b57505060045490565b506000919050565b6005546001600160a01b03163314610a7d5760405162461bcd60e51b81526004016105cf9061186f565b8051610a90906008906020840190611302565b507fe9f2468ecc8d3dff15a70a5909151e6297cee4cf05268eff3d7ef0c696ec50f281604051610ac09190611811565b60405180910390a150565b6007805461050e90611900565b6005546001600160a01b03163314610b025760405162461bcd60e51b81526004016105cf9061186f565b610b0a610b90565b811015610b485760405162461bcd60e51b815260206004820152600c60248201526b62656c6f7720737570706c7960a01b60448201526064016105cf565b60098190556040518181527fdcbf73bf1e396dbe03ccbcd29c0aa52eb8028ae24726098296357286de4f5b2690602001610ac0565b6000610b898383610fd6565b9392505050565b6000600a54610b9e60025490565b610ba891906118e9565b905090565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610bf55760405162461bcd60e51b81526004016105cf90611849565b61087981600a60016110ab565b6008805461050e90611900565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614610c575760405162461bcd60e51b81526004016105cf90611849565b61087981600a60006110ab565b6005546001600160a01b03163314610c8e5760405162461bcd60e51b81526004016105cf9061186f565b6005546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600580546001600160a01b0319166001600160a01b0392909216919091179055565b610cf48484610830565b604051635260769b60e11b81526001600160a01b0385169063a4c0ed3690610d269088908790879087906004016117cb565b602060405180830381600087803b158015610d4057600080fd5b505af1158015610d54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d789190611637565b61075157600080fd5b6000610b89838361110f565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b610df9838261114f565b610e0382826111e5565b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610de291815260200190565b60038054610100600160a81b0319166101006001600160a01b038581168202929092179283905590910416610e805760006004555050565b60008111610eb95760405162461bcd60e51b81526004016105cf906020808252600490820152637a65726f60e01b604082015260600190565b60045550565b60095481610ecb610b90565b610ed591906118ac565b1115610f0b5760405162461bcd60e51b81526020600482015260056024820152641d1bdd185b60da1b60448201526064016105cf565b61078c8282611295565b8060026000828254610f2791906118e9565b90915550610f379050828261114f565b6040518181526000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020015b60405180910390a35050565b8151610f90906007906020850190611302565b508051610fa4906006906020840190611302565b507f6c20b91d1723b78732eba64ff11ebd7966a6e4af568a00fa4f6b72c20f58b02a8183604051610609929190611824565b6000610fe283836112f5565b6110195760405162461bcd60e51b81526020600482015260086024820152673a3930b739b332b960c11b60448201526064016105cf565b61102433600a61110f565b1561059c576040516304d301a360e41b81523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690634d301a3090602401600060405180830381600087803b15801561108a57600080fd5b505af115801561109e573d6000803e3d6000fd5b5050505050600192915050565b60006110b88360e06118c4565b6001600160a01b038516600090815260208190526040902054600160ff929092169190911b9150808216821483151514610751576001600160a01b0394909416600090815260208190526040902093189092555050565b60008061111d8360e06118c4565b6001600160a01b038516600090815260208190526040902054600160ff929092169190911b9081161491505092915050565b6001600160a01b0382166000908152602081905260408120549061117383836118e9565b90506001600160e01b031981166001600160e01b03198316146111c45760405162461bcd60e51b8152602060048201526009602482015268756e646572666c6f7760b81b60448201526064016105cf565b6001600160a01b039093166000908152602081905260409020929092555050565b6001600160a01b0382166112215760405162461bcd60e51b815260206004820152600360248201526203078360ec1b60448201526064016105cf565b6001600160a01b0382166000908152602081905260408120549061124583836118ac565b90506001600160e01b031981166001600160e01b03198316146111c45760405162461bcd60e51b81526020600482015260086024820152676f766572666c6f7760c01b60448201526064016105cf565b80600260008282546112a791906118ac565b909155506112b7905082826111e5565b6040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610f71565b600061059c338484610def565b82805461130e90611900565b90600052602060002090601f0160209004810192826113305760008555611376565b82601f1061134957805160ff1916838001178555611376565b82800160010185558215611376579182015b8281111561137657825182559160200191906001019061135b565b50611382929150611386565b5090565b5b808211156113825760008155600101611387565b60008083601f8401126113ad57600080fd5b50813567ffffffffffffffff8111156113c557600080fd5b6020830191508360208285010111156113dd57600080fd5b9250929050565b600082601f8301126113f557600080fd5b813567ffffffffffffffff8082111561141057611410611951565b604051601f8301601f19908116603f0116810190828211818310171561143857611438611951565b8160405283815286602085880101111561145157600080fd5b836020870160208301376000602085830101528094505050505092915050565b60006020828403121561148357600080fd5b8135610b8981611967565b600080604083850312156114a157600080fd5b82356114ac81611967565b915060208301356114bc81611967565b809150509250929050565b6000806000606084860312156114dc57600080fd5b83356114e781611967565b925060208401356114f781611967565b929592945050506040919091013590565b60008060008060006080868803121561152057600080fd5b853561152b81611967565b9450602086013561153b81611967565b935060408601359250606086013567ffffffffffffffff81111561155e57600080fd5b61156a8882890161139b565b969995985093965092949392505050565b6000806040838503121561158e57600080fd5b823561159981611967565b946020939093013593505050565b600080600080606085870312156115bd57600080fd5b84356115c881611967565b935060208501359250604085013567ffffffffffffffff8111156115eb57600080fd5b6115f78782880161139b565b95989497509550505050565b6000806040838503121561161657600080fd5b823561162181611967565b9150602083013560ff811681146114bc57600080fd5b60006020828403121561164957600080fd5b81518015158114610b8957600080fd5b6000806020838503121561166c57600080fd5b823567ffffffffffffffff81111561168357600080fd5b61168f8582860161139b565b90969095509350505050565b6000602082840312156116ad57600080fd5b813567ffffffffffffffff8111156116c457600080fd5b6116d0848285016113e4565b949350505050565b600080604083850312156116eb57600080fd5b823567ffffffffffffffff8082111561170357600080fd5b61170f868387016113e4565b9350602085013591508082111561172557600080fd5b50611732858286016113e4565b9150509250929050565b60006020828403121561174e57600080fd5b5035919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6000815180845260005b818110156117a457602081850181015186830182015201611788565b818111156117b6576000602083870101525b50601f01601f19169290920160200192915050565b60018060a01b03851681528360208201526060604082015260006117f3606083018486611755565b9695505050505050565b6020815260006116d0602083018486611755565b602081526000610b89602083018461177e565b604081526000611837604083018561177e565b8281036020840152610827818561177e565b6020808252600c908201526b6e6f74207265636f7665727960a01b604082015260600190565b6020808252600990820152683737ba1037bbb732b960b91b604082015260600190565b838152604060208201526000610827604083018486611755565b600082198211156118bf576118bf61193b565b500190565b600060ff821660ff84168060ff038211156118e1576118e161193b565b019392505050565b6000828210156118fb576118fb61193b565b500390565b600181811c9082168061191457607f821691505b6020821081141561193557634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461087957600080fdfea26469706673582212200338f91484e3389333834af59b9f21b50c01e20abc379ef0c931c1039ad7b81c64736f6c6343000807003300000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000989680000000000000000000000000ceaf1e934ef1277f0e921f06252e730c2d285dd80000000000000000000000009b886c04ce3cfb74e644de92d65cfb873636e1fb00000000000000000000000000000000000000000000000000000000000000025044000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001650656e73696f6e44796e616d6963732062792049435200000000000000000000000000000000000000000000000000000000000000000000000000000000001a68747470733a2f2f6963722e63682f616b74696f6e6172696174000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061021c5760003560e01c8063648bf77411610125578063b0d04c7a116100ad578063ddceafa91161007c578063ddceafa91461048e578063e5b824ec146104b5578063f2fde38b146104c8578063f54fc060146104db578063f5c0b95f146104ee57600080fd5b8063b0d04c7a14610432578063c18172c41461043a578063d50256251461044d578063dd62ed3e1461045557600080fd5b80637dc2cd98116100f45780637dc2cd98146103e85780638da5cb5b146103f157806395d89b4114610404578063a77384c11461040c578063a9059cbb1461041f57600080fd5b8063648bf7741461039c57806370a08231146103af57806377e071ad146103c257806378f86afc146103d557600080fd5b806337a8129c116101a857806340c10f191161017757806340c10f191461034757806342966c681461035a5780635c707f071461036d5780635d6624b714610380578063609181171461039357600080fd5b806337a8129c1461030f5780633a1cdf32146103185780633a98ef391461032b5780634000aea01461033457600080fd5b80631f0f06aa116101ef5780631f0f06aa146102a457806323b872dd146102b95780632a0a4ed5146102cc578063313ce567146102dd57806332a7ae95146102fc57600080fd5b806306fdde0314610221578063095ea7b31461023f5780630c6f0e5d1461026257806318160ddd14610292575b600080fd5b610229610501565b6040516102369190611811565b60405180910390f35b61025261024d36600461157b565b61058f565b6040519015158152602001610236565b60035461027a9061010090046001600160a01b031681565b6040516001600160a01b039091168152602001610236565b6002545b604051908152602001610236565b6102b76102b2366004611659565b6105a5565b005b6102526102c73660046114c7565b610615565b6005546001600160a01b031661027a565b6003546102ea9060ff1681565b60405160ff9091168152602001610236565b6102b761030a366004611471565b61068c565b610296600a5481565b6102b761032636600461157b565b610758565b61029660095481565b6102526103423660046115a7565b610790565b6102b761035536600461157b565b610830565b6102b761036836600461173c565b610864565b6102b761037b3660046116d8565b61087c565b6102b761038e3660046115a7565b6108b0565b61029660045481565b6102b76103aa36600461148e565b61098e565b6102966103bd366004611471565b6109e9565b6102966103d0366004611471565b610a0d565b6102b76103e336600461169b565b610a53565b62ed4e00610296565b60055461027a906001600160a01b031681565b610229610acb565b6102b761041a36600461173c565b610ad8565b61025261042d36600461157b565b610b7d565b610296610b90565b6102b7610448366004611471565b610bad565b610229610c02565b61029661046336600461148e565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61027a7f0000000000000000000000009b886c04ce3cfb74e644de92d65cfb873636e1fb81565b6102b76104c3366004611471565b610c0f565b6102b76104d6366004611471565b610c64565b6102b76104e9366004611508565b610cea565b6102526104fc366004611603565b610d81565b6006805461050e90611900565b80601f016020809104026020016040519081016040528092919081815260200182805461053a90611900565b80156105875780601f1061055c57610100808354040283529160200191610587565b820191906000526020600020905b81548152906001019060200180831161056a57829003601f168201915b505050505081565b600061059c338484610d8d565b50600192915050565b6005546001600160a01b031633146105d85760405162461bcd60e51b81526004016105cf9061186f565b60405180910390fd5b7f07ce702fc13ca0620c174dab22996a6d5fd9e7accb663555a4e85323692706ba82826040516106099291906117fd565b60405180910390a15050565b6000610622848484610def565b6001600160a01b0384166000908152600160209081526040808320338452909152902054600160ff1b8110156106815761065c83826118e9565b6001600160a01b03861660009081526001602090815260408083203384529091529020555b506001949350505050565b6005546001600160a01b031633146106da5760405162461bcd60e51b81526020600482015260116024820152703737ba1031b630b4b6903232b632ba32b960791b60448201526064016105cf565b6040516332a7ae9560e01b81526001600160a01b0382811660048301527f0000000000000000000000009b886c04ce3cfb74e644de92d65cfb873636e1fb16906332a7ae9590602401600060405180830381600087803b15801561073d57600080fd5b505af1158015610751573d6000803e3d6000fd5b5050505050565b6005546001600160a01b031633146107825760405162461bcd60e51b81526004016105cf9061186f565b61078c8282610e48565b5050565b600061079c8585610b7d565b80156108275750604051635260769b60e11b81526001600160a01b0386169063a4c0ed36906107d59033908890889088906004016117cb565b602060405180830381600087803b1580156107ef57600080fd5b505af1158015610803573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108279190611637565b95945050505050565b6005546001600160a01b0316331461085a5760405162461bcd60e51b81526004016105cf9061186f565b61078c8282610ebf565b61086f333083610def565b6108793082610f15565b50565b6005546001600160a01b031633146108a65760405162461bcd60e51b81526004016105cf9061186f565b61078c8282610f7d565b6005546001600160a01b031633146108da5760405162461bcd60e51b81526004016105cf9061186f565b60006108e5856109e9565b9050808411156109295760405162461bcd60e51b815260206004820152600f60248201526e0c2dadeeadce840e8dede40d0d2ced608b1b60448201526064016105cf565b83600a600082825461093b91906118ac565b92505081905550846001600160a01b03167f0a605cd1294f60fa3b73548ac68428f33300a051f225afcdcc75e56083c96ee785858560405161097f93929190611892565b60405180910390a25050505050565b336001600160a01b037f0000000000000000000000009b886c04ce3cfb74e644de92d65cfb873636e1fb16146109d65760405162461bcd60e51b81526004016105cf90611849565b61078c82826109e4856109e9565b610def565b6001600160a01b03166000908152602081905260409020546001600160e01b031690565b60006001600160a01b038216301415610a2857506001919050565b6003546001600160a01b03838116610100909204161415610a4b57505060045490565b506000919050565b6005546001600160a01b03163314610a7d5760405162461bcd60e51b81526004016105cf9061186f565b8051610a90906008906020840190611302565b507fe9f2468ecc8d3dff15a70a5909151e6297cee4cf05268eff3d7ef0c696ec50f281604051610ac09190611811565b60405180910390a150565b6007805461050e90611900565b6005546001600160a01b03163314610b025760405162461bcd60e51b81526004016105cf9061186f565b610b0a610b90565b811015610b485760405162461bcd60e51b815260206004820152600c60248201526b62656c6f7720737570706c7960a01b60448201526064016105cf565b60098190556040518181527fdcbf73bf1e396dbe03ccbcd29c0aa52eb8028ae24726098296357286de4f5b2690602001610ac0565b6000610b898383610fd6565b9392505050565b6000600a54610b9e60025490565b610ba891906118e9565b905090565b336001600160a01b037f0000000000000000000000009b886c04ce3cfb74e644de92d65cfb873636e1fb1614610bf55760405162461bcd60e51b81526004016105cf90611849565b61087981600a60016110ab565b6008805461050e90611900565b336001600160a01b037f0000000000000000000000009b886c04ce3cfb74e644de92d65cfb873636e1fb1614610c575760405162461bcd60e51b81526004016105cf90611849565b61087981600a60006110ab565b6005546001600160a01b03163314610c8e5760405162461bcd60e51b81526004016105cf9061186f565b6005546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600580546001600160a01b0319166001600160a01b0392909216919091179055565b610cf48484610830565b604051635260769b60e11b81526001600160a01b0385169063a4c0ed3690610d269088908790879087906004016117cb565b602060405180830381600087803b158015610d4057600080fd5b505af1158015610d54573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d789190611637565b61075157600080fd5b6000610b89838361110f565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b610df9838261114f565b610e0382826111e5565b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610de291815260200190565b60038054610100600160a81b0319166101006001600160a01b038581168202929092179283905590910416610e805760006004555050565b60008111610eb95760405162461bcd60e51b81526004016105cf906020808252600490820152637a65726f60e01b604082015260600190565b60045550565b60095481610ecb610b90565b610ed591906118ac565b1115610f0b5760405162461bcd60e51b81526020600482015260056024820152641d1bdd185b60da1b60448201526064016105cf565b61078c8282611295565b8060026000828254610f2791906118e9565b90915550610f379050828261114f565b6040518181526000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020015b60405180910390a35050565b8151610f90906007906020850190611302565b508051610fa4906006906020840190611302565b507f6c20b91d1723b78732eba64ff11ebd7966a6e4af568a00fa4f6b72c20f58b02a8183604051610609929190611824565b6000610fe283836112f5565b6110195760405162461bcd60e51b81526020600482015260086024820152673a3930b739b332b960c11b60448201526064016105cf565b61102433600a61110f565b1561059c576040516304d301a360e41b81523360048201527f0000000000000000000000009b886c04ce3cfb74e644de92d65cfb873636e1fb6001600160a01b031690634d301a3090602401600060405180830381600087803b15801561108a57600080fd5b505af115801561109e573d6000803e3d6000fd5b5050505050600192915050565b60006110b88360e06118c4565b6001600160a01b038516600090815260208190526040902054600160ff929092169190911b9150808216821483151514610751576001600160a01b0394909416600090815260208190526040902093189092555050565b60008061111d8360e06118c4565b6001600160a01b038516600090815260208190526040902054600160ff929092169190911b9081161491505092915050565b6001600160a01b0382166000908152602081905260408120549061117383836118e9565b90506001600160e01b031981166001600160e01b03198316146111c45760405162461bcd60e51b8152602060048201526009602482015268756e646572666c6f7760b81b60448201526064016105cf565b6001600160a01b039093166000908152602081905260409020929092555050565b6001600160a01b0382166112215760405162461bcd60e51b815260206004820152600360248201526203078360ec1b60448201526064016105cf565b6001600160a01b0382166000908152602081905260408120549061124583836118ac565b90506001600160e01b031981166001600160e01b03198316146111c45760405162461bcd60e51b81526020600482015260086024820152676f766572666c6f7760c01b60448201526064016105cf565b80600260008282546112a791906118ac565b909155506112b7905082826111e5565b6040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90602001610f71565b600061059c338484610def565b82805461130e90611900565b90600052602060002090601f0160209004810192826113305760008555611376565b82601f1061134957805160ff1916838001178555611376565b82800160010185558215611376579182015b8281111561137657825182559160200191906001019061135b565b50611382929150611386565b5090565b5b808211156113825760008155600101611387565b60008083601f8401126113ad57600080fd5b50813567ffffffffffffffff8111156113c557600080fd5b6020830191508360208285010111156113dd57600080fd5b9250929050565b600082601f8301126113f557600080fd5b813567ffffffffffffffff8082111561141057611410611951565b604051601f8301601f19908116603f0116810190828211818310171561143857611438611951565b8160405283815286602085880101111561145157600080fd5b836020870160208301376000602085830101528094505050505092915050565b60006020828403121561148357600080fd5b8135610b8981611967565b600080604083850312156114a157600080fd5b82356114ac81611967565b915060208301356114bc81611967565b809150509250929050565b6000806000606084860312156114dc57600080fd5b83356114e781611967565b925060208401356114f781611967565b929592945050506040919091013590565b60008060008060006080868803121561152057600080fd5b853561152b81611967565b9450602086013561153b81611967565b935060408601359250606086013567ffffffffffffffff81111561155e57600080fd5b61156a8882890161139b565b969995985093965092949392505050565b6000806040838503121561158e57600080fd5b823561159981611967565b946020939093013593505050565b600080600080606085870312156115bd57600080fd5b84356115c881611967565b935060208501359250604085013567ffffffffffffffff8111156115eb57600080fd5b6115f78782880161139b565b95989497509550505050565b6000806040838503121561161657600080fd5b823561162181611967565b9150602083013560ff811681146114bc57600080fd5b60006020828403121561164957600080fd5b81518015158114610b8957600080fd5b6000806020838503121561166c57600080fd5b823567ffffffffffffffff81111561168357600080fd5b61168f8582860161139b565b90969095509350505050565b6000602082840312156116ad57600080fd5b813567ffffffffffffffff8111156116c457600080fd5b6116d0848285016113e4565b949350505050565b600080604083850312156116eb57600080fd5b823567ffffffffffffffff8082111561170357600080fd5b61170f868387016113e4565b9350602085013591508082111561172557600080fd5b50611732858286016113e4565b9150509250929050565b60006020828403121561174e57600080fd5b5035919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6000815180845260005b818110156117a457602081850181015186830182015201611788565b818111156117b6576000602083870101525b50601f01601f19169290920160200192915050565b60018060a01b03851681528360208201526060604082015260006117f3606083018486611755565b9695505050505050565b6020815260006116d0602083018486611755565b602081526000610b89602083018461177e565b604081526000611837604083018561177e565b8281036020840152610827818561177e565b6020808252600c908201526b6e6f74207265636f7665727960a01b604082015260600190565b6020808252600990820152683737ba1037bbb732b960b91b604082015260600190565b838152604060208201526000610827604083018486611755565b600082198211156118bf576118bf61193b565b500190565b600060ff821660ff84168060ff038211156118e1576118e161193b565b019392505050565b6000828210156118fb576118fb61193b565b500390565b600181811c9082168061191457607f821691505b6020821081141561193557634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461087957600080fdfea26469706673582212200338f91484e3389333834af59b9f21b50c01e20abc379ef0c931c1039ad7b81c64736f6c63430008070033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000989680000000000000000000000000ceaf1e934ef1277f0e921f06252e730c2d285dd80000000000000000000000009b886c04ce3cfb74e644de92d65cfb873636e1fb00000000000000000000000000000000000000000000000000000000000000025044000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001650656e73696f6e44796e616d6963732062792049435200000000000000000000000000000000000000000000000000000000000000000000000000000000001a68747470733a2f2f6963722e63682f616b74696f6e6172696174000000000000
-----Decoded View---------------
Arg [0] : _symbol (string): PD
Arg [1] : _name (string): PensionDynamics by ICR
Arg [2] : _terms (string): https://icr.ch/aktionariat
Arg [3] : _totalShares (uint256): 10000000
Arg [4] : _owner (address): 0xceaF1e934Ef1277F0e921F06252E730C2d285dD8
Arg [5] : _recoveryHub (address): 0x9b886c04CE3CFB74E644DE92d65CfB873636e1fb
-----Encoded View---------------
12 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [3] : 0000000000000000000000000000000000000000000000000000000000989680
Arg [4] : 000000000000000000000000ceaf1e934ef1277f0e921f06252e730c2d285dd8
Arg [5] : 0000000000000000000000009b886c04ce3cfb74e644de92d65cfb873636e1fb
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [7] : 5044000000000000000000000000000000000000000000000000000000000000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000016
Arg [9] : 50656e73696f6e44796e616d6963732062792049435200000000000000000000
Arg [10] : 000000000000000000000000000000000000000000000000000000000000001a
Arg [11] : 68747470733a2f2f6963722e63682f616b74696f6e6172696174000000000000
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.