Contract 0x52A7F40BB6e9BD9183071cdBdd3A977D713F2e34

 

Contract Overview

Wrapped sCLAM: PEARL Token
Balance:
0 MATIC

MATIC Value:
$0.00

Token:
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x63e5a12aaf1eea8ce18183fb60b457de6028e5f63766925a6c5a173c5e616a09Approve240261382022-01-22 12:54:375 mins ago0x63ae90d2cc10198e54694914b3aadb6b80416b07 IN  Wrapped sCLAM: PEARL Token0 MATIC0.007444531753 159.863677933
0x3538396b2219e3cf2da2c4a2dd76fced2d46c602c4f526c0ad84e72272cce46bWrap240261052022-01-22 12:53:207 mins ago0x63ae90d2cc10198e54694914b3aadb6b80416b07 IN  Wrapped sCLAM: PEARL Token0 MATIC0.013602511942 163.913334082
0xe03890cd4779b07675e702427dea1a3f699ca9abc3d1279f742cd2a89b5b9445Unwrap240257722022-01-22 12:39:4620 mins ago0xcfea8f74027ec8fbbbec544e89d0b1e4b3683295 IN  Wrapped sCLAM: PEARL Token0 MATIC0.006778889087116.339827813
0x14239d344d1dc534883b50af2b5c4516b3653b63288c3044247f88fc3fc4304bUnwrap240254492022-01-22 12:28:4031 mins ago0x40a450d08a0a0493984c02e1fa008495b34b5c29 IN  Wrapped sCLAM: PEARL Token0 MATIC0.012794980921 239.301655599
0xb7e5be7a8e9dc492a4cc7cdc01daf4a72a08c207d2c1e15f42c105dd0b13b923Unwrap240252532022-01-22 12:21:5638 mins ago0x82e65918d19b1723c6367d1d5226d3713f38c3ec IN  Wrapped sCLAM: PEARL Token0 MATIC0.01043342252 195.133959015
0x5fc6d2d02f971298eb755c0a6364779fffd1ee9ca8d5104bd7ea9d23ebb67676Unwrap240239332022-01-22 11:34:161 hr 26 mins ago0x7beed6b5371b2df49aaf793d8754148877c5260f IN  Wrapped sCLAM: PEARL Token0 MATIC0.010833865775 202.623359305
0x854c1c8744c39381c0cbff51c4d6028e282ed52c4de84b5ba97e874c89fe0d3aWrap240235792022-01-22 11:20:041 hr 40 mins ago0xcc1e0a566dbd10869c071c811aba436357858f05 IN  Wrapped sCLAM: PEARL Token0 MATIC0.009193924075 110.804879541
0x0b7e6a0daca3a10c6adb8e31a3658425746508a7abec91e4cd4b2c985360861aApprove240230382022-01-22 11:01:261 hr 58 mins ago0xd6123c4d30253e3ac2e8e3f4d054a58f25b93497 IN  Wrapped sCLAM: PEARL Token0 MATIC0.013377799058 287.274503062
0x361e88fe0b6077a985a9dd36df8aa1fda97e859bce48b8a0878a030a88dbe20cUnwrap240225802022-01-22 10:41:502 hrs 18 mins ago0x486b1ef93d04ee82be527e2d399eb75ddad86aed IN  Wrapped sCLAM: PEARL Token0 MATIC0.048438843229 905.940810015
0x2fa6caa3ed284378eac4cf9652c3d6f0e09bfa43a5a209ac6892ae9d98d984dbUnwrap240219152022-01-22 10:19:002 hrs 41 mins ago0x10a3f47494e4c90f81a82d528565832d56ddf6b5 IN  Wrapped sCLAM: PEARL Token0 MATIC0.144137154625 2,474.71249615
0x96a4aa7c505ac8d2acd458624bbf6861bb2342e28a35c7a906eb5640e2593b97Unwrap240211102022-01-22 9:47:043 hrs 13 mins ago0x5c3d14e1da2d26a86f46cbb8c05f51f9ff199390 IN  Wrapped sCLAM: PEARL Token0 MATIC0.105916018994 1,980.479038793
0xc809edca2304c397d9902d565ff1c01057f05e3cc89618ae98dac73b2d5b0b19Unwrap240210592022-01-22 9:45:223 hrs 15 mins ago0x10a3f47494e4c90f81a82d528565832d56ddf6b5 IN  Wrapped sCLAM: PEARL Token0 MATIC0.116464000577 2,179.178216025
0xef5a53a32ab60c3f3b7f76d5715060bb65578d325967e212f699307b02680d5bUnwrap240204162022-01-22 9:21:023 hrs 39 mins ago0x913d97dae24a2564b0b092fe99e0df5291a6c086 IN  Wrapped sCLAM: PEARL Token0 MATIC0.013707706859 256.372163908
0xcbb8bb6c7a884c99a7a0caf661cc90c65777d2378d22328c9ad13f0e773b3aadWrap240204132022-01-22 9:20:523 hrs 39 mins ago0x10a3f47494e4c90f81a82d528565832d56ddf6b5 IN  Wrapped sCLAM: PEARL Token0 MATIC0.015876235188 191.312211555
0xfa30838a05102498151bd6c175af51aefacd02eaca172b0ded2e2aff7101cbffWrap240202232022-01-22 9:14:203 hrs 46 mins ago0x10a3f47494e4c90f81a82d528565832d56ddf6b5 IN  Wrapped sCLAM: PEARL Token0 MATIC0.013313411609 160.429609923
0xda5cb26613b1ae87bc628c0becfb1d4b9138fbef8d3cd41e6ee321f34e507467Unwrap240200112022-01-22 9:04:563 hrs 55 mins ago0xb78dff1f6a5a910194a4023fa4e4be412da8f501 IN  Wrapped sCLAM: PEARL Token0 MATIC0.00370373555 69.270134476
0xbafdfd2109fc8805dba76b390513926d80c10415f82dc3d014d292ea6d733629Wrap240199242022-01-22 9:01:583 hrs 58 mins ago0x10a3f47494e4c90f81a82d528565832d56ddf6b5 IN  Wrapped sCLAM: PEARL Token0 MATIC0.008576216107 103.345336656
0x0ef56af70bd3bf13e180f96c23a67adc93df73beab30de78574bb2331ef3e806Approve240199042022-01-22 9:01:183 hrs 59 mins ago0xcba0967e06e6c685210e50db35406eba8706bde6 IN  Wrapped sCLAM: PEARL Token0 MATIC0.003753494446 80.602440435
0x63a79ddd6014520fa265c2818daa86ee5eeb54d7a049137abd667492457d5d51Wrap240198582022-01-22 8:59:424 hrs ago0xcba0967e06e6c685210e50db35406eba8706bde6 IN  Wrapped sCLAM: PEARL Token0 MATIC0.008178618321 98.568447
0xfba2fc3cbf0b0ec034e57c2acd6a2ec9e8e060b5754ab3b17f7a96e833cea92bWrap240197432022-01-22 8:55:444 hrs 4 mins ago0x10a3f47494e4c90f81a82d528565832d56ddf6b5 IN  Wrapped sCLAM: PEARL Token0 MATIC0.01018112169 122.684810575
0x5c07badd12df55a789fa37738dade3483380173eb1d4e597181c66d9ac774376Unwrap240197342022-01-22 8:55:264 hrs 4 mins ago0x821c2b462e50d0c4a333ff39071685db52be0e51 IN  Wrapped sCLAM: PEARL Token0 MATIC0.005463118418 102.175477266
0x03713da7463a075845f380114bf90b010651598246a622e05f6813672128d9ddWrap240195362022-01-22 8:48:384 hrs 11 mins ago0x10a3f47494e4c90f81a82d528565832d56ddf6b5 IN  Wrapped sCLAM: PEARL Token0 MATIC0.006976904153 84.073267214
0x488332579149804fdabd5634978efa4fa4039d34a1e1dd396cb243675991832bUnwrap240195112022-01-22 8:47:444 hrs 12 mins ago0x6246462efb8d9c7f763c2c70e050845eeb145b9f IN  Wrapped sCLAM: PEARL Token0 MATIC0.004855987451 90.820443099
0xb4c0ae09c7cea576373ff9ea7d217c6cce2bbfd5112d967b358c43de7c2980fdUnwrap240192452022-01-22 8:38:004 hrs 22 mins ago0xa4ad5d6a2ad24648374f7d3a28b3f4a8fe4be00a IN  Wrapped sCLAM: PEARL Token0 MATIC0.02393806356 447.708228491
0x58a1ee6283a0bd807d42615e0d424a040f3d7d6258133115ba3225f0391e1d5cApprove240191052022-01-22 8:31:404 hrs 28 mins ago0x4b6233f52b4ad4cd9adf7f4870ae25a86937ee7b IN  Wrapped sCLAM: PEARL Token0 MATIC0.009541994955 204.904547229
[ Download CSV Export 

OVERVIEW

OtterClam is the first decentralized reserve protocol on Polygon Network based on the CLAM token.

Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
OtterPearlERC20

Compiler Version
v0.7.5+commit.eb77ed08

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 8 : OtterPearlERC20.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.7.5;

import "./interfaces/IsCLAM.sol";
import "./libraries/SafeMath.sol";
import "./libraries/SafeERC20.sol";
import "./libraries/Address.sol";
import "./types/ERC20.sol";

contract OtterPearlERC20 is ERC20 {
    using SafeERC20 for ERC20;
    using Address for address;
    using SafeMath for uint;

    address public immutable sCLAM;

    constructor( address _sCLAM ) ERC20( 'Wrapped sCLAM', 'PEARL', 18 ) {
        require( _sCLAM != address(0) );
        sCLAM = _sCLAM;
    }

    /**
        @notice wrap sCLAM
        @param _amount uint
        @return uint
     */
    function wrap( uint _amount ) external returns ( uint ) {
        IERC20( sCLAM ).transferFrom( msg.sender, address(this), _amount );

        uint value = sCLAMToPEARL( _amount );
        _mint( msg.sender, value );
        return value;
    }

    /**
        @notice unwrap sCLAM
        @param _amount uint
        @return uint
     */
    function unwrap( uint _amount ) external returns ( uint ) {
        _burn( msg.sender, _amount );

        uint value = pearlTosCLAM( _amount );
        IERC20( sCLAM ).transfer( msg.sender, value );
        return value;
    }

    /**
        @notice converts PEARL amount to sCLAM
        @param _amount uint
        @return uint
     */
    function pearlTosCLAM( uint _amount ) public view returns ( uint ) {
        return _amount.mul( IsCLAM( sCLAM ).index() ).div( 10 ** decimals() );
    }

    /**
        @notice converts sCLAM amount to PEARL
        @param _amount uint
        @return uint
     */
    function sCLAMToPEARL( uint _amount ) public view returns ( uint ) {
        return _amount.mul( 10 ** decimals() ).div( IsCLAM( sCLAM ).index() );
    }

}

File 2 of 8 : IsCLAM.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity >=0.7.5;

import "./IERC20.sol";

interface IsCLAM is IERC20 {
    function rebase( uint256 clamProfit_, uint epoch_) external returns (uint256);

    function circulatingSupply() external view returns (uint256);

    function gonsForBalance( uint amount ) external view returns ( uint );

    function balanceForGons( uint gons ) external view returns ( uint );

    function index() external view returns ( uint );
}

File 3 of 8 : SafeMath.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.7.5;

library SafeMath {

    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        uint256 c = a - b;

        return c;
    }

    function mul(uint256 a, uint256 b) internal pure returns (uint256) {

        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return div(a, b, "SafeMath: division by zero");
    }

    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    function sqrrt(uint256 a) internal pure returns (uint c) {
        if (a > 3) {
            c = a;
            uint b = add( div( a, 2), 1 );
            while (b < c) {
                c = b;
                b = div( add( div( a, b ), b), 2 );
            }
        } else if (a != 0) {
            c = 1;
        }
    }
}

File 4 of 8 : SafeERC20.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.7.5;

import "../interfaces/IERC20.sol";

import "./SafeMath.sol";
import "./Counters.sol";
import "./Address.sol";

library SafeERC20 {
    using SafeMath for uint256;
    using Address for address;

    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    function safeApprove(IERC20 token, address spender, uint256 value) internal {

        require((value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).add(value);
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function _callOptionalReturn(IERC20 token, bytes memory data) private {

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 5 of 8 : Address.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.7.5;

library Address {

    function isContract(address account) internal view returns (bool) {

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
      return functionCall(target, data, "Address: low-level call failed");
    }

    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        return _functionCallWithValue(target, data, 0, errorMessage);
    }

    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: value }(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
        require(isContract(target), "Address: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }

    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.staticcall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
        if (success) {
            return returndata;
        } else {
            if (returndata.length > 0) {

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }

    function addressToString(address _address) internal pure returns(string memory) {
        bytes32 _bytes = bytes32(uint256(_address));
        bytes memory HEX = "0123456789abcdef";
        bytes memory _addr = new bytes(42);

        _addr[0] = '0';
        _addr[1] = 'x';

        for(uint256 i = 0; i < 20; i++) {
            _addr[2+i*2] = HEX[uint8(_bytes[i + 12] >> 4)];
            _addr[3+i*2] = HEX[uint8(_bytes[i + 12] & 0x0f)];
        }

        return string(_addr);

    }
}

File 6 of 8 : ERC20.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.7.5;

import "../interfaces/IERC20.sol";
import "../libraries/SafeMath.sol";
import "../libraries/Counters.sol";
import "../libraries/Address.sol";

abstract contract ERC20 is IERC20 {

    using SafeMath for uint256;

    // TODO comment actual hash value.
    bytes32 constant private ERC20TOKEN_ERC1820_INTERFACE_ID = keccak256( "ERC20Token" );

    mapping (address => uint256) internal _balances;

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

    uint256 internal _totalSupply;

    string internal _name;

    string internal _symbol;

    uint8 internal _decimals;

    constructor (string memory name_, string memory symbol_, uint8 decimals_) {
        _name = name_;
        _symbol = symbol_;
        _decimals = decimals_;
    }

     function name() public view override returns (string memory) {
        return _name;
    }

    function symbol() public view override returns (string memory) {
        return _symbol;
    }

    function decimals() public view override returns (uint8) {
        return _decimals;
    }

    function totalSupply() public view override returns (uint256) {
        return _totalSupply;
    }

    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(msg.sender, recipient, amount);
        return true;
    }

    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(msg.sender, spender, amount);
        return true;
    }

    function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, msg.sender, _allowances[sender][msg.sender].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }

    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue));
        return true;
    }

    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
        return true;
    }

    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);

        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

    function _mint(address account_, uint256 ammount_) internal virtual {
        require(account_ != address(0), "ERC20: mint to the zero address");
        _beforeTokenTransfer(address( this ), account_, ammount_);
        _totalSupply = _totalSupply.add(ammount_);
        _balances[account_] = _balances[account_].add(ammount_);
        emit Transfer(address( this ), account_, ammount_);
    }

    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

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

        _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

    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);
    }

  function _beforeTokenTransfer( address from_, address to_, uint256 amount_ ) internal virtual { }
}

interface IERC2612Permit {

    function permit(
        address owner,
        address spender,
        uint256 amount,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    function nonces(address owner) external view returns (uint256);
}


abstract contract ERC20Permit is ERC20, IERC2612Permit {
    using Counters for Counters.Counter;

    mapping(address => Counters.Counter) private _nonces;

    // keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");
    bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9;

    bytes32 public DOMAIN_SEPARATOR;

    constructor() {
        uint256 chainID;
        assembly {
            chainID := chainid()
        }

        DOMAIN_SEPARATOR = keccak256(
            abi.encode(
                keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
                keccak256(bytes(name())),
                keccak256(bytes("1")), // Version
                chainID,
                address(this)
            )
        );
    }

    function permit(
        address owner,
        address spender,
        uint256 amount,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual override {
        require(block.timestamp <= deadline, "Permit: expired deadline");

        bytes32 hashStruct =
            keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, amount, _nonces[owner].current(), deadline));

        bytes32 _hash = keccak256(abi.encodePacked(uint16(0x1901), DOMAIN_SEPARATOR, hashStruct));

        address signer = ecrecover(_hash, v, r, s);
        require(signer != address(0) && signer == owner, "ZeroSwapPermit: Invalid signature");

        _nonces[owner].increment();
        _approve(owner, spender, amount);
    }

    function nonces(address owner) public view override returns (uint256) {
        return _nonces[owner].current();
    }
}

File 7 of 8 : IERC20.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
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);
}

interface IERC20Mintable {
  function mint( uint256 amount_ ) external;

  function mint( address account_, uint256 ammount_ ) external;
}

File 8 of 8 : Counters.sol
// SPDX-License-Identifier: AGPL-3.0-or-later
pragma solidity 0.7.5;

import "./SafeMath.sol";

library Counters {
    using SafeMath for uint256;

    struct Counter {

        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        counter._value += 1;
    }

    function decrement(Counter storage counter) internal {
        counter._value = counter._value.sub(1);
    }
}

Settings
{
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_sCLAM","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"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":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":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","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":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"pearlTosCLAM","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sCLAM","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"sCLAMToPEARL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","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":"uint256","name":"_amount","type":"uint256"}],"name":"unwrap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"wrap","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]

60a06040523480156200001157600080fd5b5060405162001e4138038062001e41833981810160405260208110156200003757600080fd5b81019080805190602001909291905050506040518060400160405280600d81526020017f577261707065642073434c414d000000000000000000000000000000000000008152506040518060400160405280600581526020017f504541524c00000000000000000000000000000000000000000000000000000081525060128260039080519060200190620000ce9291906200017f565b508160049080519060200190620000e79291906200017f565b5080600560006101000a81548160ff021916908360ff160217905550505050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156200014157600080fd5b8073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250505062000235565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620001b7576000855562000203565b82601f10620001d257805160ff191683800117855562000203565b8280016001018555821562000203579182015b8281111562000202578251825591602001919060010190620001e5565b5b50905062000212919062000216565b5090565b5b808211156200023157600081600090555060010162000217565b5090565b60805160601c611bda620002676000398061081052806109915280610c155280610cf05280610dc85250611bda6000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c806370a0823111610097578063dd62ed3e11610066578063dd62ed3e1461052c578063de0e9a3e146105a4578063e4637c96146105e6578063ea598cb01461062857610100565b806370a082311461038957806395d89b41146103e1578063a457c2d714610464578063a9059cbb146104c857610100565b80632a8cdbf3116100d35780632a8cdbf31461028e578063313ce567146102d057806339509351146102f1578063569fde9d1461035557610100565b806306fdde0314610105578063095ea7b31461018857806318160ddd146101ec57806323b872dd1461020a575b600080fd5b61010d61066a565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561014d578082015181840152602081019050610132565b50505050905090810190601f16801561017a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101d46004803603604081101561019e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061070c565b60405180821515815260200191505060405180910390f35b6101f4610723565b6040518082815260200191505060405180910390f35b6102766004803603606081101561022057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061072d565b60405180821515815260200191505060405180910390f35b6102ba600480360360208110156102a457600080fd5b81019080803590602001909291905050506107f8565b6040518082815260200191505060405180910390f35b6102d86108d3565b604051808260ff16815260200191505060405180910390f35b61033d6004803603604081101561030757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108ea565b60405180821515815260200191505060405180910390f35b61035d61098f565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103cb6004803603602081101561039f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109b3565b6040518082815260200191505060405180910390f35b6103e96109fb565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561042957808201518184015260208101905061040e565b50505050905090810190601f1680156104565780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104b06004803603604081101561047a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610a9d565b60405180821515815260200191505060405180910390f35b610514600480360360408110156104de57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b5c565b60405180821515815260200191505060405180910390f35b61058e6004803603604081101561054257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b73565b6040518082815260200191505060405180910390f35b6105d0600480360360208110156105ba57600080fd5b8101908080359060200190929190505050610bfa565b6040518082815260200191505060405180910390f35b610612600480360360208110156105fc57600080fd5b8101908080359060200190929190505050610ce9565b6040518082815260200191505060405180910390f35b6106546004803603602081101561063e57600080fd5b8101908080359060200190929190505050610dc4565b6040518082815260200191505060405180910390f35b606060038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107025780601f106106d757610100808354040283529160200191610702565b820191906000526020600020905b8154815290600101906020018083116106e557829003601f168201915b5050505050905090565b6000610719338484610ed1565b6001905092915050565b6000600254905090565b600061073a8484846110c8565b6107ed84336107e885604051806060016040528060288152602001611aee60289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113899092919063ffffffff16565b610ed1565b600190509392505050565b60006108cc6108056108d3565b60ff16600a0a6108be7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632986c0e56040518163ffffffff1660e01b815260040160206040518083038186803b15801561087457600080fd5b505afa158015610888573d6000803e3d6000fd5b505050506040513d602081101561089e57600080fd5b81019080805190602001909291905050508561144990919063ffffffff16565b6114cf90919063ffffffff16565b9050919050565b6000600560009054906101000a900460ff16905090565b6000610985338461098085600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461151990919063ffffffff16565b610ed1565b6001905092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060048054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610a935780601f10610a6857610100808354040283529160200191610a93565b820191906000526020600020905b815481529060010190602001808311610a7657829003601f168201915b5050505050905090565b6000610b523384610b4d85604051806060016040528060258152602001611b8060259139600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113899092919063ffffffff16565b610ed1565b6001905092915050565b6000610b693384846110c8565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000610c0633836115a1565b6000610c11836107f8565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610ca457600080fd5b505af1158015610cb8573d6000803e3d6000fd5b505050506040513d6020811015610cce57600080fd5b81019080805190602001909291905050505080915050919050565b6000610dbd7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16632986c0e56040518163ffffffff1660e01b815260040160206040518083038186803b158015610d5457600080fd5b505afa158015610d68573d6000803e3d6000fd5b505050506040513d6020811015610d7e57600080fd5b8101908080519060200190929190505050610daf610d9a6108d3565b60ff16600a0a8561144990919063ffffffff16565b6114cf90919063ffffffff16565b9050919050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330856040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015610e7557600080fd5b505af1158015610e89573d6000803e3d6000fd5b505050506040513d6020811015610e9f57600080fd5b8101908080519060200190929190505050506000610ebc83610ce9565b9050610ec83382611765565b80915050919050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610f57576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180611b5c6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610fdd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180611a856022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561114e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611b376025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156111d4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611a406023913960400191505060405180910390fd5b6111df83838361192a565b61124a81604051806060016040528060268152602001611aa7602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113899092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506112dd816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461151990919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290611436576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156113fb5780820151818401526020810190506113e0565b50505050905090810190601f1680156114285780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008083141561145c57600090506114c9565b600082840290508284828161146d57fe5b04146114c4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611acd6021913960400191505060405180910390fd5b809150505b92915050565b600061151183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061192f565b905092915050565b600080828401905083811015611597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611627576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611b166021913960400191505060405180910390fd5b6116338260008361192a565b61169e81604051806060016040528060228152602001611a63602291396000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113899092919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506116f5816002546119f590919063ffffffff16565b600281905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611808576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b61181330838361192a565b6118288160025461151990919063ffffffff16565b60028190555061187f816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461151990919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b505050565b600080831182906119db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156119a0578082015181840152602081019050611985565b50505050905090810190601f1680156119cd5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816119e757fe5b049050809150509392505050565b6000611a3783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611389565b90509291505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220dfdfdee92f475a9493dd2917e466fbe1c1b9e68de38c49078fef4adf6052294764736f6c63430007050033000000000000000000000000aac144dc08ce39ed92182dd85ded60e5000c9e67

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000aac144dc08ce39ed92182dd85ded60e5000c9e67

-----Decoded View---------------
Arg [0] : _sCLAM (address): 0xaac144dc08ce39ed92182dd85ded60e5000c9e67

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000aac144dc08ce39ed92182dd85ded60e5000c9e67


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.