-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix check_supplements assert error #72
base: master
Are you sure you want to change the base?
Conversation
Thank you for fixing this! Hope this can be merged soon! |
👍 |
@YadominJinta Thank you for your work.
|
I'm going to work on it I'll get back to you |
@EasonC13 if you're using powershell, try $env:WEB3_PROVIDER_URI="https://eth.llamarpc.com"
panoramix 0x49091eeaf9A713daBcD0B96D4C12749B218A52a0 I just fixed the shelve db problem, but this decompiler still have a lot of compatible problems with Windows, so I suggest using WSL if you need it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DioX
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OdiX
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DioX
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`# Palkeoramix decompiler.
def storage:
balanceOf is mapping of uint256 at storage 0
allowance is mapping of uint256 at storage 1
totalSupply is uint256 at storage 2
stor3 is mapping of uint8 at storage 3
paused is uint8 at storage 4
name is array of uint256 at storage 5
symbol is array of uint256 at storage 6
decimals is uint8 at storage 7
def name() payable:
return name[0 len name.length]
def totalSupply() payable:
return totalSupply
def decimals() payable:
return decimals
def isPauser(address _account) payable:
require calldata.size - 4 >= 32
require _account
return bool(stor3[addr(_account)])
def paused() payable:
return bool(paused)
def balanceOf(address _owner) payable:
require calldata.size - 4 >= 32
return balanceOf[addr(_owner)]
def symbol() payable:
return symbol[0 len symbol.length]
def allowance(address _owner, address _spender) payable:
require calldata.size - 4 >= 64
return allowance[addr(_owner)][addr(_spender)]
Regular functions
def _fallback() payable: # default function
revert
def unpause() payable:
require caller
require stor3[caller]
require paused
paused = 0
log Unpaused(address account=caller)
def pause() payable:
require caller
require stor3[caller]
require not paused
paused = 1
log Paused(address account=caller)
def renouncePauser() payable:
require caller
require stor3[caller]
stor3[caller] = 0
log PauserRemoved(address account=caller)
def addPauser(address _account) payable:
require calldata.size - 4 >= 32
require caller
require stor3[caller]
require _account
require not stor3[addr(_account)]
stor3[addr(_account)] = 1
log PauserAdded(address account=_account)
def approve(address _spender, uint256 _value) payable:
require calldata.size - 4 >= 64
require not paused
require _spender
allowance[caller][addr(_spender)] = _value
log Approval(
address tokenOwner=_value,
address spender=caller,
uint256 tokens=_spender)
return 1
def decreaseAllowance(address _spender, uint256 _subtractedValue) payable:
require calldata.size - 4 >= 64
require not paused
require _spender
require _subtractedValue <= allowance[caller][addr(_spender)]
allowance[caller][addr(_spender)] -= _subtractedValue
log Approval(
address tokenOwner=(allowance[caller][addr(_spender)] - _subtractedValue),
address spender=caller,
uint256 tokens=_spender)
return 1
def transfer(address _to, uint256 _value) payable:
require calldata.size - 4 >= 64
require not paused
require _to
require _value <= balanceOf[caller]
balanceOf[caller] -= _value
require _value + balanceOf[_to] >= balanceOf[_to]
balanceOf[addr(_to)] = _value + balanceOf[_to]
log Transfer(
address from=_value,
address to=caller,
uint256 tokens=_to)
return 1
def increaseAllowance(address _spender, uint256 _addedValue) payable:
require calldata.size - 4 >= 64
require not paused
require _spender
require _addedValue + allowance[caller][addr(_spender)] >= allowance[caller][addr(_spender)]
allowance[caller][addr(_spender)] += _addedValue
log Approval(
address tokenOwner=(_addedValue + allowance[caller][addr(_spender)]),
address spender=caller,
uint256 tokens=_spender)
return 1
def transferFrom(address _from, address _to, uint256 _value) payable:
require calldata.size - 4 >= 96
require not paused
require _value <= allowance[addr(_from)][caller]
allowance[addr(_from)][caller] -= _value
require _to
require _value <= balanceOf[addr(_from)]
balanceOf[addr(_from)] -= _value
require _value + balanceOf[_to] >= balanceOf[_to]
balanceOf[addr(_to)] = _value + balanceOf[_to]
log Transfer(
address from=_value,
address to=_from,
uint256 tokens=_to)
log Approval(
address tokenOwner=allowance[addr(_from)][caller],
address spender=_from,
uint256 tokens=caller)
return 1
`
shelve.open
may create db with extension, on Windows, it createsabi_db.shelve.dat
, andabi_path().is_file()
will always beFalse
.Refer: https://docs.python.org/3/library/shelve.html#shelve.open
Fix #61