Skip to content

[Bug] Improperly encoded uint8 (enum) @ decoding constructor #196

@0x19

Description

@0x19

There's an edge case with advanced use of constructor arguments.

Etherscan addr: https://etherscan.io/address/0x8e7e518b0481ADFaF969ED1f2B25bf553B79a677#code

Constructor ABI:

[{"inputs":[{"internalType":"address","name":"cvpToken_","type":"address"},{"internalType":"address","name":"reservoir_","type":"address"},{"internalType":"uint256","name":"anchorPeriod_","type":"uint256"},{"internalType":"struct UniswapConfig.TokenConfig","name":"TokenConfig","type":"tuple","components":[{"internalType":"address","name":"cToken","type":"address"},{"internalType":"address","name":"underlying","type":"address"},{"internalType":"bytes32","name":"symbolHash","type":"bytes32"},{"internalType":"uint256","name":"baseUnit","type":"uint256"},{"internalType":"enum UniswapConfig.PriceSource","name":"priceSource","type":"uint8"},{"internalType":"uint256","name":"fixedPrice","type":"uint256"},{"internalType":"address","name":"uniswapMarket","type":"address"},{"internalType":"bool","name":"isUniswapReversed","type":"bool"}]}],"outputs":[],"name":"","type":"constructor","stateMutability":"nonpayable"}]

Basically it results back with error failed to unpack values: abi: improperly encoded uint8 value

Metadata

Metadata

Assignees

Labels

abiApplication Binary InterfaceastAbstract Syntax TreebugSomething isn't workinghigh priorityHigh Priority Tasksunit test

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions