deploy with remix, verify with truffle
Deploying a smart contract using Remix IDE provides a user-friendly and interactive interface for developers, allowing them to compile, test, and deploy their contracts directly from their browser. Once deployed, verifying the contract with Truffle enhances transparency and trust by ensuring the source code matches the on-chain bytecode. This can be achieved by configuring the Truffle project with the correct network settings, compiling the contract using the same compiler version and settings as used in Remix, and using the truffle run verify command to submit the contract's source code and metadata to the appropriate verification service, such as Etherscan or BscScan. This two-step approach leverages the strengths of both tools: the ease of deployment with Remix and the robust verification capabilities of Truffle.
npm install truffle-plugin-verify --save-dev
truffle run verfiy [ContractName]@[Contract Address] --network [networkconfig]
truffle run verify UniswapV2Router@0x84A3B8803D072fBBB1cd01E5b399eB4C1ff4164f --network testnet