-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: witness some safety values in headers and add default result to ctx
- Loading branch information
dndll
committed
Feb 15, 2024
1 parent
bfd57bd
commit 771e64b
Showing
18 changed files
with
407 additions
and
85 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1,7 +1,8 @@ | ||
[profile.default] | ||
fs_permissions = [ { access = "read", path = "./broadcast" } ] | ||
libs = [ "lib" ] | ||
optimizer = true | ||
optimizer-runs = 1_000_000 | ||
out = "out" | ||
remappings = [ "@openzeppelin/contracts=lib/openzeppelin-contracts/contracts", "@openzeppelin/contracts-upgradeable=lib/openzeppelin-contracts-upgradeable/contracts" ] | ||
src = "src" | ||
# See more config options https://github.com/foundry-rs/foundry/tree/master/config |
Submodule solidity-bytes-utils
added at
e0115c
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,39 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.19; | ||
|
||
import {Script} from "forge-std/Script.sol"; | ||
import {ERC1967Proxy} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol"; | ||
import {DevOpsTools} from "lib/foundry-devops/src/DevOpsTools.sol"; | ||
import {NearX, TransactionOrReceiptId} from "../src/NearX.sol"; | ||
|
||
contract Verify is Script { | ||
function run() external { | ||
address proxyAddress = DevOpsTools.get_most_recent_deployment( | ||
"ERC1967Proxy", | ||
block.chainid | ||
); | ||
TransactionOrReceiptId[] memory ids = new TransactionOrReceiptId[](2); | ||
|
||
ids[0].isTransaction = true; | ||
bytes32 txId = hex"2c53bcfe871da28decc45c3437f5864568d91af6d990dbc2662f11ce44c18d79"; | ||
ids[0].id = txId; | ||
bytes | ||
memory txAccount = hex"7a61766f64696c2e746573746e65742c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c"; | ||
ids[0].account = txAccount; | ||
|
||
ids[1].isTransaction = false; | ||
bytes32 rxId = hex"7ff581f8517ec58459099a5af2465d5232fdcdd7c4da9c3d42a887bf6bd5457e"; | ||
ids[1].id = rxId; | ||
bytes | ||
memory rxAccount = hex"70726963656f7261636c652e746573746e65742c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c2c"; | ||
ids[1].account = rxAccount; | ||
|
||
vm.startBroadcast(); | ||
|
||
NearX lightClient = NearX(payable(proxyAddress)); | ||
|
||
lightClient.requestVerify(ids); | ||
|
||
vm.stopBroadcast(); | ||
} | ||
} |
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
Oops, something went wrong.