Skip to content

πŸ˜΅β€πŸ’« A Recurrent Neural Network (RNN) hallucinating solidity source code.

Notifications You must be signed in to change notification settings

BTHoneyBadger/hallucinate.sol

Repository files navigation

get in touch with Consensys Diligence
[ 🌐 πŸ“© πŸ”₯ ]

Hallucinate.sol

πŸ˜΅β€πŸ’« A Recurrent Neural Network (RNN) hallucinating solidity source code.

image

Note: train the model on https://colab.research.google.com/ as it is much faster than doing this locally.

Contents

Demo

Copy the two tutorials to your google drive and run them.

print(trainingData.predict(['contract '], 3000))
contract Ownable {
  address public owner;
  event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
  function Ownable() public {
    owner = msg.sender;
  }
  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }
  function transferOwnership(address newOwner) public onlyOwner {
    require(newOwner != address(0));
    emit OwnershipTransferred(owner, newOwner);
    owner = newOwner;
  }
}
contract Parminicinvition is Ownable {
    using SafeMath for uint256;
    enum State { Approve          = token.totalSupply();
      require(tokens >= summaryTokens.add(bonus));
        totalDailydested = totalEthInWei + msg.value;
        totalSoldTokens = token.totalSupply();
        emit Transfer(address(0), 0xCf49B9298aC4d4933a7D6984d89A49aDc84A6CA602BA513D872C3,21f36325D28718](0));
        totalSupply = totalSupply.mul(totalValue.add(soldSignedMap[tokensBough.mul(1)));
          restributedPluyRates[msg.sender] = true;
              nonStokenSupplyFinallow
        }
                if(opits[msg.sender].amount <= totalSupply)) ether;
			}
		assignOpe(address(this).balance, weiAmount);
		require(canTra_secrecover(_approved) >= rNo(_reward, _weight, _amount);
	    totalAmount = totalAmount.add(_amount);
        Transfer(_addr, msg.sender, amount);
    }
...

Credits

Based on the TensorFlow Text Generation Tutorial

About

πŸ˜΅β€πŸ’« A Recurrent Neural Network (RNN) hallucinating solidity source code.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 85.1%
  • Python 14.9%