hyperledger-web3j / web3j

Lightweight Java and Android library for integration with Ethereum clients
https://www.web3labs.com/web3j-sdk
Other
5.12k stars 1.69k forks source link

web3j generate java code from compound Comptroller contract abi has error #1182

Closed ocoderr closed 3 years ago

ocoderr commented 4 years ago

_Bugtitle

web3j generate java code from compound Comptroller contract abi has error

Steps To Reproduce

Comptroller ABI https://compound.finance/docs/abi/mainnet/Comptroller

web3j solidity generate -a=Comptroller.abi -o=/src/main/java -p=com.compound.eth.contract

Expected behavior

generate valid java code.

Actual behavior

web3j generate java class have error

Environment

Describe the environment in which the issue occurs

Additional context

web3j output : Warning: Duplicate field(s) found: [FUNCSETCLOSEFACTOR, FUNC_PAUSEGUARDIAN, FUNC_LIQUIDATEBORROWVERIFY, FUNCSETBORROWPAUSED, FUNC_ENTERMARKETS, FUNC_TRANSFERGUARDIANPAUSED, FUNC_ADMIN, FUNC_SEIZEALLOWED, FUNC_MINTALLOWED, FUNCBORROWGUARDIANPAUSED, FUNCSETMAXASSETS, FUNCSETTRANSFERPAUSED, FUNC_LIQUIDATECALCULATESEIZETOKENS, FUNC_LIQUIDATEBORROWALLOWED, FUNC_REPAYBORROWVERIFY, FUNC_EXITMARKET, FUNCMINTGUARDIANPAUSED, FUNC_REDEEMALLOWED, FUNC_MARKETS, FUNCSETPRICEORACLE, FUNCSETMINTPAUSED, FUNC_SEIZEGUARDIANPAUSED, FUNC_REDEEMVERIFY, FUNCBECOME, FUNC_GETASSETSIN, FUNCSETLIQUIDATIONINCENTIVE, FUNC_CHECKMEMBERSHIP, FUNC_SEIZEVERIFY, FUNCSETSEIZEPAUSED, FUNC_ORACLE, FUNC_BORROWALLOWED, FUNC_TRANSFERALLOWED, FUNC_ACCOUNTASSETS, FUNC_MINTVERIFY, FUNC_BORROWGUARDIANPAUSED, FUNC_MINTGUARDIANPAUSED, FUNCSETPAUSEGUARDIAN, FUNC_PENDINGCOMPTROLLERIMPLEMENTATION, FUNC_LIQUIDATIONINCENTIVEMANTISSA, FUNC_PENDINGADMIN, FUNC_MAXASSETS, FUNC_TRANSFERVERIFY, FUNC_COMPTROLLERIMPLEMENTATION, FUNC_BORROWVERIFY, FUNC_GETACCOUNTLIQUIDITY, FUNC_ISCOMPTROLLER, FUNC_CLOSEFACTORMANTISSA, FUNC_REPAYBORROWALLOWED, FUNCSETCOLLATERALFACTOR, FUNCSUPPORTMARKET]. Please don't use names which will be the same in uppercase.

AlexandrouR commented 3 years ago

@ocoderr This is not really a but a warning displayed by the CLI. Using the latest version of CLI this is resolved. There are some warnings still but fewer and also the generation of the wrappers is not stopped.