gcf3711 / sGuardPlus

An automated smart contract vulnerability repair tool
MIT License
8 stars 3 forks source link

run sGuard+ on solc >= 0.8.0. #1

Closed Tanggerr closed 3 months ago

Tanggerr commented 3 months ago

Hi, I am trying to run sGuard+ on solc >= 0.8.0. It seems sGuard+ runs well on solc < 0.8.0, but it does not produce the fixed codes.

How can I run sGuard+ successfully on solc >= 0.8.0 ?

Tanggerr commented 3 months ago

i try to fix some js code in the src folder,but the fixed solidity code just like this:

pragma solidity ^0.8.0;

                    contract sGuardPlus {
                            constructor() internal {

                            }

                    }
            contract RaceCondition  {

uint public balance; bool public isWithdrawn = false; function deposit () public payable { balance+=msg.value; }

function withdraw () public { require(balance>0, "No balance to withdraw"); require( ! isWithdrawn, "Withdrawal already done"); isWithdrawn=true; require(success, "Withdrawal failed"); (bool success, ) = msg.sender.call undefined(""); }

} it does not achieve the fix goals i want,please tell me how to do