Source Code
Overview
ETH Balance
0.00006 ETH
Eth Value
$0.13 (@ $2,178.43/ETH)Latest 1 from a total of 1 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Transfer | 10253888 | 2102 days ago | IN | 0.01 ETH | 0.01372644 |
Latest 1 internal transaction
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| - | 10253888 | 2102 days ago | 0.00994 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
aDaiGateway
Compiler Version
v0.4.25+commit.59dbf8f1
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2020-06-12
*/
pragma solidity ^0.4.24;
contract Ownable {
address public owner;
event OwnershipTransferred(
address indexed previousOwner,
address indexed newOwner
);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
owner = msg.sender;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
require(newOwner != address(0));
emit OwnershipTransferred(owner, newOwner);
owner = newOwner;
}
}
contract Erc20 {
function balanceOf(address _owner) public view returns (uint256);
function transfer(address _to, uint256 _value) public returns (bool);
function approve(address _spender, uint256 _value) public returns (bool);
}
contract Exchange {
function sellAllAmountPayEth(
address otc,
address wethToken,
address buyToken,
uint256 minBuyAmt
) public payable returns (uint256 buyAmt);
}
contract LendingPool {
function deposit( address _reserve, uint256 _amount, uint16 _referralCode) external payable;
}
contract aDaiGateway is Ownable {
Exchange constant DaiEx = Exchange(0x793EbBe21607e4F04788F89c7a9b97320773Ec59);
LendingPool constant lendingPool = LendingPool(0x398eC7346DcD622eDc5ae82352F02bE94C62d119);
Erc20 constant dai = Erc20(0x6B175474E89094C44Da98b954EedeAC495271d0F);
Erc20 constant aDai = Erc20(0xfC1E690f61EFd961294b3e1Ce3313fBD8aa4f85d);
uint16 constant referral = 47;
constructor() public {
dai.approve(0x3dfd23A6c5E8BbcFc9581d2E864a68feb6a076d3, uint256(-1)); //lendingPoolCore
}
function() external payable {
etherToaDai(msg.sender);
}
function etherToaDai(address to)
public
payable
returns (uint256 outAmount)
{
uint256 amount = DaiEx.sellAllAmountPayEth.value(
(msg.value * 994) / 1000
)(
0x794e6e91555438aFc3ccF1c5076A74F42133d08D,
0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2,
0x6B175474E89094C44Da98b954EedeAC495271d0F,
1
);
lendingPool.deposit(address(dai), amount, referral);
outAmount = aDai.balanceOf(address(this));
aDai.transfer(to, outAmount);
}
function makeprofit() public {
owner.transfer(address(this).balance);
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"constant":false,"inputs":[],"name":"makeprofit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"to","type":"address"}],"name":"etherToaDai","outputs":[{"name":"outAmount","type":"uint256"}],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"}]Contract Creation Code
608060405234801561001057600080fd5b5060008054600160a060020a03191633178155604080517f095ea7b3000000000000000000000000000000000000000000000000000000008152733dfd23a6c5e8bbcfc9581d2e864a68feb6a076d3600482015260001960248201529051736b175474e89094c44da98b954eedeac495271d0f9263095ea7b392604480820193602093909283900390910190829087803b1580156100ad57600080fd5b505af11580156100c1573d6000803e3d6000fd5b505050506040513d60208110156100d757600080fd5b50506104f4806100e86000396000f3006080604052600436106100615763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663503011dc811461006d5780637d91c5f7146100845780638da5cb5b146100aa578063f2fde38b146100db575b61006a336100fc565b50005b34801561007957600080fd5b506100826103e7565b005b610098600160a060020a03600435166100fc565b60408051918252519081900360200190f35b3480156100b657600080fd5b506100bf610425565b60408051600160a060020a039092168252519081900360200190f35b3480156100e757600080fd5b50610082600160a060020a0360043516610434565b604080517fe50278a600000000000000000000000000000000000000000000000000000000815273794e6e91555438afc3ccf1c5076a74f42133d08d600482015273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26024820152736b175474e89094c44da98b954eedeac495271d0f6044820152600160648201529051600091829173793ebbe21607e4f04788f89c7a9b97320773ec599163e50278a6916103e8346103e202049160848082019260209290919082900301818588803b1580156101c657600080fd5b505af11580156101da573d6000803e3d6000fd5b50505050506040513d60208110156101f157600080fd5b5051604080517fd2d0e066000000000000000000000000000000000000000000000000000000008152736b175474e89094c44da98b954eedeac495271d0f600482015260248101839052602f6044820152905191925073398ec7346dcd622edc5ae82352f02be94c62d1199163d2d0e0669160648082019260009290919082900301818387803b15801561028457600080fd5b505af1158015610298573d6000803e3d6000fd5b5050604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173fc1e690f61efd961294b3e1ce3313fbd8aa4f85d93506370a08231925060248083019260209291908290030181600087803b15801561030857600080fd5b505af115801561031c573d6000803e3d6000fd5b505050506040513d602081101561033257600080fd5b5051604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a038616600482015260248101839052905191935073fc1e690f61efd961294b3e1ce3313fbd8aa4f85d9163a9059cbb916044808201926020929091908290030181600087803b1580156103b457600080fd5b505af11580156103c8573d6000803e3d6000fd5b505050506040513d60208110156103de57600080fd5b50919392505050565b60008054604051600160a060020a0390911691303180156108fc02929091818181858888f19350505050158015610422573d6000803e3d6000fd5b50565b600054600160a060020a031681565b600054600160a060020a0316331461044b57600080fd5b600160a060020a038116151561046057600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a72305820d089c569952f2c83c68f3513030af25b99243a8db4a964e1ae47267808e2d35b0029
Deployed Bytecode
0x6080604052600436106100615763ffffffff7c0100000000000000000000000000000000000000000000000000000000600035041663503011dc811461006d5780637d91c5f7146100845780638da5cb5b146100aa578063f2fde38b146100db575b61006a336100fc565b50005b34801561007957600080fd5b506100826103e7565b005b610098600160a060020a03600435166100fc565b60408051918252519081900360200190f35b3480156100b657600080fd5b506100bf610425565b60408051600160a060020a039092168252519081900360200190f35b3480156100e757600080fd5b50610082600160a060020a0360043516610434565b604080517fe50278a600000000000000000000000000000000000000000000000000000000815273794e6e91555438afc3ccf1c5076a74f42133d08d600482015273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc26024820152736b175474e89094c44da98b954eedeac495271d0f6044820152600160648201529051600091829173793ebbe21607e4f04788f89c7a9b97320773ec599163e50278a6916103e8346103e202049160848082019260209290919082900301818588803b1580156101c657600080fd5b505af11580156101da573d6000803e3d6000fd5b50505050506040513d60208110156101f157600080fd5b5051604080517fd2d0e066000000000000000000000000000000000000000000000000000000008152736b175474e89094c44da98b954eedeac495271d0f600482015260248101839052602f6044820152905191925073398ec7346dcd622edc5ae82352f02be94c62d1199163d2d0e0669160648082019260009290919082900301818387803b15801561028457600080fd5b505af1158015610298573d6000803e3d6000fd5b5050604080517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152905173fc1e690f61efd961294b3e1ce3313fbd8aa4f85d93506370a08231925060248083019260209291908290030181600087803b15801561030857600080fd5b505af115801561031c573d6000803e3d6000fd5b505050506040513d602081101561033257600080fd5b5051604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a038616600482015260248101839052905191935073fc1e690f61efd961294b3e1ce3313fbd8aa4f85d9163a9059cbb916044808201926020929091908290030181600087803b1580156103b457600080fd5b505af11580156103c8573d6000803e3d6000fd5b505050506040513d60208110156103de57600080fd5b50919392505050565b60008054604051600160a060020a0390911691303180156108fc02929091818181858888f19350505050158015610422573d6000803e3d6000fd5b50565b600054600160a060020a031681565b600054600160a060020a0316331461044b57600080fd5b600160a060020a038116151561046057600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a72305820d089c569952f2c83c68f3513030af25b99243a8db4a964e1ae47267808e2d35b0029
Deployed Bytecode Sourcemap
1512:1305:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2104:23;2116:10;2104:11;:23::i;:::-;;1512:1305;2727:85;;8:9:-1;5:2;;;30:1;27;20:12;5:2;2727:85:0;;;;;;2143:576;;-1:-1:-1;;;;;2143:576:0;;;;;;;;;;;;;;;;;;;;;52:20;;8:9:-1;5:2;;;30:1;27;20:12;5:2;52:20:0;;;;;;;;-1:-1:-1;;;;;52:20:0;;;;;;;;;;;;;;725:192;;8:9:-1;5:2;;;30:1;27;20:12;5:2;-1:-1;725:192:0;-1:-1:-1;;;;;725:192:0;;;;;2143:576;2279:279;;;;;;2375:42;2279:279;;;;2432:42;2279:279;;;;2489:42;2279:279;;;;2546:1;2279:279;;;;;;2227:17;;;;1586:42;;2279:25;;2345:4;2326:9;2338:3;2326:15;2325:24;;2279:279;;;;;;;;;;;;;;;2325:24;1586:42;2279:279;;;5:2:-1;;;;30:1;27;20:12;5:2;2279:279:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2279:279:0;;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2279:279:0;2569:51;;;;;;1763:42;2569:51;;;;;;;;;;1920:2;2569:51;;;;;;2279:279;;-1:-1:-1;1683:42:0;;2569:19;;:51;;;;;-1:-1:-1;;2569:51:0;;;;;;;;-1:-1:-1;1683:42:0;2569:51;;;5:2:-1;;;;30:1;27;20:12;5:2;2569:51:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;2643:29:0;;;;;;2666:4;2643:29;;;;;;1841:42;;-1:-1:-1;2643:14:0;;-1:-1:-1;2643:29:0;;;;;;;;;;;;;;-1:-1:-1;1841:42:0;2643:29;;;5:2:-1;;;;30:1;27;20:12;5:2;2643:29:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2643:29:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2643:29:0;2683:28;;;;;;-1:-1:-1;;;;;2683:28:0;;;;;;;;;;;;;;2643:29;;-1:-1:-1;1841:42:0;;2683:13;;:28;;;;;2643:29;;2683:28;;;;;;;;-1:-1:-1;1841:42:0;2683:28;;;5:2:-1;;;;30:1;27;20:12;5:2;2683:28:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2683:28:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2143:576:0;;;-1:-1:-1;;;2143:576:0:o;2727:85::-;2767:5;;;:37;;-1:-1:-1;;;;;2767:5:0;;;;2790:4;2782:21;2767:37;;;;;2782:21;;2767:37;:5;:37;2782:21;2767:5;:37;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;2767:37:0;2727:85::o;52:20::-;;;-1:-1:-1;;;;;52:20:0;;:::o;725:192::-;527:5;;-1:-1:-1;;;;;527:5:0;513:10;:19;505:28;;;;;;-1:-1:-1;;;;;806:22:0;;;;798:31;;;;;;866:5;;;845:37;;-1:-1:-1;;;;;845:37:0;;;;866:5;;;845:37;;;893:5;:16;;-1:-1:-1;;893:16:0;-1:-1:-1;;;;;893:16:0;;;;;;;;;;725:192::o
Swarm Source
bzzr://d089c569952f2c83c68f3513030af25b99243a8db4a964e1ae47267808e2d35b
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.13
Net Worth in ETH
0.00006
Token Allocations
ETH
100.00%
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|---|---|---|---|---|
| ETH | 100.00% | $2,179.17 | 0.00006 | $0.13075 |
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ 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.