### Contract Testing Commands (npm) Source: https://github.com/paxosglobal/pyusd-contract/blob/master/README.md Provides essential npm commands for managing and testing smart contracts. Includes installing dependencies, compiling contracts, running unit tests, and checking test coverage. ```shell npm install npm run compile npm run test npm run coverage ``` -------------------------------- ### Asset Protection Functions Source: https://github.com/paxosglobal/pyusd-contract/blob/master/README.md Describes the asset protection features, enabling the freezing and unfreezing of token balances for specific addresses, and wiping balances if necessary. ```Solidity function ASSET_PROTECTION_ROLE() public pure returns (bytes32) function freeze(address who) external function unfreeze(address who) external function wipe(address who) external function isFrozen(address who) external view returns (bool) ``` -------------------------------- ### EIP-2612 Token Transfers with Permit (Solc) Source: https://github.com/paxosglobal/pyusd-contract/blob/master/README.md Implements EIP-2612's permit function to allow token transfers via EIP-712 signatures, enabling pre-approved allowances for spenders using transferFrom and transferFromBatch. ```Solc function permit( address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s ) external; function transferFrom( address _from, address _to, uint256 _value ) public returns (bool); function transferFromBatch( address[] calldata _from, address[] calldata _to, uint256[] calldata _value ) public returns (bool); ``` -------------------------------- ### EIP-3009 Token Transfers with Authorization (Solc) Source: https://github.com/paxosglobal/pyusd-contract/blob/master/README.md Implements EIP-3009 for single and batch token transfers, allowing a delegate to transfer tokens on behalf of the sender using an EIP-712 signed authorization. ```Solc function transferWithAuthorization( address from, address to, uint256 value, uint256 validAfter, uint256 validBefore, bytes32 nonce, uint8 v, bytes32 r, bytes32 s ) external; function transferWithAuthorizationBatch( address[] memory from, address[] memory to, uint256[] memory value, uint256[] memory validAfter, uint256[] memory validBefore, bytes32[] memory nonce, uint8[] memory v, bytes32[] memory r, bytes32[] memory s ) external; ``` -------------------------------- ### Supply Control Functions Source: https://github.com/paxosglobal/pyusd-contract/blob/master/README.md This section details functions related to managing the PYUSD token supply, including minting and burning, controlled by specific roles and potentially rate limits. ```Solidity function SUPPLY_CONTROLLER_MANAGER_ROLE() public pure returns (bytes32) function SUPPLY_CONTROLLER_ROLE() public pure returns (bytes32) function mint(address account, uint256 amount) external function burn(address account, uint256 amount) external function supplyControllers() external view returns (address[] memory) function supplyControllerConfig(address supplyController) external view returns (...) ``` -------------------------------- ### ERC20 Token Interface Functions Source: https://github.com/paxosglobal/pyusd-contract/blob/master/README.md This snippet lists the standard ERC20 functions and events provided by the PayPal USD contract, which are crucial for interacting with the token for transfers and approvals. ```Solidity 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 (uint256) function balanceOf(address who) external view returns (uint256) function transfer(address to, uint256 value) external returns (bool) function approve(address spender, uint256 value) external returns (bool) function increaseApproval(address spender, uint256 addedValue) external returns (bool) function decreaseApproval(address spender, uint256 subtractedValue) external returns (bool) function allowance(address owner, address spender) external view returns (uint256) function transferFrom(address from, address to, uint256 value) external returns (bool) event Transfer(address indexed from, address indexed to, uint256 value) event Approval(address indexed owner, address indexed spender, uint256 value) ``` -------------------------------- ### Delegate Transfer Standards (EIP-3009, EIP-2612) Source: https://github.com/paxosglobal/pyusd-contract/blob/master/README.md This snippet highlights the implementation of EIP-3009 and EIP-2612, which facilitate gas-less transactions by allowing delegate transfers with custom signatures. ```Solidity // EIP-3009: Transfer With Authorization function transferWithAuthorization(address from, address to, uint256 value, uint256 expires, uint8 v, bytes32 r, bytes32 s) external // EIP-2612: Permit function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external ``` -------------------------------- ### Pausable Contract Functionality Source: https://github.com/paxosglobal/pyusd-contract/blob/master/README.md Details the pausing mechanism for the PYUSD contract, allowing for the suspension of transfers and approvals in critical situations, managed by an owner role. ```Solidity function pause() external function unpause() external function paused() public view returns (bool) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.