Smart contracts

Check all the smart contracts from BlindPay and the deployed addresses.

BlindPay escrow smart contract to manage payouts (stable to fiat)

Contract code:

BankAccounts.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

contract BankAccounts {
  mapping(bytes32 => address) public whitelistedTokens;
  mapping(address => mapping(bytes32 => uint256)) public bankAccountBalances;
  address public owner;

  event Deposit(uint256 amount, bytes32 symbol, address bankAccount);
  event Withdrawal(uint256 amount, bytes32 symbol, address bankAccount);
  event TransferToOwner(uint256 amount, bytes32 symbol, address bankAccount);

  constructor() {
    owner = msg.sender;
  }

  modifier onlyOwner {
    require(msg.sender == owner, "Only owner may call this function");
    _;
  }

  function whitelistToken(bytes32 symbol, address tokenAddress) external onlyOwner {
    whitelistedTokens[symbol] = tokenAddress;
  }

  function transferToOwner(uint256 amount, bytes32 symbol, address bankAccount) external onlyOwner {
    require(bankAccountBalances[bankAccount][symbol] >= amount, "Insufficient balance");

    IERC20 token = IERC20(whitelistedTokens[symbol]);
    bankAccountBalances[bankAccount][symbol] -= amount;
    token.transfer(owner, amount);

    emit TransferToOwner(amount, symbol, bankAccount);
  }

  function deposit(uint256 amount, bytes32 symbol, address senderWallet, address bankAccount) external onlyOwner {
    require(whitelistedTokens[symbol] != address(0), "Token not whitelisted");

    IERC20 token = IERC20(whitelistedTokens[symbol]);
    token.transferFrom(senderWallet, address(this), amount);

    bankAccountBalances[bankAccount][symbol] += amount;
    emit Deposit(amount, symbol, bankAccount);
  }

  function withdraw(uint256 amount, bytes32 symbol, address senderWallet, address bankAccount) external onlyOwner {
    require(whitelistedTokens[symbol] != address(0), "Token not whitelisted");
    require(bankAccount != address(0), "Invalid bank account");
    require(bankAccountBalances[bankAccount][symbol] >= amount, "Insufficient balance on bank account");

    IERC20 token = IERC20(whitelistedTokens[symbol]);
    bankAccountBalances[bankAccount][symbol] -= amount;
    token.transfer(senderWallet, amount);
    emit Withdrawal(amount, symbol, bankAccount);
  }

  function balance(bytes32 symbol, address bankAccount) public view returns (uint256) {
    require(whitelistedTokens[symbol] != address(0), "Token not whitelisted");

    return bankAccountBalances[bankAccount][symbol];
  }
}

Deployed addresses:

NetworkAddress
Polygon0x250896E502c2E09F6C440bA9d7DAb63276EF9368
Arbitrum0x0d2fCa1a3a55eABfD67bD6315d154B6bb22D9Ed2
Base0x250896E502c2E09F6C440bA9d7DAb63276EF9368
Sepolia0x4E340546B94E0e8E3A7CA6286d775591F14a29a0
Arbitrum Sepolia0x5E74A480F330705640ED07E870F893e72238c8d0
Base Sepolia0x5E74A480F330705640ED07E870F893e72238c8d0
Polygon Amoy0x83cD7E0a1e8ae37eC75842544d77E190F386B73A

BlindPay smart contract to generate a fake stablecoin (USDB)

Contract code:

BankAccounts.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

contract USDB is ERC20 {
  constructor() ERC20("USDB", "USDB") {
    _mint(msg.sender, 5000 * 10 ** 18);
  }

  function mintUSDB(uint256 amount) external {
    _mint(msg.sender, amount);
  }
}

Deployed addresses:

NetworkAddress
Sepolia0x8Cb65c1334b348E8d486AC935a784967AAEbB6e3
Arbitrum Sepolia0x4D423D2cfB373862B8E12843B6175752dc75f795
Base Sepolia0x4D423D2cfB373862B8E12843B6175752dc75f795
Polygon Amoy0x587C3D85C9272484A6e40a8300290F55a4D5a589