code below:
#
# Panoramix v4 Oct 2019
# Decompiled source of 0xC8De8feF2A0FeD84acdD31370320f03Fe84E2a2a
#
# Let's make the world open source
#
#
# I failed with these:
# - unknown047cf9a6(?)
# - withdraw()
# - unknowna3aa1989(?)
# - unknowna3c68f4c(?)
# - _fallback()
# All the rest is below.
#
const factory = 0x5c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f
const WETH = 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
def storage:
unknown986f5585Address is addr at storage 0
unknown2821040d is uint256 at storage 1
unknown0ad60376 is uint256 at storage 2
owner is addr at storage 3
stor3 is uint256 at storage 3
stor3 is uint32 at storage 3
stor4 is mapping of uint8 at storage 4
stor5 is mapping of uint8 at storage 5
def unknown0ad60376(): # not payable
return unknown0ad60376
def unknown2821040d(): # not payable
return unknown2821040d
def unknown52b0761d(addr _param1): # not payable
require calldata.size - 4 >= 32
return bool(stor4[_param1])
def unknown77cf7630(addr _param1): # not payable
require calldata.size - 4 >= 32
return bool(stor5[_param1])
def owner(): # not payable
return addr(owner)
def unknown986f5585(): # not payable
return unknown986f5585Address
#
# Regular functions
#
def unknown752adc32(addr _param1): # not payable
require calldata.size - 4 >= 32
if addr(owner) != caller:
revert with 0, 'Only Me'
unknown986f5585Address = _param1
def unknown66dd0f24(uint256 _param1): # not payable
require calldata.size - 4 >= 32
if addr(owner) != caller:
revert with 0, 'Only Me'
require ext_code.size(0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2)
call 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.deposit() with:
value _param1 wei
gas gas_remaining wei
if not ext_call.success:
revert with ext_call.return_data[0 len return_data.size]
def unknownfc4dd333(uint256 _param1): # not payable
require calldata.size - 4 >= 32
if addr(owner) != caller:
revert with 0, 'Only Me'
require ext_code.size(0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2)
call 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.withdraw(uint256 amount) with:
gas gas_remaining wei
args _param1
if not ext_call.success:
revert with ext_call.return_data[0 len return_data.size]
def safeTransfer(address _to, uint256 _value): # not payable
require calldata.size - 4 >= 64
if addr(owner) != caller:
revert with 0, 'Only Me'
mem[196 len 64] = transfer(address to, uint256 value), Mask(224, 0, stor3), uint32(stor3), Mask(224, 32, _value) >> 32
call _to with:
funct uint32(stor3)
gas gas_remaining wei
args Mask(224, 32, _value) << 224, mem[260 len 4]
if not return_data.size:
if not ext_call.success:
revert with 0, 'TransferHelper: TRANSFER_FAILED'
if not transfer(address to, uint256 value), Mask(224, 0, stor3):
revert with 0, 'TransferHelper: TRANSFER_FAILED'
else:
mem[228 len return_data.size] = ext_call.return_data[0 len return_data.size]
if not ext_call.success:
revert with 0, 'TransferHelper: TRANSFER_FAILED'
if return_data.size:
require return_data.size >= 32
if not mem[228]:
revert with 0, 'TransferHelper: TRANSFER_FAILED'
def unknowneb5625d9(addr _param1, addr _param2, uint256 _param3): # not payable
require calldata.size - 4 >= 96
if addr(owner) != caller:
revert with 0, 'Only Me'
mem[196 len 64] = approve(address spender, uint256 value), addr(_param2) << 64, 0, Mask(224, 32, _param3) >> 32
call _param1 with:
gas gas_remaining wei
args Mask(224, 32, _param3) << 224, mem[260 len 4]
if not return_data.size:
if not ext_call.success:
revert with 0, 'TransferHelper: APPROVE_FAILED'
if not approve(address spender, uint256 value), addr(_param2) << 64:
revert with 0, 'TransferHelper: APPROVE_FAILED'
else:
mem[228 len return_data.size] = ext_call.return_data[0 len return_data.size]
if not ext_call.success:
revert with 0, 'TransferHelper: APPROVE_FAILED'
if return_data.size:
require return_data.size >= 32
if not mem[228]:
revert with 0, 'TransferHelper: APPROVE_FAILED'
def unknowna74e0691(array _param1, bool _param2): # not payable
require calldata.size - 4 >= 64
require _param1 <= 4294967296
require _param1 + 36 <= calldata.size
require _param1.length <= 4294967296 and _param1 + (32 * _param1.length) + 36 <= calldata.size
mem[128 len 32 * _param1.length] = call.data[_param1 + 36 len 32 * _param1.length]
mem[(32 * _param1.length) + 128] = 0
if addr(owner) != caller:
revert with 0, 'Only Me'
idx = 0
while idx < _param1.length:
require idx < _param1.length
if mem[(32 * idx) + 140 len 20]:
require idx < _param1.length
mem[0] = mem[(32 * idx) + 140 len 20]
mem[32] = 4
stor4[mem[(32 * idx) + 140 len 20]] = uint8(_param2)
idx = idx + 1
continue
def unknowncfa5d34d(uint256 _param1, uint256 _param2, uint256 _param3, uint256 _param4) payable:
require calldata.size - 4 >= 128
if bool(stor4[caller]) != 1:
revert with 0, 'Only Bot'
if _param4 < block.timestamp:
revert with 0, 'TE'
mem[128] = 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
require ext_code.size(unknown986f5585Address)
static call unknown986f5585Address.0x67ccdf38 with:
gas gas_remaining wei
args ((_param3 - _param4 / 2) - unknown2821040d)
if not ext_call.success:
revert with ext_call.return_data[0 len return_data.size]
require return_data.size >= 32
mem[160] = ext_call.return_data[12 len 20]
if 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 == mem[172 len 20]:
revert with 0, 32, 37, 0xfe556e697377617056324c6962726172793a204944454e544943414c5f4144445245535345, mem[297 len 27]
if 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 < mem[172 len 20]:
mem[224] = 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000
mem[244] = addr(ext_call.return_data)
mem[192] = 40
mem[296] = 0xff00000000000000000000000000000000000000000000000000000000000000
mem[297] = 0x5c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f000000000000000000000000
mem[317] = sha3(13847067169082572429, addr(ext_call.return_data))
mem[349] = 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f
mem[264] = 85
mem[381] = 2
mem[413 len 64] = call.data[calldata.size len 64]
mem[413] = _param1
idx = 0
while idx < 1:
require idx < 2
_723 = mem[(32 * idx) + 128]
require idx + 1 < 2
_734 = mem[(32 * idx + 1) + 128]
if mem[(32 * idx) + 140 len 20] == mem[(32 * idx + 1) + 140 len 20]:
revert with 0, 32, 37, 0xfe556e697377617056324c6962726172793a204944454e544943414c5f4144445245535345, mem[582 len 27]
if mem[(32 * idx) + 140 len 20] < mem[(32 * idx + 1) + 140 len 20]:
if not mem[(32 * idx) + 140 len 20]:
revert with 0, 'UniswapV2Library: ZERO_ADDRESS'
require ext_code.size(addr(sha3(0, 6659063423423185226, sha3(13847067169082572429, addr(ext_call.return_data)), 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f)))
static call addr(sha3(0, 6659063423423185226, sha3(13847067169082572429, addr(ext_call.return_data)), 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f)).getReserves() with:
gas gas_remaining wei
mem[477 len 96] = ext_call.return_data[0 len 96]
if not ext_call.success:
revert with ext_call.return_data[0 len return_data.size]
require return_data.size >= 96
require idx < 2
if mem[(32 * idx) + 413] <= 0:
revert with 0, 32, 43, 0x44556e697377617056324c6962726172793a20494e53554646494349454e545f494e5055545f414d4f554e, mem[588 len 21]
if addr(_723) == addr(_723):
if Mask(112, 0, ext_call.return_data <= 0:
revert with 0, 32, 40, 0x53556e697377617056324c6962726172793a20494e53554646494349454e545f4c49515549444954, mem[585 len 24]
if Mask(112, 0, ext_call.return_data <= 0:
revert with 0, 32, 40, 0x53556e697377617056324c6962726172793a20494e53554646494349454e545f4c49515549444954, mem[585 len 24]
if 997 * mem[(32 * idx) + 413] / 997 != mem[(32 * idx) + 413]:
revert with 0, 'ds-math-mul-overflow'
if not Mask(112, 0, ext_call.return_data[32]):
if 1000 * Mask(112, 0, ext_call.return_data / 1000 != Mask(112, 0, ext_call.return_data[0]):
revert with 0, 'ds-math-mul-overflow'
if (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413]) < 1000 * Mask(112, 0, ext_call.return_data[0]):
revert with 0, 'ds-math-add-overflow'
require (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413])
require idx + 1 < 2
mem[(32 * idx + 1) + 413] = 0 / (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413])
else:
require Mask(112, 0, ext_call.return_data[32])
if 997 * mem[(32 * idx) + 413] * Mask(112, 0, ext_call.return_data / Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413]:
revert with 0, 'ds-math-mul-overflow'
if 1000 * Mask(112, 0, ext_call.return_data / 1000 != Mask(112, 0, ext_call.return_data[0]):
revert with 0, 'ds-math-mul-overflow'
if (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413]) < 1000 * Mask(112, 0, ext_call.return_data[0]):
revert with 0, 'ds-math-add-overflow'
require (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413])
require idx + 1 < 2
mem[(32 * idx + 1) + 413] = 997 * mem[(32 * idx) + 413] * Mask(112, 0, ext_call.return_data / (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413])
else:
if Mask(112, 0, ext_call.return_data <= 0:
revert with 0, 32, 40, 0x53556e697377617056324c6962726172793a20494e53554646494349454e545f4c49515549444954, mem[585 len 24]
if Mask(112, 0, ext_call.return_data <= 0:
revert with 0, 32, 40, 0x53556e697377617056324c6962726172793a20494e53554646494349454e545f4c49515549444954, mem[585 len 24]
if 997 * mem[(32 * idx) + 413] / 997 != mem[(32 * idx) + 413]:
revert with 0, 'ds-math-mul-overflow'
if not Mask(112, 0, ext_call.return_data[0]):
if 1000 * Mask(112, 0, ext_call.return_data / 1000 != Mask(112, 0, ext_call.return_data[32]):
revert with 0, 'ds-math-mul-overflow'
if (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413]) < 1000 * Mask(112, 0, ext_call.return_data[32]):
revert with 0, 'ds-math-add-overflow'
require (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413])
require idx + 1 < 2
mem[(32 * idx + 1) + 413] = 0 / (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413])
else:
require Mask(112, 0, ext_call.return_data[0])
if 997 * mem[(32 * idx) + 413] * Mask(112, 0, ext_call.return_data / Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413]:
revert with 0, 'ds-math-mul-overflow'
if 1000 * Mask(112, 0, ext_call.return_data / 1000 != Mask(112, 0, ext_call.return_data[32]):
revert with 0, 'ds-math-mul-overflow'
if (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413]) < 1000 * Mask(112, 0, ext_call.return_data[32]):
revert with 0, 'ds-math-add-overflow'
require (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413])
require idx + 1 < 2
mem[(32 * idx + 1) + 413] = 997 * mem[(32 * idx) + 413] * Mask(112, 0, ext_call.return_data / (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413])
else:
if not mem[(32 * idx + 1) + 140 len 20]:
revert with 0, 'UniswapV2Library: ZERO_ADDRESS'
require ext_code.size(addr(sha3(0, 6659063423423185226, sha3(13847067169082572429, addr(ext_call.return_data)), 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f)))
static call addr(sha3(0, 6659063423423185226, sha3(13847067169082572429, addr(ext_call.return_data)), 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f)).getReserves() with:
gas gas_remaining wei
mem[477 len 96] = ext_call.return_data[0 len 96]
if not ext_call.success:
revert with ext_call.return_data[0 len return_data.size]
require return_data.size >= 96
require idx < 2
if mem[(32 * idx) + 413] <= 0:
revert with 0, 32, 43, 0x44556e697377617056324c6962726172793a20494e53554646494349454e545f494e5055545f414d4f554e, mem[588 len 21]
if addr(_734) == addr(_723):
if Mask(112, 0, ext_call.return_data <= 0:
revert with 0, 32, 40, 0x53556e697377617056324c6962726172793a20494e53554646494349454e545f4c49515549444954, mem[585 len 24]
if Mask(112, 0, ext_call.return_data <= 0:
revert with 0, 32, 40, 0x53556e697377617056324c6962726172793a20494e53554646494349454e545f4c49515549444954, mem[585 len 24]
if 997 * mem[(32 * idx) + 413] / 997 != mem[(32 * idx) + 413]:
revert with 0, 'ds-math-mul-overflow'
if not Mask(112, 0, ext_call.return_data[32]):
if 1000 * Mask(112, 0, ext_call.return_data / 1000 != Mask(112, 0, ext_call.return_data[0]):
revert with 0, 'ds-math-mul-overflow'
if (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413]) < 1000 * Mask(112, 0, ext_call.return_data[0]):
revert with 0, 'ds-math-add-overflow'
require (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413])
require idx + 1 < 2
mem[(32 * idx + 1) + 413] = 0 / (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413])
else:
require Mask(112, 0, ext_call.return_data[32])
if 997 * mem[(32 * idx) + 413] * Mask(112, 0, ext_call.return_data / Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413]:
revert with 0, 'ds-math-mul-overflow'
if 1000 * Mask(112, 0, ext_call.return_data / 1000 != Mask(112, 0, ext_call.return_data[0]):
revert with 0, 'ds-math-mul-overflow'
if (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413]) < 1000 * Mask(112, 0, ext_call.return_data[0]):
revert with 0, 'ds-math-add-overflow'
require (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413])
require idx + 1 < 2
mem[(32 * idx + 1) + 413] = 997 * mem[(32 * idx) + 413] * Mask(112, 0, ext_call.return_data / (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413])
else:
if Mask(112, 0, ext_call.return_data <= 0:
revert with 0, 32, 40, 0x53556e697377617056324c6962726172793a20494e53554646494349454e545f4c49515549444954, mem[585 len 24]
if Mask(112, 0, ext_call.return_data <= 0:
revert with 0, 32, 40, 0x53556e697377617056324c6962726172793a20494e53554646494349454e545f4c49515549444954, mem[585 len 24]
if 997 * mem[(32 * idx) + 413] / 997 != mem[(32 * idx) + 413]:
revert with 0, 'ds-math-mul-overflow'
if not Mask(112, 0, ext_call.return_data[0]):
if 1000 * Mask(112, 0, ext_call.return_data / 1000 != Mask(112, 0, ext_call.return_data[32]):
revert with 0, 'ds-math-mul-overflow'
if (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413]) < 1000 * Mask(112, 0, ext_call.return_data[32]):
revert with 0, 'ds-math-add-overflow'
require (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413])
require idx + 1 < 2
mem[(32 * idx + 1) + 413] = 0 / (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413])
else:
require Mask(112, 0, ext_call.return_data[0])
if 997 * mem[(32 * idx) + 413] * Mask(112, 0, ext_call.return_data / Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413]:
revert with 0, 'ds-math-mul-overflow'
if 1000 * Mask(112, 0, ext_call.return_data / 1000 != Mask(112, 0, ext_call.return_data[32]):
revert with 0, 'ds-math-mul-overflow'
if (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413]) < 1000 * Mask(112, 0, ext_call.return_data[32]):
revert with 0, 'ds-math-add-overflow'
require (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413])
require idx + 1 < 2
mem[(32 * idx + 1) + 413] = 997 * mem[(32 * idx) + 413] * Mask(112, 0, ext_call.return_data / (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413])
idx = idx + 1
continue
if mem[445] < _param2:
revert with 0, 'IA'
require ext_code.size(0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2)
call 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.transfer(address to, uint256 value) with:
gas gas_remaining wei
args addr(sha3(0, 6659063423423185226, sha3(13847067169082572429, addr(ext_call.return_data)), 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f)), _param1
if not ext_call.success:
revert with ext_call.return_data[0 len return_data.size]
require return_data.size >= 32
require ext_call.return_data[0]
if 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 == mem[172 len 20]:
revert with 0, 32, 37, 0xfe556e697377617056324c6962726172793a204944454e544943414c5f4144445245535345, mem[582 len 27]
if 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 < mem[172 len 20]:
mem[509] = 0x22c0d9f00000000000000000000000000000000000000000000000000000000
mem[513] = 0
mem[545] = mem[445]
mem[577] = this.address
mem[609] = 128
mem[641] = ext_call.return_data[0]
mem[673 len ceil32(ext_call.return_data] = mem[509 len ceil32(ext_call.return_data]
if not ext_call.return_data % 32:
require ext_code.size(addr(sha3(0, 6659063423423185226, sha3(13847067169082572429, addr(ext_call.return_data)), 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f)))
call addr(sha3(0, 6659063423423185226, sha3(13847067169082572429, addr(ext_call.return_data)), 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f)).0x22c0d9f with:
gas gas_remaining wei
args 0, mem[445], addr(this.address), 128, ext_call.return_datamem[673 len ext_call.return_data]
else:
mem[floor32(ext_call.return_data] = mem[floor32(ext_call.return_data % 32) + 705 len ext_call.return_data % 32]
require ext_code.size(addr(sha3(0, 6659063423423185226, sha3(13847067169082572429, addr(ext_call.return_data)), 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f)))
call addr(sha3(0, 6659063423423185226, sha3(13847067169082572429, addr(ext_call.return_data)), 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f)).0x22c0d9f with:
gas gas_remaining wei
args 0, mem[445], addr(this.address), 128, ext_call.return_datamem[673 len floor32(ext_call.return_data]
else:
if not mem[172 len 20]:
revert with 0, 'UniswapV2Library: ZERO_ADDRESS'
mem[509] = 0x22c0d9f00000000000000000000000000000000000000000000000000000000
if 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 == mem[172 len 20]:
mem[513] = 0
mem[545] = mem[445]
mem[577] = this.address
mem[609] = 128
mem[641] = ext_call.return_data[0]
mem[673 len ceil32(ext_call.return_data] = mem[509 len ceil32(ext_call.return_data]
if not ext_call.return_data % 32:
require ext_code.size(addr(sha3(0, 6659063423423185226, sha3(13847067169082572429, addr(ext_call.return_data)), 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f)))
call addr(sha3(0, 6659063423423185226, sha3(13847067169082572429, addr(ext_call.return_data)), 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f)).0x22c0d9f with:
gas gas_remaining wei
args 0, mem[445], addr(this.address), 128, ext_call.return_datamem[673 len ext_call.return_data]
else:
mem[floor32(ext_call.return_data] = mem[floor32(ext_call.return_data % 32) + 705 len ext_call.return_data % 32]
require ext_code.size(addr(sha3(0, 6659063423423185226, sha3(13847067169082572429, addr(ext_call.return_data)), 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f)))
call addr(sha3(0, 6659063423423185226, sha3(13847067169082572429, addr(ext_call.return_data)), 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f)).0x22c0d9f with:
gas gas_remaining wei
args 0, mem[445], addr(this.address), 128, ext_call.return_datamem[673 len floor32(ext_call.return_data]
else:
mem[513] = mem[445]
mem[545] = 0
mem[577] = this.address
mem[609] = 128
mem[641] = ext_call.return_data[0]
mem[673 len ceil32(ext_call.return_data] = mem[509 len ceil32(ext_call.return_data]
if not ext_call.return_data % 32:
require ext_code.size(addr(sha3(0, 6659063423423185226, sha3(13847067169082572429, addr(ext_call.return_data)), 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f)))
call addr(sha3(0, 6659063423423185226, sha3(13847067169082572429, addr(ext_call.return_data)), 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f)).0x22c0d9f with:
gas gas_remaining wei
args mem[445], 0, addr(this.address), 128, ext_call.return_datamem[673 len ext_call.return_data]
else:
mem[floor32(ext_call.return_data] = mem[floor32(ext_call.return_data % 32) + 705 len ext_call.return_data % 32]
require ext_code.size(addr(sha3(0, 6659063423423185226, sha3(13847067169082572429, addr(ext_call.return_data)), 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f)))
call addr(sha3(0, 6659063423423185226, sha3(13847067169082572429, addr(ext_call.return_data)), 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f)).0x22c0d9f with:
gas gas_remaining wei
args mem[445], 0, addr(this.address), 128, ext_call.return_datamem[673 len floor32(ext_call.return_data]
else:
if not addr(ext_call.return_data):
revert with 0, 'UniswapV2Library: ZERO_ADDRESS'
mem[224] = addr(ext_call.return_data)
mem[244] = 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000
mem[192] = 40
mem[296] = 0xff00000000000000000000000000000000000000000000000000000000000000
mem[297] = 0x5c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f000000000000000000000000
mem[317] = sha3(addr(ext_call.return_data), 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2)
mem[349] = 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f
mem[264] = 85
mem[381] = 2
mem[413 len 64] = call.data[calldata.size len 64]
mem[413] = _param1
idx = 0
while idx < 1:
require idx < 2
_729 = mem[(32 * idx) + 128]
require idx + 1 < 2
_738 = mem[(32 * idx + 1) + 128]
if mem[(32 * idx) + 140 len 20] == mem[(32 * idx + 1) + 140 len 20]:
revert with 0, 32, 37, 0xfe556e697377617056324c6962726172793a204944454e544943414c5f4144445245535345, mem[582 len 27]
if mem[(32 * idx) + 140 len 20] < mem[(32 * idx + 1) + 140 len 20]:
if not mem[(32 * idx) + 140 len 20]:
revert with 0, 'UniswapV2Library: ZERO_ADDRESS'
require ext_code.size(addr(sha3(0, 6659063423423185226, sha3(addr(ext_call.return_data), 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2), 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f)))
static call addr(sha3(0, 6659063423423185226, sha3(addr(ext_call.return_data), 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2), 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f)).getReserves() with:
gas gas_remaining wei
mem[477 len 96] = ext_call.return_data[0 len 96]
if not ext_call.success:
revert with ext_call.return_data[0 len return_data.size]
require return_data.size >= 96
require idx < 2
if mem[(32 * idx) + 413] <= 0:
revert with 0, 32, 43, 0x44556e697377617056324c6962726172793a20494e53554646494349454e545f494e5055545f414d4f554e, mem[588 len 21]
if addr(_729) == addr(_729):
if Mask(112, 0, ext_call.return_data <= 0:
revert with 0, 32, 40, 0x53556e697377617056324c6962726172793a20494e53554646494349454e545f4c49515549444954, mem[585 len 24]
if Mask(112, 0, ext_call.return_data <= 0:
revert with 0, 32, 40, 0x53556e697377617056324c6962726172793a20494e53554646494349454e545f4c49515549444954, mem[585 len 24]
if 997 * mem[(32 * idx) + 413] / 997 != mem[(32 * idx) + 413]:
revert with 0, 'ds-math-mul-overflow'
if not Mask(112, 0, ext_call.return_data[32]):
if 1000 * Mask(112, 0, ext_call.return_data / 1000 != Mask(112, 0, ext_call.return_data[0]):
revert with 0, 'ds-math-mul-overflow'
if (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413]) < 1000 * Mask(112, 0, ext_call.return_data[0]):
revert with 0, 'ds-math-add-overflow'
require (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413])
require idx + 1 < 2
mem[(32 * idx + 1) + 413] = 0 / (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413])
else:
require Mask(112, 0, ext_call.return_data[32])
if 997 * mem[(32 * idx) + 413] * Mask(112, 0, ext_call.return_data / Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413]:
revert with 0, 'ds-math-mul-overflow'
if 1000 * Mask(112, 0, ext_call.return_data / 1000 != Mask(112, 0, ext_call.return_data[0]):
revert with 0, 'ds-math-mul-overflow'
if (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413]) < 1000 * Mask(112, 0, ext_call.return_data[0]):
revert with 0, 'ds-math-add-overflow'
require (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413])
require idx + 1 < 2
mem[(32 * idx + 1) + 413] = 997 * mem[(32 * idx) + 413] * Mask(112, 0, ext_call.return_data / (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413])
else:
if Mask(112, 0, ext_call.return_data <= 0:
revert with 0, 32, 40, 0x53556e697377617056324c6962726172793a20494e53554646494349454e545f4c49515549444954, mem[585 len 24]
if Mask(112, 0, ext_call.return_data <= 0:
revert with 0, 32, 40, 0x53556e697377617056324c6962726172793a20494e53554646494349454e545f4c49515549444954, mem[585 len 24]
if 997 * mem[(32 * idx) + 413] / 997 != mem[(32 * idx) + 413]:
revert with 0, 'ds-math-mul-overflow'
if not Mask(112, 0, ext_call.return_data[0]):
if 1000 * Mask(112, 0, ext_call.return_data / 1000 != Mask(112, 0, ext_call.return_data[32]):
revert with 0, 'ds-math-mul-overflow'
if (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413]) < 1000 * Mask(112, 0, ext_call.return_data[32]):
revert with 0, 'ds-math-add-overflow'
require (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413])
require idx + 1 < 2
mem[(32 * idx + 1) + 413] = 0 / (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413])
else:
require Mask(112, 0, ext_call.return_data[0])
if 997 * mem[(32 * idx) + 413] * Mask(112, 0, ext_call.return_data / Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413]:
revert with 0, 'ds-math-mul-overflow'
if 1000 * Mask(112, 0, ext_call.return_data / 1000 != Mask(112, 0, ext_call.return_data[32]):
revert with 0, 'ds-math-mul-overflow'
if (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413]) < 1000 * Mask(112, 0, ext_call.return_data[32]):
revert with 0, 'ds-math-add-overflow'
require (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413])
require idx + 1 < 2
mem[(32 * idx + 1) + 413] = 997 * mem[(32 * idx) + 413] * Mask(112, 0, ext_call.return_data / (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413])
else:
if not mem[(32 * idx + 1) + 140 len 20]:
revert with 0, 'UniswapV2Library: ZERO_ADDRESS'
require ext_code.size(addr(sha3(0, 6659063423423185226, sha3(addr(ext_call.return_data), 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2), 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f)))
static call addr(sha3(0, 6659063423423185226, sha3(addr(ext_call.return_data), 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2), 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f)).getReserves() with:
gas gas_remaining wei
mem[477 len 96] = ext_call.return_data[0 len 96]
if not ext_call.success:
revert with ext_call.return_data[0 len return_data.size]
require return_data.size >= 96
require idx < 2
if mem[(32 * idx) + 413] <= 0:
revert with 0, 32, 43, 0x44556e697377617056324c6962726172793a20494e53554646494349454e545f494e5055545f414d4f554e, mem[588 len 21]
if addr(_738) == addr(_729):
if Mask(112, 0, ext_call.return_data <= 0:
revert with 0, 32, 40, 0x53556e697377617056324c6962726172793a20494e53554646494349454e545f4c49515549444954, mem[585 len 24]
if Mask(112, 0, ext_call.return_data <= 0:
revert with 0, 32, 40, 0x53556e697377617056324c6962726172793a20494e53554646494349454e545f4c49515549444954, mem[585 len 24]
if 997 * mem[(32 * idx) + 413] / 997 != mem[(32 * idx) + 413]:
revert with 0, 'ds-math-mul-overflow'
if not Mask(112, 0, ext_call.return_data[32]):
if 1000 * Mask(112, 0, ext_call.return_data / 1000 != Mask(112, 0, ext_call.return_data[0]):
revert with 0, 'ds-math-mul-overflow'
if (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413]) < 1000 * Mask(112, 0, ext_call.return_data[0]):
revert with 0, 'ds-math-add-overflow'
require (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413])
require idx + 1 < 2
mem[(32 * idx + 1) + 413] = 0 / (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413])
else:
require Mask(112, 0, ext_call.return_data[32])
if 997 * mem[(32 * idx) + 413] * Mask(112, 0, ext_call.return_data / Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413]:
revert with 0, 'ds-math-mul-overflow'
if 1000 * Mask(112, 0, ext_call.return_data / 1000 != Mask(112, 0, ext_call.return_data[0]):
revert with 0, 'ds-math-mul-overflow'
if (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413]) < 1000 * Mask(112, 0, ext_call.return_data[0]):
revert with 0, 'ds-math-add-overflow'
require (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413])
require idx + 1 < 2
mem[(32 * idx + 1) + 413] = 997 * mem[(32 * idx) + 413] * Mask(112, 0, ext_call.return_data / (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413])
else:
if Mask(112, 0, ext_call.return_data <= 0:
revert with 0, 32, 40, 0x53556e697377617056324c6962726172793a20494e53554646494349454e545f4c49515549444954, mem[585 len 24]
if Mask(112, 0, ext_call.return_data <= 0:
revert with 0, 32, 40, 0x53556e697377617056324c6962726172793a20494e53554646494349454e545f4c49515549444954, mem[585 len 24]
if 997 * mem[(32 * idx) + 413] / 997 != mem[(32 * idx) + 413]:
revert with 0, 'ds-math-mul-overflow'
if not Mask(112, 0, ext_call.return_data[0]):
if 1000 * Mask(112, 0, ext_call.return_data / 1000 != Mask(112, 0, ext_call.return_data[32]):
revert with 0, 'ds-math-mul-overflow'
if (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413]) < 1000 * Mask(112, 0, ext_call.return_data[32]):
revert with 0, 'ds-math-add-overflow'
require (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413])
require idx + 1 < 2
mem[(32 * idx + 1) + 413] = 0 / (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413])
else:
require Mask(112, 0, ext_call.return_data[0])
if 997 * mem[(32 * idx) + 413] * Mask(112, 0, ext_call.return_data / Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413]:
revert with 0, 'ds-math-mul-overflow'
if 1000 * Mask(112, 0, ext_call.return_data / 1000 != Mask(112, 0, ext_call.return_data[32]):
revert with 0, 'ds-math-mul-overflow'
if (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413]) < 1000 * Mask(112, 0, ext_call.return_data[32]):
revert with 0, 'ds-math-add-overflow'
require (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413])
require idx + 1 < 2
mem[(32 * idx + 1) + 413] = 997 * mem[(32 * idx) + 413] * Mask(112, 0, ext_call.return_data / (1000 * Mask(112, 0, ext_call.return_data * mem[(32 * idx) + 413])
idx = idx + 1
continue
if mem[445] < _param2:
revert with 0, 'IA'
require ext_code.size(0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2)
call 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2.transfer(address to, uint256 value) with:
gas gas_remaining wei
args addr(sha3(0, 6659063423423185226, sha3(addr(ext_call.return_data), 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2), 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f)), _param1
if not ext_call.success:
revert with ext_call.return_data[0 len return_data.size]
require return_data.size >= 32
require ext_call.return_data[0]
if 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 == mem[172 len 20]:
revert with 0, 32, 37, 0xfe556e697377617056324c6962726172793a204944454e544943414c5f4144445245535345, mem[582 len 27]
if 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 < mem[172 len 20]:
mem[509] = 0x22c0d9f00000000000000000000000000000000000000000000000000000000
mem[513] = 0
mem[545] = mem[445]
mem[577] = this.address
mem[609] = 128
mem[641] = ext_call.return_data[0]
mem[673 len ceil32(ext_call.return_data] = mem[509 len ceil32(ext_call.return_data]
if not ext_call.return_data % 32:
require ext_code.size(addr(sha3(0, 6659063423423185226, sha3(addr(ext_call.return_data), 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2), 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f)))
call addr(sha3(0, 6659063423423185226, sha3(addr(ext_call.return_data), 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2), 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f)).0x22c0d9f with:
gas gas_remaining wei
args 0, mem[445], addr(this.address), 128, ext_call.return_datamem[673 len ext_call.return_data]
else:
mem[floor32(ext_call.return_data] = mem[floor32(ext_call.return_data % 32) + 705 len ext_call.return_data % 32]
require ext_code.size(addr(sha3(0, 6659063423423185226, sha3(addr(ext_call.return_data), 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2), 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f)))
call addr(sha3(0, 6659063423423185226, sha3(addr(ext_call.return_data), 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2), 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f)).0x22c0d9f with:
gas gas_remaining wei
args 0, mem[445], addr(this.address), 128, ext_call.return_datamem[673 len floor32(ext_call.return_data]
else:
if not mem[172 len 20]:
revert with 0, 'UniswapV2Library: ZERO_ADDRESS'
mem[509] = 0x22c0d9f00000000000000000000000000000000000000000000000000000000
if 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 == mem[172 len 20]:
mem[513] = 0
mem[545] = mem[445]
mem[577] = this.address
mem[609] = 128
mem[641] = ext_call.return_data[0]
mem[673 len ceil32(ext_call.return_data] = mem[509 len ceil32(ext_call.return_data]
if not ext_call.return_data % 32:
require ext_code.size(addr(sha3(0, 6659063423423185226, sha3(addr(ext_call.return_data), 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2), 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f)))
call addr(sha3(0, 6659063423423185226, sha3(addr(ext_call.return_data), 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2), 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f)).0x22c0d9f with:
gas gas_remaining wei
args 0, mem[445], addr(this.address), 128, ext_call.return_datamem[673 len ext_call.return_data]
else:
mem[floor32(ext_call.return_data] = mem[floor32(ext_call.return_data % 32) + 705 len ext_call.return_data % 32]
require ext_code.size(addr(sha3(0, 6659063423423185226, sha3(addr(ext_call.return_data), 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2), 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f)))
call addr(sha3(0, 6659063423423185226, sha3(addr(ext_call.return_data), 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2), 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f)).0x22c0d9f with:
gas gas_remaining wei
args 0, mem[445], addr(this.address), 128, ext_call.return_datamem[673 len floor32(ext_call.return_data]
else:
mem[513] = mem[445]
mem[545] = 0
mem[577] = this.address
mem[609] = 128
mem[641] = ext_call.return_data[0]
mem[673 len ceil32(ext_call.return_data] = mem[509 len ceil32(ext_call.return_data]
if not ext_call.return_data % 32:
require ext_code.size(addr(sha3(0, 6659063423423185226, sha3(addr(ext_call.return_data), 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2), 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f)))
call addr(sha3(0, 6659063423423185226, sha3(addr(ext_call.return_data), 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2), 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f)).0x22c0d9f with:
gas gas_remaining wei
args mem[445], 0, addr(this.address), 128, ext_call.return_datamem[673 len ext_call.return_data]
else:
mem[floor32(ext_call.return_data] = mem[floor32(ext_call.return_data % 32) + 705 len ext_call.return_data % 32]
require ext_code.size(addr(sha3(0, 6659063423423185226, sha3(addr(ext_call.return_data), 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2), 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f)))
call addr(sha3(0, 6659063423423185226, sha3(addr(ext_call.return_data), 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2), 0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f)).0x22c0d9f with:
gas gas_remaining wei
args mem[445], 0, addr(this.address), 128, ext_call.return_datamem[673 len floor32(ext_call.return_data]
if not ext_call.success:
revert with ext_call.return_data[0 len return_data.size]
If this is setup right can it be used for trading? i see its from 2019 or could be well before that. I have zero coding knowledge and am just curious as i see trades getting between peoples buys on shitcoins and this is the contract that is doing it.
Cheers for any info or just explanation on this.