-
Notifications
You must be signed in to change notification settings - Fork 10
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
6 changed files
with
154 additions
and
578 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,11 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.27; | ||
|
||
import {IERC1271} from "lib/openzeppelin-contracts/contracts/interfaces/IERC1271.sol"; | ||
import { IERC1271 } from "lib/openzeppelin-contracts/contracts/interfaces/IERC1271.sol"; | ||
|
||
interface IAllocator is IERC1271 { | ||
// Called on standard transfers; must return this function selector (0x1a808f91). | ||
function attest( | ||
address operator, | ||
address from, | ||
address to, | ||
uint256 id, | ||
uint256 amount | ||
) external returns (bytes4); | ||
function attest(address operator, address from, address to, uint256 id, uint256 amount) external returns (bytes4); | ||
|
||
// isValidSignature of IERC1271 will be called during a claim and must verify the signature of the allocation. | ||
} |
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,24 +1,15 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.27; | ||
|
||
import {IAllocator} from "../interfaces/IAllocator.sol"; | ||
import {IERC1271} from "permit2/src/interfaces/IERC1271.sol"; | ||
import { IAllocator } from "../interfaces/IAllocator.sol"; | ||
import { IERC1271 } from "permit2/src/interfaces/IERC1271.sol"; | ||
|
||
contract AlwaysOKAllocator is IAllocator { | ||
function attest( | ||
address, | ||
address, | ||
address, | ||
uint256, | ||
uint256 | ||
) external pure returns (bytes4) { | ||
function attest(address, address, address, uint256, uint256) external pure returns (bytes4) { | ||
return IAllocator.attest.selector; | ||
} | ||
|
||
function isValidSignature( | ||
bytes32, | ||
bytes calldata | ||
) external pure returns (bytes4) { | ||
function isValidSignature(bytes32, bytes calldata) external pure returns (bytes4) { | ||
return IERC1271.isValidSignature.selector; | ||
} | ||
} |
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.