hyperledger-web3j / web3j-cli

Command-line interface for web3j
https://github.com/web3j/web3j-cli
Other
58 stars 30 forks source link

not a valid name why? #69

Open fastener opened 3 years ago

fastener commented 3 years ago

https://bscscan.com/address/0xca143ce32fe78f1f7019d7d551a6402fc5350c73#code

I use web3j cli to generate the Java proxy class, but the code of the contract pancakefactory fails to generate all the time, prompting not a valid name. Why

joelcho commented 2 years ago

The name of the 4th parameter of the PairCreate event is empty.

{
    "anonymous":false,
    "inputs":[
        {
            "indexed":true,
            "internalType":"address",
            "name":"token0",
            "type":"address"
        },
        {
            "indexed":true,
            "internalType":"address",
            "name":"token1",
            "type":"address"
        },
        {
            "indexed":false,
            "internalType":"address",
            "name":"pair",
            "type":"address"
        },
        {
            "indexed":false,
            "internalType":"uint256",
            "name":"", <-------
            "type":"uint256"
        }
    ],
    "name":"PairCreated",
    "type":"event"
}
joelcho commented 2 years ago

I guess the name of the parameter is only used to generate the Event Class. Specifying a name you want may work.