v1
latestOpenAPI 3.1.02026-07-17373221.0 KBPrivate
Replaces an existing contract in the database, addressing issues with misaligned or incorrect contract data. This endpoint provides a generic, maintainable solution and optimizes performance by optionally skipping recompilation and on-chain RPC calls, using data already stored in the database.
post/private/replace-contract
Request body
Example request
{
"address": "0x00000000219ab540356cBB839Cbe05303d7705Fa",
"transactionHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"compilerVersion": "0.8.19+commit.7dd6d404",
"compilationTarget": "project:/contracts/Storage.sol:Storage",
"customReplaceMethod": "replace-creation-information"
}Response
The contract has been successfully replaced.