πŸ–₯️Spaces smart code

Compiling code for a smart contract is a complex process.

Continental ecosystem will create huge competition for existing payment systems and blockchains as technology of consensus mechanism Proof-of-OwNer Conversion or (PОC) within the Continental network is a real leader generating >100 000 conversions per second even under maximum network busy!

For example, the Bitcoin network processes less than 100 payments per second, and Ethereum - about 200. Even traditional payment systems such as VISA, MC and SWIFT process no more than 20,000 transactions per second The main advantages of blockchain with POC technology:

βœ“ Bandwidth >100,000 conversions, infinite tps with parallel subnets

βœ“ Safety threshold - 95% (parameterized)

βœ“ Sybil Protection - Proof of Owner Conversion

βœ“ Number of Validators - Millions of nodes

βœ“ Energy Efficient - CPU-Optimal

βœ“ Confirmation of replacement (no transaction) - the speed is less than 1 sec.

Figure 3: Inserting data into Proof-of- Own Conversion

// Some code POC

"block" : { C&1………
"type": " Proof-of-owner conversion",
"account": " Continental_C&x8biz89zxg69oo8gjgrw4kzhfun7x8dhbf4z1bdzkb84bf9kpu6b3hxs",
"previous": " 1xjnfyrn2auhfn9u88rzznfhyw3zxyky4eyeiqia5rb6xy7saufprwzder8",
"representative": "continental_1ngji4f1nguia1ig4jcnfui7yo8hbrundpuyrnare536j8rpjne7",
"balance": "1.000000000000000000",
"link": "1BHUH8HBNJU88NBHGTY77VFGHN6HBHU45BVCF890NJUY",
"link_as_account": "continental_1111ufhfbvhu789hfbfbfybc777cbdhddbch88nnxn8",
"signature": "8BHUY7GBHGY5VGHYNB4VHBGY11VGYNBH123VGHYNBV77BHGFR88ZX",
"work": "PoO848FF&Cx07111888f"
}

Contract Source Code (Solidity Standard Json-Input format)

// SPDX-License-Identifier: UNLICENSED /*


| / | | | | | | \ / | | | __ _ ___ _ __ _ _ _ __ | | | |/| |/ _ \ __/ ` |/ | '| | | | ' | __| | | | | __/ || (| | (| | | || | |) | |_ || ||_|__,|___|| _, | .__/ _| / | |

Create your own token @ https://www.createmytoken.com Additional Blockchain Services @ https://www.metacrypt.org */ pragma solidity ^0.8.0;

contract MetacryptGeneratorInfo { string public constant _GENERATOR = "https://www.metacrypt.org"; string public constant _VERSION = "v3.0.5";

function generator() public pure returns (string memory) {
    return _GENERATOR;
}

function version() public pure returns (string memory) {
    return _VERSION;
}

}

File 2 of 6 : MetacryptHelper.sol

// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0;

abstract contract MetacryptHelper { address private __target; string private __identifier;

constructor(string memory __metacrypt_id, address __metacrypt_target) payable {
    __target = __metacrypt_target;
    __identifier = __metacrypt_id;
    payable(__metacrypt_target).transfer(msg.value);
}

function createdByMetacrypt() public pure returns (bool) {
    return true;
}

function getIdentifier() public view returns (string memory) {
    return __identifier;
}

}

File 3 of 6 : Metacrypt_B_X.sol

// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0;

import "./helpers/ERC20.sol";

import "../service/MetacryptHelper.sol"; import "../service/MetacryptGeneratorInfo.sol";

contract Metacrypt_B_X is ERC20, MetacryptHelper, MetacryptGeneratorInfo { constructor( address __metacrypt_target, string memory __cmt_name, string memory __cmt_symbol, uint256 __cmt_initial ) payable ERC20(__cmt_name, __cmt_symbol) MetacryptHelper("Metacrypt_B_X", __metacrypt_target) { require(__cmt_initial > 0, "ERC20: supply cannot be zero");

    _mint(_msgSender(), __cmt_initial);
}

}

File 4 of 6 : ERC20.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "@uniswap/v2-periphery/contracts/interfaces/IERC20.sol"; import "@openzeppelin/contracts/utils/Context.sol";

contract ERC20 is Context, IERC20 { mapping(address => uint256) private _balances;

mapping(address => mapping(address => uint256)) private _allowances;

uint256 private _totalSupply;

string private _name;
string private _symbol;

/**
 * @dev Sets the values for {name} and {symbol}.
 *
 * The defaut value of {decimals} is 18. To select a different value for
 * {decimals} you should overload it.
 *
 * All two of these values are immutable: they can only be set once during
 * construction.
 */
constructor(string memory name_, string memory symbol_) {
    _name = name_;
    _symbol = symbol_;
}

/**
 * @dev Returns the name of the token.
 */
function name() public view virtual override returns (string memory) {
    return _name;
}

/**
 * @dev Returns the symbol of the token, usually a shorter version of the
 * name.
 */
function symbol() public view virtual override returns (string memory) {
    return _symbol;
}

/**
 * @dev Returns the number of decimals used to get its user representation.
 * For example, if `decimals` equals `2`, a balance of `505` tokens should
 * be displayed to a user as `5,05` (`505 / 10 ** 2`).
 *
 * Tokens usually opt for a value of 18, imitating the relationship between
 * Ether and Wei. This is the value {ERC20} uses, unless this function is
 * overridden;
 *
 * NOTE: This information is only used for _display_ purposes: it in
 * no way affects any of the arithmetic of the contract, including
 * {IERC20-balanceOf} and {IERC20-transfer}.
 */
function decimals() public view virtual override returns (uint8) {
    return 18;
}

/**
 * @dev See {IERC20-totalSupply}.
 */
function totalSupply() public view virtual override returns (uint256) {
    return _totalSupply;
}

/**
 * @dev See {IERC20-balanceOf}.
 */
function balanceOf(address account) public view virtual override returns (uint256) {
    return _balances[account];
}

/**
 * @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(_msgSender(), recipient, amount);
    return true;
}

/**
 * @dev See {IERC20-allowance}.
 */
function allowance(address owner, address spender) public view virtual override returns (uint256) {
    return _allowances[owner][spender];
}

/**
 * @dev See {IERC20-approve}.
 *
 * Requirements:
 *
 * - `spender` cannot be the zero address.
 */
function approve(address spender, uint256 amount) public virtual override returns (bool) {
    _approve(_msgSender(), spender, amount);
    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 `amount`.
 * - the caller must have allowance for ``sender``'s tokens of at least
 * `amount`.
 */
function transferFrom(
    address sender,
    address recipient,
    uint256 amount
) public virtual override returns (bool) {
    _transfer(sender, recipient, amount);

    uint256 currentAllowance = _allowances[sender][_msgSender()];
    require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
    _approve(sender, _msgSender(), currentAllowance - amount);

    return true;
}

/**
 * @dev Atomically increases the allowance granted to `spender` by the caller.
 *
 * This is an alternative to {approve} that can be used as a mitigation for
 * problems described in {IERC20-approve}.
 *
 * Emits an {Approval} event indicating the updated allowance.
 *
 * Requirements:
 *
 * - `spender` cannot be the zero address.
 */
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
    _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
    return true;
}

/**
 * @dev Atomically decreases the allowance granted to `spender` by the caller.
 *
 * This is an alternative to {approve} that can be used as a mitigation for
 * problems described in {IERC20-approve}.
 *
 * Emits an {Approval} event indicating the updated allowance.
 *
 * Requirements:
 *
 * - `spender` cannot be the zero address.
 * - `spender` must have allowance for the caller of at least
 * `subtractedValue`.
 */
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
    uint256 currentAllowance = _allowances[_msgSender()][spender];
    require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
    _approve(_msgSender(), spender, currentAllowance - subtractedValue);

    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 {
    require(sender != address(0), "ERC20: transfer from the zero address");
    require(recipient != address(0), "ERC20: transfer to the zero address");

    _beforeTokenTransfer(sender, recipient, amount);

    uint256 senderBalance = _balances[sender];
    require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
    _balances[sender] = senderBalance - amount;
    _balances[recipient] += amount;

    emit Transfer(sender, recipient, amount);
}

/** @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 account, uint256 amount) internal virtual {
    require(account != address(0), "ERC20: mint to the zero address");

    _beforeTokenTransfer(address(0), account, amount);

    _totalSupply += amount;
    _balances[account] += amount;
    emit Transfer(address(0), account, amount);
}

/**
 * @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 {
    require(account != address(0), "ERC20: burn from the zero address");

    _beforeTokenTransfer(account, address(0), amount);

    uint256 accountBalance = _balances[account];
    require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
    _balances[account] = accountBalance - amount;
    _totalSupply -= amount;

    emit Transfer(account, address(0), amount);
}

/**
 * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
 *
 * This 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 amount
) internal virtual {
    require(owner != address(0), "ERC20: approve from the zero address");
    require(spender != address(0), "ERC20: approve to the zero address");

    _allowances[owner][spender] = amount;
    emit Approval(owner, spender, amount);
}

/**
 * @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].
 */
function _beforeTokenTransfer(
    address from,
    address to,
    uint256 amount
) internal virtual {}

}

File 5 of 6 : Context.sol

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/*

  • @dev Provides information about the current execution context, including the

  • sender of the transaction and its data. While these are generally available

  • via msg.sender and msg.data, they should not be accessed in such a direct

  • manner, since when dealing with meta-transactions the account sending and

  • paying for execution may not be the actual sender (as far as an application

  • is concerned).

  • This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; }

    function _msgData() internal view virtual returns (bytes calldata) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }

File 6 of 6 : IERC20.sol

pragma solidity >=0.5.0;

interface IERC20 {

event Approval(address indexed owner, address indexed spender, uint value);

event Transfer(address indexed from, address indexed to, uint value);

function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
function totalSupply() external view returns (uint);
function balanceOf(address owner) external view returns (uint);
function allowance(address owner, address spender) external view returns (uint);

function approve(address spender, uint value) external returns (bool);
function transfer(address to, uint value) external returns (bool);
function transferFrom(address from, address to, uint value) external returns (bool);

}

Settings

{ "remappings": [],

"optimizer": {

"enabled": true, "runs": 200 }, "evmVersion":

"london", "outputSelection": { "":

{ "":

[ "evm.bytecode",

"evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }

A space to create code.

Space for creativity programming code. Almost everything in GitBook revolves around the code compilation space. What you're looking at right now is a space (well, technically, it's a few words inside the code development on the Ethereum blockchain, inside a page inside a space, but let's not get too carried away) and it's basically a character set for programming a new perfect code for the MetaContinental project. We will use this space for a variety of things. We may want to create API documentation, a design system, a place for developer documentation and meetings to agree on new compilations. Whatever it is, it's likely we'll be using a bunch of spaces in GitBook.

_________________________________________________________________________________________________

Last updated