Closed sjukeshov closed 5 years ago
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
This issue now has a funding of 0.15 ETH (20.34 USD @ $135.63/ETH) attached to it as part of the MythX fund.
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
Work has been started.
These users each claimed they can complete the work by 12 months from now. Please review their action plans below:
1) skyge has been approved to start work.
I ever saw sabre
before, I will try to find out what is wrong, if I have any questions, I will ask at the Discord, if it is.
Learn more on the Gitcoin Issue Details page.
I think this is an upstream issue that should be reported to https://github.com/ConsenSys/mythx-developer-support
The key of the problem must be at opcode PUSH20 0x0
which directs the bytes are 73__$c1e9661f796f9214b5c8076e394fd5a419$__
, it should be 730000000000000000000000000000000000000000
, so maybe we should make some conversion or something else.
Looks like some kind of placeholder...
Yeah, it is a placeholder, because we quote a library in this contract MetaCoin.sol
, I am looking for more details about it at the official document.
I do not find a better way to do it now, now my solution is
const reger=new RegExp("[\__$].*[\$__]","gm");
const fourty_bits = "0000000000000000000000000000000000000000"
data.bytecode = data.bytecode.replace(reger, fourty_bits);
data.deployedBytecode = data.deployedBytecode.replace(reger, fourty_bits);
as you see above, I intend to use regular expression to replace the placeholder, but I do not think it is a good way, if one contract quotes two and more libraries, I am not sure what will happen, so I will test it, and at the same time, I will try to find whether there is a better way to solve it. Maybe I can try to traverse the compiled.contract
or something else.
BTW, although now you can pass to next step if you update the file as I write above, but then you will encounter anther error: Analysis failed: source list index out of range
.
yeah, I am almost sure that we should solve the quoting library by replacing the placeholder, but I should change my method to be more readable.
Yeah, I did it the same way in Mythril Classic. Does your method deal with multiple library imports?
@b-mueller I just use the regular expression to modify it, you can look at here, but it still throw out an error Analysis failed: source list index out of range.
I am not sure for this.
Fixed a problem, but introduced another problem. Maybe I did wrong.
Ok, I'll have a look at it tomorrow!
⚡️ A tip worth 0.15000 ETH (20.41 USD @ $136.08/ETH) has been granted to @skyge for this issue from @b-mueller. ⚡️
Nice work @skyge! To redeem your tip, login to Gitcoin at https://gitcoin.co/explorer and select 'Claim Tip' from dropdown menu in the top right, or check your email for a link to the tip redemption page.
Issue Status: 1. Open 2. Started 3. Submitted 4. Done
This Bounty has been completed.
Additional Tips for this Bounty:
Standard truffle contracts unboxed with https://truffleframework.com/docs/truffle/getting-started/creating-a-project return error with Sabre:
Please check and fix. I'm getting this in Ubuntu and MacOs environments