Skip to content

WBTC

0x2577D24a26f8FA19c1058a8b0106E2c7303454a4

State Variables

EIP712_REVISION

solidity
bytes public constant EIP712_REVISION = bytes("1");

EIP712_DOMAIN

solidity
bytes32 internal constant EIP712_DOMAIN =
    keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)");

PERMIT_TYPEHASH

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

_nonces

solidity
mapping(address => uint256) internal _nonces;

DOMAIN_SEPARATOR

solidity
bytes32 public DOMAIN_SEPARATOR;

Functions

constructor

solidity
constructor(string memory name, string memory symbol, uint8 decimals, address owner)
    ERC20(name, symbol);

permit

Allow passing a signed message to approve spending

_implements the permit function as for https://github.com/ethereum/EIPs/blob/8a34d644aacf0f9f8f00815307fd7dd5da07655f/EIPS/eip-2612.md_

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

Parameters

NameTypeDescription
owneraddressThe owner of the funds
spenderaddressThe spender
valueuint256The amount
deadlineuint256The deadline timestamp, type(uint256).max for max deadline
vuint8Signature param
rbytes32Signature param
sbytes32Signature param

mint

Function to mint tokens

solidity
function mint(uint256 value) public virtual onlyOwner returns (bool);

Parameters

NameTypeDescription
valueuint256The amount of tokens to mint.

Returns

NameTypeDescription
<none>boolA boolean that indicates if the operation was successful.

mint

Function to mint tokens to address

solidity
function mint(address account, uint256 value) public virtual onlyOwner returns (bool);

Parameters

NameTypeDescription
accountaddressThe account to mint tokens.
valueuint256The amount of tokens to mint.

Returns

NameTypeDescription
<none>boolA boolean that indicates if the operation was successful.

nonces

solidity
function nonces(address owner) public view returns (uint256);