Interface IJPYC

interface IJPYC {
    allowance(
        params: { owner: `0x${string}`; spender: `0x${string}` },
    ): Promise<Uint256>;
    approve(
        params: { spender: `0x${string}`; value: Uint256 },
    ): Promise<`0x${string}`>;
    balanceOf(params: { account: `0x${string}` }): Promise<Uint256>;
    cancelAuthorization(
        params: {
            authorizer: `0x${string}`;
            nonce: `0x${string}`;
            r: `0x${string}`;
            s: `0x${string}`;
            v: Uint8;
        },
    ): Promise<`0x${string}`>;
    configureMinter(
        params: { minter: `0x${string}`; minterAllowedAmount: Uint256 },
    ): Promise<`0x${string}`>;
    decreaseAllowance(
        params: { decrement: Uint256; spender: `0x${string}` },
    ): Promise<`0x${string}`>;
    increaseAllowance(
        params: { increment: Uint256; spender: `0x${string}` },
    ): Promise<`0x${string}`>;
    isMinter(params: { account: `0x${string}` }): Promise<boolean>;
    mint(
        params: { amount: Uint256; to: `0x${string}` },
    ): Promise<`0x${string}`>;
    minterAllowance(params: { minter: `0x${string}` }): Promise<Uint256>;
    nonces(params: { owner: `0x${string}` }): Promise<Uint256>;
    permit(
        params: {
            deadline: Uint256;
            owner: `0x${string}`;
            r: `0x${string}`;
            s: `0x${string}`;
            spender: `0x${string}`;
            v: Uint8;
            value: Uint256;
        },
    ): Promise<`0x${string}`>;
    receiveWithAuthorization(
        params: {
            from: `0x${string}`;
            nonce: `0x${string}`;
            r: `0x${string}`;
            s: `0x${string}`;
            to: `0x${string}`;
            v: Uint8;
            validAfter: Uint256;
            validBefore: Uint256;
            value: Uint256;
        },
    ): Promise<`0x${string}`>;
    totalSupply(): Promise<Uint256>;
    transfer(
        params: { to: `0x${string}`; value: Uint256 },
    ): Promise<`0x${string}`>;
    transferFrom(
        params: { from: `0x${string}`; to: `0x${string}`; value: Uint256 },
    ): Promise<`0x${string}`>;
    transferWithAuthorization(
        params: {
            from: `0x${string}`;
            nonce: `0x${string}`;
            r: `0x${string}`;
            s: `0x${string}`;
            to: `0x${string}`;
            v: Uint8;
            validAfter: Uint256;
            validBefore: Uint256;
            value: Uint256;
        },
    ): Promise<`0x${string}`>;
}

Implemented by

Methods

  • Returns allowance of a spender over owner's tokens (for transferring).

    Parameters

    • params: { owner: `0x${string}`; spender: `0x${string}` }

    Returns Promise<Uint256>

    spender allowance

  • Sets allowance of a spender over owner's tokens.

    Parameters

    • params: { spender: `0x${string}`; value: Uint256 }

    Returns Promise<`0x${string}`>

    transaction hash

  • Returns balance of an account.

    Parameters

    • params: { account: `0x${string}` }

    Returns Promise<Uint256>

    account balance

  • Cancels authorization.

    Parameters

    • params: {
          authorizer: `0x${string}`;
          nonce: `0x${string}`;
          r: `0x${string}`;
          s: `0x${string}`;
          v: Uint8;
      }

    Returns Promise<`0x${string}`>

    transaction hash

  • Configures a minter.

    Parameters

    • params: { minter: `0x${string}`; minterAllowedAmount: Uint256 }

    Returns Promise<`0x${string}`>

    transaction hash

  • Decreases allowance.

    Parameters

    • params: { decrement: Uint256; spender: `0x${string}` }

    Returns Promise<`0x${string}`>

    transaction hash

  • Increases allowance.

    Parameters

    • params: { increment: Uint256; spender: `0x${string}` }

    Returns Promise<`0x${string}`>

    transaction hash

  • Returns true if the given address is a minter.

    Parameters

    • params: { account: `0x${string}` }

    Returns Promise<boolean>

    true if minter, false otherwise

  • Mints tokens.

    Parameters

    • params: { amount: Uint256; to: `0x${string}` }

    Returns Promise<`0x${string}`>

    transaction hash

  • Returns allowance of a minter (for minting).

    Parameters

    • params: { minter: `0x${string}` }

    Returns Promise<Uint256>

    minter allowance

  • Returns nonce for EIP2612's permit.

    Parameters

    • params: { owner: `0x${string}` }

    Returns Promise<Uint256>

    owner nonce

  • Sets allowance of a spender over owner's tokens, given owner's signed approval.

    Parameters

    • params: {
          deadline: Uint256;
          owner: `0x${string}`;
          r: `0x${string}`;
          s: `0x${string}`;
          spender: `0x${string}`;
          v: Uint8;
          value: Uint256;
      }

    Returns Promise<`0x${string}`>

    transaction hash

  • Receives tokens with authorization.

    Parameters

    • params: {
          from: `0x${string}`;
          nonce: `0x${string}`;
          r: `0x${string}`;
          s: `0x${string}`;
          to: `0x${string}`;
          v: Uint8;
          validAfter: Uint256;
          validBefore: Uint256;
          value: Uint256;
      }

    Returns Promise<`0x${string}`>

    transaction hash

  • Transfers tokens (directly).

    Parameters

    • params: { to: `0x${string}`; value: Uint256 }

    Returns Promise<`0x${string}`>

    transaction hash

  • Transfers tokens (from spender).

    Parameters

    • params: { from: `0x${string}`; to: `0x${string}`; value: Uint256 }

    Returns Promise<`0x${string}`>

    transaction hash

  • Transfers tokens with authorization.

    Parameters

    • params: {
          from: `0x${string}`;
          nonce: `0x${string}`;
          r: `0x${string}`;
          s: `0x${string}`;
          to: `0x${string}`;
          v: Uint8;
          validAfter: Uint256;
          validBefore: Uint256;
          value: Uint256;
      }

    Returns Promise<`0x${string}`>

    transaction hash