Transaction Hash:
Block:
11585060 at Jan-04-2021 01:37:16 AM +UTC
Transaction Fee:
0.000041822 ETH
$0.08
Gas Used:
41,822 Gas / 1 Gwei
Emitted Events:
| 0 |
0x86dc81b3cb2a2d9501890e609f852a69f3b1a371.0x700447ec4170a8ebc6b67182ac966faf6dff7d46dc24a1a4a7f0a98e84db9cec( 0x700447ec4170a8ebc6b67182ac966faf6dff7d46dc24a1a4a7f0a98e84db9cec, 0x000000000000000000000000f0f2ecbdcb50ab050480f7b99c1922deeeada8d8, 0x000000000000000000000000f2d4766ad705e3a5c9ba5b0436b473085f82f82f, 0x0000000000000000000000000000000000000000000000000000000000000000, 000000000000000000000000000000000000000000000000008f81115e4cfc10 )
|
Account State Difference:
| Address | Before | After | State Difference | ||
|---|---|---|---|---|---|
|
0xEA674fdD...16B898ec8
Miner
| (Ethermine) |
1,778.393799179447334261 Eth
Nonce: 30028920
|
1,778.353406346181179749 Eth
Nonce: 30028921
| 0.040392833266154512 | |
| 0xF2d4766A...85F82f82f | (Coinhako: Old Warm Wallet) | 8,244.430447274092171909 Eth | 8,244.470840107358326421 Eth | 0.040392833266154512 |
Execution Trace
ETH 0.040392833266154512
0xf0f2ecbdcb50ab050480f7b99c1922deeeada8d8.CALL( )
-
0x86dc81b3cb2a2d9501890e609f852a69f3b1a371.CALL( ) -
0x86dc81b3cb2a2d9501890e609f852a69f3b1a371.CALL( ) - ETH 0.040392833266154512
WarmWallet.CALL( ) -
0x86dc81b3cb2a2d9501890e609f852a69f3b1a371.28090abb( )
pragma solidity ^0.4.24;
contract Ownable {
address public owner;
constructor() public {
owner = msg.sender;
}
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
function transferOwnership(address newOwner) public onlyOwner {
require(newOwner != address(0)); // to ensure the owner's address isn't an uninitialised address, "0x0"
owner = newOwner;
}
}
contract WarmWallet is Ownable {
address defaultSweeper;
mapping (address => address) sweepers;
mapping (address => bool) financeFolks;
mapping (address => bool) destinations;
mapping (address => bytes32) dstLabels;
mapping (address => uint256) dstIndex;
address[] public destKeys;
constructor() public {
owner = msg.sender;
}
function sweeperOf(address asset) public view returns (address) {
if (sweepers[asset] == 0x0) {
return defaultSweeper;
}
return sweepers[asset];
}
function setDefaultSweeper(address sweeper) public onlyOwner {
defaultSweeper = sweeper;
}
function setSweeper(address asset, address sweeper) public onlyOwner {
sweepers[asset] = sweeper;
}
function authorizeAddress(address actor) public onlyOwner {
financeFolks[actor] = true;
}
function revokeAuthorization(address actor) public onlyOwner {
financeFolks[actor] = false;
}
function isAuthorized(address actor) public view returns (bool) {
return financeFolks[actor];
}
function addDestination(address dest, bytes32 label) public onlyOwner {
require(destinations[dest] == false);
destinations[dest] = true;
dstIndex[dest] = destKeys.length;
destKeys.push(dest);
dstLabels[dest] = label;
}
function removeDestination(address dest) public onlyOwner {
require(destinations[dest] == true);
destinations[dest] = false;
delete dstLabels[dest];
uint256 keyindex = dstIndex[dest];
delete destKeys[keyindex];
delete dstIndex[dest];
}
function isDestination(address dest) public view returns (bool) {
return destinations[dest];
}
function destinationLabel(address dest) public view returns (string) {
bytes memory bytesArray = new bytes(32);
for (uint256 i; i < 32; i++) {
bytesArray[i] = dstLabels[dest][i];
}
return string(bytesArray);
}
function () public payable {
if (msg.value == 0 && financeFolks[msg.sender] == true) {
address destination = addressAtIndex(msg.data, 2);
require(destinations[destination] == true);
address asset = addressAtIndex(msg.data, 1);
address _impl = sweeperOf(asset);
require(_impl != 0x0);
bytes memory data = msg.data;
assembly {
let result := delegatecall(gas, _impl, add(data, 0x20), mload(data), 0, 0)
let size := returndatasize
let ptr := mload(0x40)
returndatacopy(ptr, 0, size)
switch result
case 0 { revert(ptr, size) }
default { return(ptr, size) }
}
}
}
function addressAtIndex(bytes _bytes, uint256 index) internal pure returns (address asset) {
assembly {
// mul(32, index) - Each param is 32 bytes, so we use n*32
// add(4, ^) - 4 function sig bytes
// add(_bytes, ^) - set the pointer to that position in memory
// mload(^) - load an addresses worth of value (20 bytes) from memory into asset
asset := mload(add(_bytes, add(4, mul(32, index))))
}
}
}