Skip to content
Verified contractExactBUSL-1.1

Metalend

Address0x778064dcbc663dcbb8dcfded2a929d60ea540329
Balance

0 ETH

 

Transactions

5,298

 

Compiler

solc 0.8.9

 

Same code

Only this contract

 

Details

Compiler
solc 0.8.9+commit.e5eed63a
Language
solidity
Optimization
No
EVM version
london
License
BUSL-1.1
Match
Exactcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
13,676,300
Creation transaction
0x4dfa6e7be2…e4fe2e59dd

Read16

  • extensionFee() → (uint64)
  • extensionHorizon() → (uint16)
  • extensionsAllowed() → (bool)
  • getLoans() → (tuple[])
  • getParameters() → (address,uint32,uint128,uint128,uint64,uint128,bool,bool)
  • isWithinExtensionHorizon(uint128) → (bool)
  • isWithinLoanTerm(uint128) → (bool)
  • itemsUnderLoan(uint256) → (uint128,uint128,bool,address,uint32,uint32,uint16)
  • lendingFee() → (uint64)
  • loanAmount() → (uint128)
  • owner() → (address)
  • paused() → (bool)
  • repoAddress() → (address)
  • sunsetModeActive() → (bool)
  • termInDays() → (uint16)
  • tokenContract() → (address)

Write19

  • extendLoan(uint128)
  • makeLoanPayment(uint128)
  • onERC721Received(address,address,uint256,bytes) → (bytes4)
  • pause()
  • renounceOwnership()
  • repossessItem(uint128)
  • repossessItems(uint128[])
  • setExtensionFee(uint64) → (bool)
  • setExtensionHorizon(uint16) → (bool)
  • setLendingFee(uint64) → (bool)
  • setLoanAmount(uint128) → (bool)
  • setRepoAddress(address) → (bool)
  • setTermInDays(uint16) → (bool)
  • sunrise()
  • sunset()
  • takeLoan(uint16)
  • transferOwnership(address)
  • unpause()
  • withdraw(uint256) → (bool)

Events15

  • OwnershipTransferred(address,address)
  • Paused(address)
  • Sunrise(address)
  • Sunset(address)
  • Unpaused(address)
  • eligibleNFTAddressSet(address)
  • ethDeposited(uint256,uint256)
  • ethWithdrawn(uint256,uint256)
  • extensionFeeSet(uint64)
  • extensionHorizonSet(uint16)
  • lendingFeeSet(uint64)
  • lendingTransaction(uint128,uint256,address,uint16,uint256,uint256,uint256,uint256)
  • loanAmountSet(uint128)
  • repoAddressSet(address)
  • termInDaysSet(uint16)

ABI as JSON

[
  {
    "type": "constructor",
    "inputs": [
      {
        "name": "_tokenAddress",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "_loanAmount",
        "type": "uint128",
        "internalType": "uint128"
      },
      {
        "name": "_termInDays",
        "type": "uint16",
        "internalType": "uint16"
      },
      {
        "name": "_repoAddress",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "_lendingFee",
        "type": "uint64",
        "internalType": "uint64"
      },
      {
        "name": "_extensionFee",
        "type": "uint64",
        "internalType": "uint64"
      },
      {
        "name": "_extensionHorizon",
        "type": "uint16",
        "internalType": "uint16"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "name": "OwnershipTransferred",
    "type": "event",
    "inputs": [
      {
        "name": "previousOwner",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "newOwner",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "name": "Paused",
    "type": "event",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "name": "Sunrise",
    "type": "event",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "name": "Sunset",
    "type": "event",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "name": "Unpaused",
    "type": "event",
    "inputs": [
      {
        "name": "account",
        "type": "address",
        "indexed": false,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "name": "eligibleNFTAddressSet",
    "type": "event",
    "inputs": [
      {
        "name": "nftAddress",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "name": "ethDeposited",
    "type": "event",
    "inputs": [
      {
        "name": "deposit",
        "type": "uint256",
        "indexed": true,
        "internalType": "uint256"
      },
      {
        "name": "effectiveDate",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      }
    ],
    "anonymous": false
  },
  {
    "name": "ethWithdrawn",
    "type": "event",
    "inputs": [
      {
        "name": "withdrawal",
        "type": "uint256",
        "indexed": true,
        "internalType": "uint256"
      },
      {
        "name": "effectiveDate",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      }
    ],
    "anonymous": false
  },
  {
    "name": "extensionFeeSet",
    "type": "event",
    "inputs": [
      {
        "name": "extensionFee",
        "type": "uint64",
        "indexed": true,
        "internalType": "uint64"
      }
    ],
    "anonymous": false
  },
  {
    "name": "extensionHorizonSet",
    "type": "event",
    "inputs": [
      {
        "name": "extensionHorizon",
        "type": "uint16",
        "indexed": true,
        "internalType": "uint16"
      }
    ],
    "anonymous": false
  },
  {
    "name": "lendingFeeSet",
    "type": "event",
    "inputs": [
      {
        "name": "lendingFee",
        "type": "uint64",
        "indexed": true,
        "internalType": "uint64"
      }
    ],
    "anonymous": false
  },
  {
    "name": "lendingTransaction",
    "type": "event",
    "inputs": [
      {
        "name": "loanId",
        "type": "uint128",
        "indexed": true,
        "internalType": "uint128"
      },
      {
        "name": "transactionCode",
        "type": "uint256",
        "indexed": true,
        "internalType": "uint256"
      },
      {
        "name": "borrower",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      },
      {
        "name": "tokenId",
        "type": "uint16",
        "indexed": false,
        "internalType": "uint16"
      },
      {
        "name": "transactionValue",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      },
      {
        "name": "transactionFee",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      },
      {
        "name": "loanEndDate",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      },
      {
        "name": "effectiveDate",
        "type": "uint256",
        "indexed": false,
        "internalType": "uint256"
      }
    ],
    "anonymous": false
  },
  {
    "name": "loanAmountSet",
    "type": "event",
    "inputs": [
      {
        "name": "loanAmount",
        "type": "uint128",
        "indexed": true,
        "internalType": "uint128"
      }
    ],
    "anonymous": false
  },
  {
    "name": "repoAddressSet",
    "type": "event",
    "inputs": [
      {
        "name": "repoAddress",
        "type": "address",
        "indexed": true,
        "internalType": "address"
      }
    ],
    "anonymous": false
  },
  {
    "name": "termInDaysSet",
    "type": "event",
    "inputs": [
      {
        "name": "termInDays",
        "type": "uint16",
        "indexed": true,
        "internalType": "uint16"
      }
    ],
    "anonymous": false
  },
  {
    "type": "fallback",
    "stateMutability": "payable"
  },
  {
    "name": "extendLoan",
    "type": "function",
    "inputs": [
      {
        "name": "_loanId",
        "type": "uint128",
        "internalType": "uint128"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "name": "extensionFee",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint64",
        "internalType": "uint64"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "extensionHorizon",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint16",
        "internalType": "uint16"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "extensionsAllowed",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "getLoans",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "tuple[]",
        "components": [
          {
            "name": "loanId",
            "type": "uint128",
            "internalType": "uint128"
          },
          {
            "name": "currentBalance",
            "type": "uint128",
            "internalType": "uint128"
          },
          {
            "name": "isCurrent",
            "type": "bool",
            "internalType": "bool"
          },
          {
            "name": "borrower",
            "type": "address",
            "internalType": "address payable"
          },
          {
            "name": "startDate",
            "type": "uint32",
            "internalType": "uint32"
          },
          {
            "name": "endDate",
            "type": "uint32",
            "internalType": "uint32"
          },
          {
            "name": "tokenId",
            "type": "uint16",
            "internalType": "uint16"
          }
        ],
        "internalType": "struct Metalend.LoanItem[]"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "getParameters",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "_tokenAddress",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "_loanTerm",
        "type": "uint32",
        "internalType": "uint32"
      },
      {
        "name": "_loanAmount",
        "type": "uint128",
        "internalType": "uint128"
      },
      {
        "name": "_loanFee",
        "type": "uint128",
        "internalType": "uint128"
      },
      {
        "name": "_extensionHorizon",
        "type": "uint64",
        "internalType": "uint64"
      },
      {
        "name": "_extensionFee",
        "type": "uint128",
        "internalType": "uint128"
      },
      {
        "name": "_isPaused",
        "type": "bool",
        "internalType": "bool"
      },
      {
        "name": "_isSunset",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "isWithinExtensionHorizon",
    "type": "function",
    "inputs": [
      {
        "name": "_loanId",
        "type": "uint128",
        "internalType": "uint128"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "isWithinLoanTerm",
    "type": "function",
    "inputs": [
      {
        "name": "_loanId",
        "type": "uint128",
        "internalType": "uint128"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "itemsUnderLoan",
    "type": "function",
    "inputs": [
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "loanId",
        "type": "uint128",
        "internalType": "uint128"
      },
      {
        "name": "currentBalance",
        "type": "uint128",
        "internalType": "uint128"
      },
      {
        "name": "isCurrent",
        "type": "bool",
        "internalType": "bool"
      },
      {
        "name": "borrower",
        "type": "address",
        "internalType": "address payable"
      },
      {
        "name": "startDate",
        "type": "uint32",
        "internalType": "uint32"
      },
      {
        "name": "endDate",
        "type": "uint32",
        "internalType": "uint32"
      },
      {
        "name": "tokenId",
        "type": "uint16",
        "internalType": "uint16"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "lendingFee",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint64",
        "internalType": "uint64"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "loanAmount",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint128",
        "internalType": "uint128"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "makeLoanPayment",
    "type": "function",
    "inputs": [
      {
        "name": "_loanId",
        "type": "uint128",
        "internalType": "uint128"
      }
    ],
    "outputs": [],
    "stateMutability": "payable"
  },
  {
    "name": "onERC721Received",
    "type": "function",
    "inputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      },
      {
        "name": "",
        "type": "uint256",
        "internalType": "uint256"
      },
      {
        "name": "",
        "type": "bytes",
        "internalType": "bytes"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bytes4",
        "internalType": "bytes4"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "name": "owner",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "pause",
    "type": "function",
    "inputs": [],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "paused",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "renounceOwnership",
    "type": "function",
    "inputs": [],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "repoAddress",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "address"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "repossessItem",
    "type": "function",
    "inputs": [
      {
        "name": "_loanId",
        "type": "uint128",
        "internalType": "uint128"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "repossessItems",
    "type": "function",
    "inputs": [
      {
        "name": "repoItems",
        "type": "uint128[]",
        "internalType": "uint128[]"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "setExtensionFee",
    "type": "function",
    "inputs": [
      {
        "name": "_extensionFee",
        "type": "uint64",
        "internalType": "uint64"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "name": "setExtensionHorizon",
    "type": "function",
    "inputs": [
      {
        "name": "_extensionHorizon",
        "type": "uint16",
        "internalType": "uint16"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "name": "setLendingFee",
    "type": "function",
    "inputs": [
      {
        "name": "_lendingFee",
        "type": "uint64",
        "internalType": "uint64"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "name": "setLoanAmount",
    "type": "function",
    "inputs": [
      {
        "name": "_loanAmount",
        "type": "uint128",
        "internalType": "uint128"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "name": "setRepoAddress",
    "type": "function",
    "inputs": [
      {
        "name": "_repoAddress",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "name": "setTermInDays",
    "type": "function",
    "inputs": [
      {
        "name": "_termInDays",
        "type": "uint16",
        "internalType": "uint16"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "name": "sunrise",
    "type": "function",
    "inputs": [],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "sunset",
    "type": "function",
    "inputs": [],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "sunsetModeActive",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "takeLoan",
    "type": "function",
    "inputs": [
      {
        "name": "tokenId",
        "type": "uint16",
        "internalType": "uint16"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "termInDays",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "uint16",
        "internalType": "uint16"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "tokenContract",
    "type": "function",
    "inputs": [],
    "outputs": [
      {
        "name": "",
        "type": "address",
        "internalType": "contract IERC721"
      }
    ],
    "stateMutability": "view"
  },
  {
    "name": "transferOwnership",
    "type": "function",
    "inputs": [
      {
        "name": "newOwner",
        "type": "address",
        "internalType": "address"
      }
    ],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "unpause",
    "type": "function",
    "inputs": [],
    "outputs": [],
    "stateMutability": "nonpayable"
  },
  {
    "name": "withdraw",
    "type": "function",
    "inputs": [
      {
        "name": "_withdrawal",
        "type": "uint256",
        "internalType": "uint256"
      }
    ],
    "outputs": [
      {
        "name": "",
        "type": "bool",
        "internalType": "bool"
      }
    ],
    "stateMutability": "nonpayable"
  },
  {
    "type": "receive",
    "stateMutability": "payable"
  }
]

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.