web3j-cli icon indicating copy to clipboard operation
web3j-cli copied to clipboard

not a valid name why?

Open fastener opened this issue 4 years ago • 2 comments

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

fastener avatar Sep 13 '21 10:09 fastener

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 avatar Jan 04 '22 04:01 joelcho

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

joelcho avatar Jan 04 '22 04:01 joelcho