Open 0x19 opened 5 months ago
Potential root causes:
I've checked and constructor bytecode passed for unpacking is correct. That's not issue.
Our constructor
[{\"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\"}]
Etherscan constructor
[
{
"inputs": [
{
"internalType": "address",
"name": "cvpToken_",
"type": "address"
},
{
"internalType": "address",
"name": "reservoir_",
"type": "address"
},
{
"internalType": "uint256",
"name": "anchorPeriod_",
"type": "uint256"
},
{
"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"
}
],
"internalType": "struct UniswapConfig.TokenConfig[]",
"name": "configs",
"type": "tuple[]"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
}]
Ah well... It's tuple[] not a tuple...
There's an edge case with advanced use of constructor arguments.
Etherscan addr: https://etherscan.io/address/0x8e7e518b0481ADFaF969ED1f2B25bf553B79a677#code
Constructor ABI:
Basically it results back with error
failed to unpack values: abi: improperly encoded uint8 value