GithubHelp home page GithubHelp logo

Comments (4)

tjanson avatar tjanson commented on May 14, 2024 3

The same problem occurs with unnamed event parameters. I’m guessing it’s the same underlying bug. @conor10
Example:

// HelloWorld.sol
pragma solidity ^0.4.24;


contract HelloWorld {
    event Foo(uint);
}
$ solc HelloWorld.sol --bin --abi -o ./
$ web3j solidity generate HelloWorld.bin HelloWorld.abi -o . -p org.web3j.sample

              _      _____ _     _
             | |    |____ (_)   (_)
__      _____| |__      / /_     _   ___
\ \ /\ / / _ \ '_ \     \ \ |   | | / _ \
 \ V  V /  __/ |_) |.___/ / | _ | || (_) |
  \_/\_/ \___|_.__/ \____/| |(_)|_| \___/
                         _/ |
                        |__/

Generating org.web3j.sample.HelloWorld ... Exception in thread "main" java.lang.IllegalArgumentException: not a valid name:
	at com.squareup.javapoet.Util.checkArgument(Util.java:64)
	at com.squareup.javapoet.FieldSpec.builder(FieldSpec.java:92)
	at com.squareup.javapoet.TypeSpec$Builder.addField(TypeSpec.java:499)
	at org.web3j.codegen.SolidityFunctionWrapper.buildEventResponseObject(SolidityFunctionWrapper.java:753)
	at org.web3j.codegen.SolidityFunctionWrapper.buildEventFunctions(SolidityFunctionWrapper.java:896)
	at org.web3j.codegen.SolidityFunctionWrapper.buildFunctionDefinitions(SolidityFunctionWrapper.java:255)
	at org.web3j.codegen.SolidityFunctionWrapper.generateJavaFiles(SolidityFunctionWrapper.java:130)
	at org.web3j.codegen.SolidityFunctionWrapper.generateJavaFiles(SolidityFunctionWrapper.java:111)
	at org.web3j.codegen.SolidityFunctionWrapperGenerator.generate(SolidityFunctionWrapperGenerator.java:123)
	at org.web3j.codegen.SolidityFunctionWrapperGenerator.main(SolidityFunctionWrapperGenerator.java:87)
	at org.web3j.codegen.SolidityFunctionWrapperGenerator.run(SolidityFunctionWrapperGenerator.java:48)
	at org.web3j.console.Runner.main(Runner.java:38)

Once a name is added, it works fine.

from web3j.

conor10 avatar conor10 commented on May 14, 2024

I'm presuming you updated to the latest release?

from web3j.

fraspadafora avatar fraspadafora commented on May 14, 2024

Yes, I was using an old version.

from web3j.

RakeshSainiRk avatar RakeshSainiRk commented on May 14, 2024

3.2 is the latest release ri8 ?

from web3j.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.