The Deployer
library employs abi.encodeWithSelector
to encode initialization data for the ERC721Bridgeable
and ERC1155Bridgeable
contracts. However, the use of abi.encode
within these encoding calls may be incorrect, potentially leading to improper encoding of the initialization data. This could cause the proxy to fail in correctly initializing the implementation contracts.
The dataInit
used in the abi.encodeWithSelector
function for initialization data may be improperly encoded. Specifically, the abi.encode
function is used to encode parameters for the initialize
functions of ERC721Bridgeable
and ERC1155Bridgeable
. If the parameters are not encoded correctly, the proxy contract will pass malformed initialization data to the implementation contract, leading to failures in setting up the contract state.
Initialization Failures: If the initialization data is not correctly encoded, the initialize
function in the implementation contract may not receive the correct parameters. This can result in improper initialization, leaving the contract in an uninitialized or partially initialized state.
Contract Usability: An uninitialized or incorrectly initialized contract can cause failures when interacting with the contract, affecting functionality such as token minting, transfers, or other critical operations.
Security Risks: Improper initialization can also introduce vulnerabilities if critical contract setup steps are skipped or executed with incorrect parameters.
Manual review
Verify Encoding of Initialization Data:
Review the initialize
functions in ERC721Bridgeable
and ERC1155Bridgeable
to ensure that the data encoded with abi.encode
matches the expected parameters and format.
Example of Correct Encoding:
For ERC1155Bridgeable
, ensure that the URI parameter is encoded correctly:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.