-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Update to work with latest version of codebase
- Loading branch information
Showing
15 changed files
with
180 additions
and
140 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
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
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.25; | ||
|
||
import {GatewayFetcher, GatewayRequest} from "@unruggable/contracts/GatewayFetcher.sol"; | ||
import {GatewayFetchTarget, IGatewayVerifier} from "@unruggable/contracts/GatewayFetchTarget.sol"; | ||
|
||
import "forge-std/console2.sol"; // DEBUG | ||
|
||
contract L1SimpleResolver is GatewayFetchTarget { | ||
using GatewayFetcher for GatewayRequest; | ||
|
||
IGatewayVerifier immutable _verifier; | ||
address immutable _exampleAddress; | ||
|
||
constructor(IGatewayVerifier verifier, address exampleAddress) { | ||
_verifier = verifier; | ||
_exampleAddress = exampleAddress; | ||
} | ||
|
||
function supportsInterface(bytes4 x) external pure returns (bool) { | ||
return x == 0x9061b923 ? false : true; | ||
} | ||
|
||
function addr(bytes32 node) public view returns (address) { | ||
|
||
GatewayRequest memory r = GatewayFetcher | ||
.newRequest(1) | ||
.setTarget(_exampleAddress) | ||
.setSlot(11) | ||
.read() | ||
.debug("lol") | ||
.setOutput(0); | ||
|
||
fetch(_verifier, r, this.addrCallback.selector); | ||
} | ||
|
||
function addrCallback(bytes[] calldata values, uint8, bytes calldata extraData) external pure returns (address) { | ||
return abi.decode(values[0], (address)); | ||
} | ||
} |
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
Submodule ens-contracts
updated
9 files
Submodule forge-std
updated
22 files
+193 −0 | CONTRIBUTING.md | |
+17 −1 | README.md | |
+1 −1 | package.json | |
+12 −1 | scripts/vm.py | |
+4 −0 | src/StdChains.sol | |
+3 −3 | src/StdCheats.sol | |
+104 −0 | src/StdJson.sol | |
+104 −0 | src/StdToml.sol | |
+216 −19 | src/Vm.sol | |
+471 −463 | src/console.sol | |
+2 −2 | src/interfaces/IERC4626.sol | |
+1 −1 | test/StdAssertions.t.sol | |
+14 −12 | test/StdChains.t.sol | |
+10 −10 | test/StdCheats.t.sol | |
+12 −12 | test/StdError.t.sol | |
+1 −1 | test/StdJson.t.sol | |
+4 −14 | test/StdMath.t.sol | |
+5 −5 | test/StdStorage.t.sol | |
+1 −1 | test/StdStyle.t.sol | |
+1 −1 | test/StdToml.t.sol | |
+12 −12 | test/StdUtils.t.sol | |
+9 −6 | test/Vm.t.sol |
Submodule unruggable-gateways
updated
192 files
Oops, something went wrong.