ETH Price: $3,784.40 (-1.95%)
Gas: 7 Gwei

Contract

0x1A3dE69A70A7d4e6FB6a207A9Aaf8Ee3A7cB2709
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
0x60806040109519462020-09-28 16:15:411339 days ago1601309741IN
 Create: BzxAssetAdapter
0 ETH0.0171318480

Advanced mode:
Parent Transaction Hash Block From To Value
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
BzxAssetAdapter

Compiler Version
v0.6.5+commit.f956cc89

Optimization Enabled:
Yes with 1000000 runs

Other Settings:
default evmVersion, GNU LGPLv3 license
File 1 of 3 : BzxAssetAdapter.sol
// Copyright (C) 2020 Zerion Inc. <https://zerion.io>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

pragma solidity 0.6.5;
pragma experimental ABIEncoderV2;

import { ERC20 } from "../../ERC20.sol";
import { ProtocolAdapter } from "../ProtocolAdapter.sol";


/**
 * @title Asset adapter for bZx protocol.
 * @dev Implementation of ProtocolAdapter interface.
 * @author Roman Iftodi <[email protected]>
 */
contract BzxAssetAdapter is ProtocolAdapter {

    string public constant override adapterType = "Asset";

    string public constant override tokenType = "iToken";

    /**
     * @return Amount of iTokens held by the given account.
     * @dev Implementation of ProtocolAdapter interface function.
     */
    function getBalance(address token, address account) external view override returns (uint256) {
        return ERC20(token).balanceOf(account);
    }
}

File 3 of 3 : ERC20.sol
// Copyright (C) 2020 Zerion Inc. <https://zerion.io>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

pragma solidity 0.6.5;
pragma experimental ABIEncoderV2;


interface ERC20 {
    function approve(address, uint256) external returns (bool);
    function transfer(address, uint256) external returns (bool);
    function transferFrom(address, address, uint256) external returns (bool);
    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) external view returns (uint256);
}

File 4 of 3 : ProtocolAdapter.sol
// Copyright (C) 2020 Zerion Inc. <https://zerion.io>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

pragma solidity 0.6.5;
pragma experimental ABIEncoderV2;


/**
 * @title Protocol adapter interface.
 * @dev adapterType(), tokenType(), and getBalance() functions MUST be implemented.
 * @author Igor Sobolev <[email protected]>
 */
interface ProtocolAdapter {

    /**
     * @dev MUST return "Asset" or "Debt".
     * SHOULD be implemented by the public constant state variable.
     */
    function adapterType() external pure returns (string memory);

    /**
     * @dev MUST return token type (default is "ERC20").
     * SHOULD be implemented by the public constant state variable.
     */
    function tokenType() external pure returns (string memory);

    /**
     * @dev MUST return amount of the given token locked on the protocol by the given account.
     */
    function getBalance(address token, address account) external view returns (uint256);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 1000000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "remappings": []
}

Contract Security Audit

Contract ABI

[{"inputs":[],"name":"adapterType","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"getBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenType","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b506102ed806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806330fa738c14610046578063d4fac45d14610064578063f72c079114610084575b600080fd5b61004e61008c565b60405161005b919061023d565b60405180910390f35b6100776100723660046101d0565b6100c5565b60405161005b91906102ae565b61004e610173565b6040518060400160405280600681526020017f69546f6b656e000000000000000000000000000000000000000000000000000081525081565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff8416906370a082319061011a90859060040161021c565b60206040518083038186803b15801561013257600080fd5b505afa158015610146573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061016a9190610204565b90505b92915050565b6040518060400160405280600581526020017f417373657400000000000000000000000000000000000000000000000000000081525081565b803573ffffffffffffffffffffffffffffffffffffffff8116811461016d57600080fd5b600080604083850312156101e2578182fd5b6101ec84846101ac565b91506101fb84602085016101ac565b90509250929050565b600060208284031215610215578081fd5b5051919050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b6000602080835283518082850152825b818110156102695785810183015185820160400152820161024d565b8181111561027a5783604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b9081526020019056fea264697066735822122037ef848d1d3a1c7d4ae28978e1fce816feae216dba9a251503fa7ada4f9bc9be64736f6c63430006050033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100415760003560e01c806330fa738c14610046578063d4fac45d14610064578063f72c079114610084575b600080fd5b61004e61008c565b60405161005b919061023d565b60405180910390f35b6100776100723660046101d0565b6100c5565b60405161005b91906102ae565b61004e610173565b6040518060400160405280600681526020017f69546f6b656e000000000000000000000000000000000000000000000000000081525081565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815260009073ffffffffffffffffffffffffffffffffffffffff8416906370a082319061011a90859060040161021c565b60206040518083038186803b15801561013257600080fd5b505afa158015610146573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061016a9190610204565b90505b92915050565b6040518060400160405280600581526020017f417373657400000000000000000000000000000000000000000000000000000081525081565b803573ffffffffffffffffffffffffffffffffffffffff8116811461016d57600080fd5b600080604083850312156101e2578182fd5b6101ec84846101ac565b91506101fb84602085016101ac565b90509250929050565b600060208284031215610215578081fd5b5051919050565b73ffffffffffffffffffffffffffffffffffffffff91909116815260200190565b6000602080835283518082850152825b818110156102695785810183015185820160400152820161024d565b8181111561027a5783604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b9081526020019056fea264697066735822122037ef848d1d3a1c7d4ae28978e1fce816feae216dba9a251503fa7ada4f9bc9be64736f6c63430006050033

Deployed Bytecode Sourcemap

1011:462:2:-:0;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1011:462:2;;;;;;;;;;;;;;;;;;;;;;;;;;12:1:-1;9;2:12;1122:52:2;;;:::i;:::-;;;;;;;;;;;;;;;;1323:148;;;;;;;;;:::i;:::-;;;;;;;;1062:53;;;:::i;1122:52::-;;;;;;;;;;;;;;;;;;;:::o;1323:148::-;1433:31;;;;;1407:7;;1433:22;;;;;;:31;;1456:7;;1433:31;;;;;;;;;;;;;;;;5:9:-1;2:2;;;27:1;24;17:12;2:2;1433:31:2;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;1433:31:2;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;1433:31:2;;;;;;;;;1426:38;;1323:148;;;;;:::o;1062:53::-;;;;;;;;;;;;;;;;;;;:::o;5:130:-1:-;72:20;;2740:42;2729:54;;3315:35;;3305:2;;3364:1;;3354:12;283:366;;;404:2;392:9;383:7;379:23;375:32;372:2;;;-1:-1;;410:12;372:2;472:53;517:7;493:22;472:53;;;462:63;;580:53;625:7;562:2;605:9;601:22;580:53;;;570:63;;366:283;;;;;;656:263;;771:2;759:9;750:7;746:23;742:32;739:2;;;-1:-1;;777:12;739:2;-1:-1;220:13;;733:186;-1:-1;733:186;1520:213;2740:42;2729:54;;;;997:37;;1638:2;1623:18;;1609:124;1740:301;;1878:2;;1899:17;1892:47;1191:5;2356:12;2513:6;1878:2;1867:9;1863:18;2501:19;-1:-1;2947:101;2961:6;2958:1;2955:13;2947:101;;;3028:11;;;;;3022:18;3009:11;;;2541:14;3009:11;3002:39;2976:10;;2947:101;;;3063:6;3060:1;3057:13;3054:2;;;-1:-1;2541:14;3119:6;1867:9;3110:16;;3103:27;3054:2;-1:-1;3239:2;3219:14;3235:7;3215:28;1349:39;;;;2541:14;1349:39;;1849:192;-1:-1;;;1849:192;2048:213;1471:37;;;2166:2;2151:18;;2137:124

Swarm Source

ipfs://37ef848d1d3a1c7d4ae28978e1fce816feae216dba9a251503fa7ada4f9bc9be

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.