diff --git a/docs/build/toolchains/foundry.mdx b/docs/build/toolchains/foundry.mdx index 22c0651..f37989f 100644 --- a/docs/build/toolchains/foundry.mdx +++ b/docs/build/toolchains/foundry.mdx @@ -24,7 +24,12 @@ Just provide the Telos RPC URL and Chain ID when deploying and verifying your co ``` bash -forge create --rpc-url "https://mainnet.telos.net/evm" --private-key --verify src/MyContract.sol:MyContract +forge create --rpc-url https://mainnet.telos.net/evm \ + --private-key \ + src/MyContract.sol:MyContract \ + --legacy \ + --verify \ + --verifier sourcify ``` @@ -32,18 +37,17 @@ forge create --rpc-url "https://mainnet.telos.net/evm" --private-key \ - src/MyToken.sol:MyToken +forge verify-contract \ + src/MyContract.sol:MyContract \ + --chain-id 40 \ + --verifier sourcify ``` :::note ---num-of-optimizations will default to 0 if not set on verification, while it defaults to 200 if not set on deployment, so make sure you pass --num-of-optimizations 200 if you left the default compilation settings. +- Since it needs to be deployed on the Telos EVM instead of Ethereum, you need to specify the Telos corresponding validator `sourcify` instead of the default `etherscan`; +- You need to wait a few minutes to see the verification result. ::: @@ -53,7 +57,12 @@ forge verify-contract \ ``` bash -forge create --rpc-url "https://testnet.telos.net/evm" --private-key --verify src/MyContract.sol:MyContract +forge create --rpc-url https://testnet.telos.net/evm \ + --private-key \ + src/MyContract.sol:MyContract \ + --legacy \ + --verify \ + --verifier sourcify ``` @@ -61,16 +70,15 @@ forge create --rpc-url "https://testnet.telos.net/evm" --private-key \ - src/MyToken.sol:MyToken +forge verify-contract \ + src/MyContract.sol:MyContract \ + --chain-id 41 \ + --verifier sourcify ``` :::note ---num-of-optimizations will default to 0 if not set on verification, while it defaults to 200 if not set on deployment, so make sure you pass --num-of-optimizations 200 if you left the default compilation settings. +- Since it needs to be deployed on the Telos EVM instead of Ethereum, you need to specify the Telos corresponding validator `sourcify` instead of the default `etherscan`; +- You need to wait a few minutes to see the verification result. :::