This repository has been archived by the owner on Nov 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
68 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
### Existing deployment | ||
|
||
For demo purposes here are example contracts deployed on Sepolia and Mumbai. | ||
|
||
1. Sepolia Proxy: https://sepolia.etherscan.io/address/0x43d4e075bdF270513d6c76F59eCC5C4479322A3a#readProxyContract | ||
2. Mumbai Proxy: https://mumbai.polygonscan.com/address/0x43d4e075bdF270513d6c76F59eCC5C4479322A3a | ||
|
||
Both proxies and implementations are verified on [Sourcify](https://sourcify.dev/#/lookup/0x43d4e075bdF270513d6c76F59eCC5C4479322A3a). | ||
|
||
``` | ||
== Logs == | ||
Counter address: 0xA13e2fa62b771887F383F4a95c4D8E9eA1A0d748 | ||
Counter Proxy address: 0x43d4e075bdF270513d6c76F59eCC5C4479322A3a | ||
``` | ||
|
||
Example cross-chain transaction from Sepolia to Mumbai: [LayerZero Scan](https://testnet.layerzeroscan.com/tx/0xa236623f7cab080c706edf3889fe8dd2c55f0750fc5dc29cb4794dffc361b0e7) | ||
|
||
Example message options that can be used for quoting and then calling `increment()`: `0x00030100110100000000000000000000000000030d40` (pay 200k gas to Executor and trigger LZ Receive). | ||
|
||
![message delivered](./img/message-delivered.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Verification | ||
|
||
The automatic verification process in Foundry, initiated by the --verify flag during deployment, appears to be non-functional. This issue is likely attributed to a Foundry error. Nonetheless, verifying contracts manually using command-line and Etherscan website remains a relatively straightforward process. | ||
|
||
**Counter** | ||
|
||
Verifying Counter seems to be more or less automatic. | ||
|
||
Verifying Counter: | ||
``` | ||
forge verify-contract COUNTER_ADDRESS Counter --watch --chain sepolia | ||
``` | ||
|
||
*Note: You can obtain `COUNTER_ADDRESS` from deployment logs, it is "Counter address".* | ||
|
||
On Mumbai it requires more effort to verify the contract. Run: | ||
``` | ||
forge verify-contract COUNTER_ADDRESS Counter --chain mumbai --show-standard-json-input > etherscan.json | ||
``` | ||
|
||
Sometimes even manually uploading the file doesn't seem to work for Mumbai network. | ||
|
||
And then manually upload that JSON file as Standard Input into Mumbai Polygonscan. Automatic verification is broken, error: | ||
``` | ||
Encountered an error verifying this contract: | ||
Response: `NOTOK` | ||
Details: `Invalid API Key` | ||
``` | ||
|
||
**Proxy** | ||
|
||
Verifying UUPSProxy seems to require marking the contract as proxy in Etherscan interface by clicking "Is this proxy?" | ||
|
||
![proxy verification](./img/proxy-verification.png) | ||
|
||
Full verification can be done by manually obtaining constructor args and executing following command: | ||
``` | ||
forge verify-contract PROXY_ADDRESS UUPSProxy \ | ||
--constructor-args "0x000000000000000000000000a13e2fa62b771887f383f4a95c4d8e9ea1a0d74800000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000044485cc955000000000000000000000000464570ada09869d8741132183721b4f0769a028700000000000000000000000073b31ac967f46db2c45280c7f5d1d3ee7f38e12200000000000000000000000000000000000000000000000000000000" \ | ||
--watch --chain sepolia | ||
``` | ||
|
||
Constructor arguments can be obtained from `./broadcast/multi/Counter.s.sol-latest/deployCounterTestnet.json` after running deployment script. |