Overview
ETH Balance
ETH Value
$0.03 (@ $2,792.22/ETH)Latest 8 from a total of 8 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Call Deposit V3 | 208566354 | 628 days ago | IN | 0.00039656 ETH | 0.00000153 | ||||
| Call Deposit V3 | 202678701 | 646 days ago | IN | 0.00039795 ETH | 0.00000219 | ||||
| Call Deposit V3 | 202645960 | 646 days ago | IN | 0.00039335 ETH | 0.00000247 | ||||
| Call Deposit V3 | 202364265 | 647 days ago | IN | 0.00039847 ETH | 0.00000211 | ||||
| Call Deposit V3 | 202359051 | 647 days ago | IN | 0.00039788 ETH | 0.00000202 | ||||
| Call Deposit V3 | 201995218 | 648 days ago | IN | 0.00041054 ETH | 0.00000542 | ||||
| Call Deposit V3 | 201674710 | 649 days ago | IN | 0.00040676 ETH | 0.00000356 | ||||
| Call Deposit V3 | 201670001 | 649 days ago | IN | 0.00033069 ETH | 0.00000348 |
Latest 25 internal transactions (View All)
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 219390800 | 597 days ago | 100 wei | ||||
| 219390800 | 597 days ago | 0.00001 ETH | ||||
| 218440624 | 599 days ago | 0.000001 ETH | ||||
| 208934625 | 627 days ago | 0.00032984 ETH | ||||
| 208934625 | 627 days ago | 0.00032984 ETH | ||||
| 208934443 | 627 days ago | 0.00032984 ETH | ||||
| 208934443 | 627 days ago | 0.00032984 ETH | ||||
| 208934241 | 627 days ago | 0.00032984 ETH | ||||
| 208934241 | 627 days ago | 0.00032984 ETH | ||||
| 208933852 | 627 days ago | 0.00032992 ETH | ||||
| 208933852 | 627 days ago | 0.00032992 ETH | ||||
| 208922432 | 627 days ago | 0.0003272 ETH | ||||
| 208922432 | 627 days ago | 0.0003272 ETH | ||||
| 208922406 | 627 days ago | 0.0003272 ETH | ||||
| 208922406 | 627 days ago | 0.0003272 ETH | ||||
| 208922015 | 627 days ago | 0.0003272 ETH | ||||
| 208922015 | 627 days ago | 0.0003272 ETH | ||||
| 208921780 | 627 days ago | 0.00032739 ETH | ||||
| 208921780 | 627 days ago | 0.00032739 ETH | ||||
| 208921004 | 627 days ago | 0.0003274 ETH | ||||
| 208921004 | 627 days ago | 0.0003274 ETH | ||||
| 208919801 | 627 days ago | 0.00032755 ETH | ||||
| 208919801 | 627 days ago | 0.00032755 ETH | ||||
| 208919695 | 627 days ago | 0.00032755 ETH | ||||
| 208919695 | 627 days ago | 0.00032755 ETH |
Cross-Chain Transactions
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import {PublicGoodAttester} from "./libs/Attestation.sol";
import {Native} from "./libs/Native.sol";
import {IDonations} from "./interfaces/IDonations.sol";
import {IAllo} from "./interfaces/IAllo.sol";
import {ISignatureTransfer} from "./interfaces/ISignatureTransfer.sol";
import {V3SpokePoolInterface} from "./interfaces/ISpokePool.sol";
import {WETH9Interface} from "./interfaces/IWETH.sol";
contract DonationWrapper is Ownable, ReentrancyGuard, Native, PublicGoodAttester {
error Unauthorized();
error InsufficientFunds();
error NoRoundOnDestination();
event Logger(bytes);
address public SPOKE_POOL;
address public ALLO_ADDRESS;
address public WETH_ADDRESS;
V3SpokePoolInterface spokePool;
IAllo alloContract;
WETH9Interface wethContract;
ISignatureTransfer public permit2;
struct DepositParams {
address recipient;
address inputToken;
address outputToken;
uint256 inputAmount;
uint256 outputAmount;
uint256 destinationChainId;
address exclusiveRelayer;
uint32 quoteTimestamp;
uint32 fillDeadline;
uint32 exclusivityDeadline;
}
enum PermitType {
None,
Permit,
PermitDAI,
Permit2
}
struct Permit2Data {
ISignatureTransfer.PermitTransferFrom permit;
bytes signature;
}
constructor(
address _eas,
bytes32 _easSchema,
address _acrossSpokePool,
address _allo,
address _wethAddress
) PublicGoodAttester(_eas, _easSchema) {
SPOKE_POOL = _acrossSpokePool;
WETH_ADDRESS = _wethAddress;
ALLO_ADDRESS = _allo;
spokePool = V3SpokePoolInterface(SPOKE_POOL);
alloContract = IAllo(ALLO_ADDRESS);
wethContract = WETH9Interface(WETH_ADDRESS);
}
function handleV3AcrossMessage(
address tokenSent,
uint256 amount,
address relayer,
bytes memory message
) external payable nonReentrant {
if (msg.sender != SPOKE_POOL) revert Unauthorized();
(bytes memory donationData, bytes memory signature) = abi.decode(message, (bytes, bytes));
if (!verifyDonation(donationData, signature)) revert Unauthorized();
handleDonation(donationData, amount, tokenSent, relayer);
}
function callDepositV3(
DepositParams memory params,
bytes memory message
) external payable nonReentrant {
(bytes memory donationData, bytes memory signature) = abi.decode(message, (bytes, bytes));
(,address donor,) = abi.decode(
donationData,
(uint256, address, bytes) // roundId, grantee, donor, voteParams(encoded)
);
// Verifying donationData
if (!verifyDonation(donationData, signature) || msg.sender != donor) revert Unauthorized();
makeDeposit(params, message);
}
function handleDonation(bytes memory donationData, uint256 amount, address tokenSent, address relayer) internal {
(uint256 roundId, address donor, bytes memory voteData) = abi.decode(
donationData,
(uint256, address, bytes) // roundId, donor, voteParams(encoded)
);
(address recipientId,, Permit2Data memory permit2Data) = abi.decode(voteData, (address, PermitType, Permit2Data));
if (amount < permit2Data.permit.permitted.amount) revert InsufficientFunds();
// Only support WETH transfers for now. This can be switched to a swap() call in the future to allow for wider token support.
unwrapWETH(amount);
// setup new schema
_attestDonor(donor, recipientId, roundId, tokenSent, permit2Data.permit.permitted.amount, relayer);
_vote(roundId, voteData, permit2Data.permit.permitted.amount);
}
function _vote(uint256 _roundId, bytes memory _voteData, uint256 _amount) internal {
if (address(alloContract) == address(0)) revert NoRoundOnDestination();
alloContract.allocate{value: _amount}(
_roundId, _voteData
);
}
function makeDeposit(DepositParams memory params, bytes memory message) internal {
spokePool.depositV3{value: msg.value}(
msg.sender, // donor
params.recipient,
params.inputToken,
params.outputToken,
params.inputAmount,
params.outputAmount,
params.destinationChainId,
params.exclusiveRelayer,
params.quoteTimestamp,
params.fillDeadline,
params.exclusivityDeadline,
message
);
}
function unwrapWETH(uint256 _amount) public {
wethContract.withdraw(_amount);
}
// Verifying Signatures
function verifyDonation(bytes memory donationData, bytes memory signature) public pure returns (bool) {
(,address donor,) = abi.decode(
donationData,
(uint256, address, bytes) // roundId, grantee, donor, voteParams(encoded)
);
return verify(donor, donationData, signature);
}
function getMessageHash(
bytes memory _message
) public pure returns (bytes32) {
return keccak256(abi.encodePacked(_message));
}
function getEthSignedMessageHash(bytes32 _messageHash)
public
pure
returns (bytes32)
{
return keccak256(
abi.encodePacked("\x19Ethereum Signed Message:\n32", _messageHash)
);
}
function verify(
address _signer,
bytes memory _message,
bytes memory _signature
) public pure returns (bool) {
bytes32 messageHash = getMessageHash(_message);
bytes32 ethSignedMessageHash = getEthSignedMessageHash(messageHash);
return recoverSigner(ethSignedMessageHash, _signature) == _signer;
}
function recoverSigner(
bytes32 _ethSignedMessageHash,
bytes memory _signature
) public pure returns (address) {
(bytes32 r, bytes32 s, uint8 v) = splitSignature(_signature);
return ecrecover(_ethSignedMessageHash, v, r, s);
}
function splitSignature(bytes memory sig)
public
pure
returns (bytes32 r, bytes32 s, uint8 v)
{
require(sig.length == 65, "invalid signature length");
assembly {
r := mload(add(sig, 32))
s := mload(add(sig, 64))
v := byte(0, mload(add(sig, 96)))
}
}
/**
* @notice Withdraw accidentally sent native currency
*/
function withdraw() external onlyOwner {
(bool success, ) = msg.sender.call{value: address(this).balance}("");
require(success, "Failed to withdraw.");
}
receive() external payable {}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_setOwner(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_setOwner(newOwner);
}
function _setOwner(address newOwner) private {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and make it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
// On the first call to nonReentrant, _notEntered will be true
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
_;
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity ^0.8.19;
// Interfaces
import {IRegistry} from "./IRegistry.sol";
import {IStrategy} from "./IStrategy.sol";
// Internal Libraries
import {Metadata} from "../libs/Metadata.sol";
// ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
// ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
// ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⢿⣿⣿⣿⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
// ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⣿⣿⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⡟⠘⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
// ⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⣿⣿⣾⠻⣿⣿⣿⣿⣿⣿⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⡿⠀⠀⠸⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⠀⠀⠀⢀⣠⣴⣴⣶⣶⣶⣦⣦⣀⡀⠀⠀⠀⠀⠀⠀
// ⠀⠀⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⡿⠃⠀⠙⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣿⠁⠀⠀⠀⢻⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⡀⠀⠀⠀⠀
// ⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⡿⠁⠀⠀⠀⠘⣿⣿⣿⣿⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⠃⠀⠀⠀⠀⠈⢿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⣰⣿⣿⣿⡿⠋⠁⠀⠀⠈⠘⠹⣿⣿⣿⣿⣆⠀⠀⠀
// ⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⡿⠀⠀⠀⠀⠀⠀⠈⢿⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣾⣿⣿⣿⠏⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⢰⣿⣿⣿⣿⠁⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⡀⠀⠀
// ⠀⠀⠀⢠⣿⣿⣿⣿⣿⣿⣿⣟⠀⡀⢀⠀⡀⢀⠀⡀⢈⢿⡟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⡇⠀⠀
// ⠀⠀⣠⣿⣿⣿⣿⣿⣿⡿⠋⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣶⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⡿⢿⠿⠿⠿⠿⠿⠿⠿⠿⠿⢿⣿⣿⣿⣷⡀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠸⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣿⠂⠀⠀
// ⠀⠀⠙⠛⠿⠻⠻⠛⠉⠀⠀⠈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⣿⣿⣿⣧⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⢻⣿⣿⣿⣷⣀⢀⠀⠀⠀⡀⣰⣾⣿⣿⣿⠏⠀⠀⠀
// ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠛⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⢰⣿⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⣧⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⠀⠹⢿⣿⣿⣿⣿⣾⣾⣷⣿⣿⣿⣿⡿⠋⠀⠀⠀⠀
// ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠙⠋⠛⠙⠋⠛⠙⠋⠛⠙⠋⠃⠀⠀⠀⠀⠀⠀⠀⠀⠠⠿⠻⠟⠿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⠟⠿⠟⠿⠆⠀⠸⠿⠿⠟⠯⠀⠀⠀⠸⠿⠿⠿⠏⠀⠀⠀⠀⠀⠈⠉⠻⠻⡿⣿⢿⡿⡿⠿⠛⠁⠀⠀⠀⠀⠀⠀
// allo.gitcoin.co
/// @title Allo Interface
/// @author @thelostone-mc <[email protected]>, @0xKurt <[email protected]>, @codenamejason <[email protected]>, @0xZakk <[email protected]>, @nfrgosselin <[email protected]>
/// @notice Interface for the Allo contract. It exposes all functions needed to use the Allo protocol.
interface IAllo {
/// ======================
/// ======= Structs ======
/// ======================
/// @notice the Pool struct that all strategy pools are based from
struct Pool {
bytes32 profileId;
IStrategy strategy;
address token;
Metadata metadata;
bytes32 managerRole;
bytes32 adminRole;
}
/// ======================
/// ======= Events =======
/// ======================
/// @notice Event emitted when a new pool is created
/// @param poolId ID of the pool created
/// @param profileId ID of the profile the pool is associated with
/// @param strategy Address of the strategy contract
/// @param token Address of the token pool was funded with when created
/// @param amount Amount pool was funded with when created
/// @param metadata Pool metadata
event PoolCreated(
uint256 indexed poolId,
bytes32 indexed profileId,
IStrategy strategy,
address token,
uint256 amount,
Metadata metadata
);
/// @notice Emitted when a pools metadata is updated
/// @param poolId ID of the pool updated
/// @param metadata Pool metadata that was updated
event PoolMetadataUpdated(uint256 indexed poolId, Metadata metadata);
/// @notice Emitted when a pool is funded
/// @param poolId ID of the pool funded
/// @param amount Amount funded to the pool
/// @param fee Amount of the fee paid to the treasury
event PoolFunded(uint256 indexed poolId, uint256 amount, uint256 fee);
/// @notice Emitted when the base fee is paid
/// @param poolId ID of the pool the base fee was paid for
/// @param amount Amount of the base fee paid
event BaseFeePaid(uint256 indexed poolId, uint256 amount);
/// @notice Emitted when the treasury address is updated
/// @param treasury Address of the new treasury
event TreasuryUpdated(address treasury);
/// @notice Emitted when the percent fee is updated
/// @param percentFee New percentage for the fee
event PercentFeeUpdated(uint256 percentFee);
/// @notice Emitted when the base fee is updated
/// @param baseFee New base fee amount
event BaseFeeUpdated(uint256 baseFee);
/// @notice Emitted when the registry address is updated
/// @param registry Address of the new registry
event RegistryUpdated(address registry);
/// @notice Emitted when a strategy is approved and added to the cloneable strategies
/// @param strategy Address of the strategy approved
event StrategyApproved(address strategy);
/// @notice Emitted when a strategy is removed from the cloneable strategies
/// @param strategy Address of the strategy removed
event StrategyRemoved(address strategy);
/// ====================================
/// ==== External/Public Functions =====
/// ====================================
/// @notice Initialize the Allo contract
/// @param _owner Address of the owner
/// @param _registry Address of the registry contract
/// @param _treasury Address of the treasury
/// @param _percentFee Percentage for the fee
/// @param _baseFee Base fee amount
function initialize(
address _owner,
address _registry,
address payable _treasury,
uint256 _percentFee,
uint256 _baseFee
) external;
/// @notice Creates a new pool (with a custom strategy)
/// @dev 'msg.sender' must be a member or owner of a profile to create a pool with or without a custom strategy, The encoded data
/// will be specific to a given strategy requirements, reference the strategy implementation of 'initialize()'. The strategy
/// address passed must not be a cloneable strategy. The strategy address passed must not be the zero address. 'msg.sender' must
/// be a member or owner of the profile id passed as '_profileId'.
/// @param _profileId The 'profileId' of the registry profile, used to check if 'msg.sender' is a member or owner of the profile
/// @param _strategy The address of the deployed custom strategy
/// @param _initStrategyData The data to initialize the strategy
/// @param _token The address of the token you want to use in your pool
/// @param _amount The amount of the token you want to deposit into the pool on initialization
/// @param _metadata The 'Metadata' of the pool, this uses our 'Meatdata.sol' struct (consistent throughout the protocol)
/// @param _managers The managers of the pool, and can be added/removed later by the pool admin
/// @return poolId The ID of the pool
function createPoolWithCustomStrategy(
bytes32 _profileId,
address _strategy,
bytes memory _initStrategyData,
address _token,
uint256 _amount,
Metadata memory _metadata,
address[] memory _managers
) external payable returns (uint256 poolId);
/// @notice Creates a new pool (by cloning a cloneable strategies).
/// @dev 'msg.sender' must be owner or member of the profile id passed as '_profileId'.
/// @param _profileId The ID of the registry profile, used to check if 'msg.sender' is a member or owner of the profile
/// @param _strategy The address of the strategy contract the pool will use.
/// @param _initStrategyData The data to initialize the strategy
/// @param _token The address of the token
/// @param _amount The amount of the token
/// @param _metadata The metadata of the pool
/// @param _managers The managers of the pool
/// @custom:initstrategydata The encoded data will be specific to a given strategy requirements,
/// reference the strategy implementation of 'initialize()'
function createPool(
bytes32 _profileId,
address _strategy,
bytes memory _initStrategyData,
address _token,
uint256 _amount,
Metadata memory _metadata,
address[] memory _managers
) external payable returns (uint256 poolId);
/// @notice Updates a pools metadata.
/// @dev 'msg.sender' must be a pool admin.
/// @param _poolId The ID of the pool to update
/// @param _metadata The new metadata to set
function updatePoolMetadata(uint256 _poolId, Metadata memory _metadata) external;
/// @notice Update the registry address.
/// @dev 'msg.sender' must be the Allo contract owner.
/// @param _registry The new registry address
function updateRegistry(address _registry) external;
/// @notice Updates the treasury address.
/// @dev 'msg.sender' must be the Allo contract owner.
/// @param _treasury The new treasury address
function updateTreasury(address payable _treasury) external;
/// @notice Updates the percentage for the fee.
/// @dev 'msg.sender' must be the Allo contract owner.
/// @param _percentFee The new percentage for the fee
function updatePercentFee(uint256 _percentFee) external;
/// @notice Updates the base fee.
/// @dev 'msg.sender' must be the Allo contract owner.
/// @param _baseFee The new base fee
function updateBaseFee(uint256 _baseFee) external;
/// @notice Adds a strategy to the cloneable strategies.
/// @dev 'msg.sender' must be the Allo contract owner.
/// @param _strategy The address of the strategy to add
function addToCloneableStrategies(address _strategy) external;
/// @notice Removes a strategy from the cloneable strategies.
/// @dev 'msg.sender' must be the Allo contract owner.
/// @param _strategy The address of the strategy to remove
function removeFromCloneableStrategies(address _strategy) external;
/// @notice Adds a pool manager to the pool.
/// @dev 'msg.sender' must be a pool admin.
/// @param _poolId The ID of the pool to add the manager to
/// @param _manager The address of the manager to add
function addPoolManager(uint256 _poolId, address _manager) external;
/// @notice Removes a pool manager from the pool.
/// @dev 'msg.sender' must be a pool admin.
/// @param _poolId The ID of the pool to remove the manager from
/// @param _manager The address of the manager to remove
function removePoolManager(uint256 _poolId, address _manager) external;
/// @notice Recovers funds from a pool.
/// @dev 'msg.sender' must be a pool admin.
/// @param _token The token to recover
/// @param _recipient The address to send the recovered funds to
function recoverFunds(address _token, address _recipient) external;
/// @notice Registers a recipient and emits {Registered} event if successful and may be handled differently by each strategy.
/// @param _poolId The ID of the pool to register the recipient for
function registerRecipient(uint256 _poolId, bytes memory _data) external payable returns (address);
/// @notice Registers a batch of recipients.
/// @param _poolIds The pool ID's to register the recipients for
/// @param _data The data to pass to the strategy and may be handled differently by each strategy
function batchRegisterRecipient(uint256[] memory _poolIds, bytes[] memory _data)
external
returns (address[] memory);
/// @notice Funds a pool.
/// @dev 'msg.value' must be greater than 0 if the token is the native token
/// or '_amount' must be greater than 0 if the token is not the native token.
/// @param _poolId The ID of the pool to fund
/// @param _amount The amount to fund the pool with
function fundPool(uint256 _poolId, uint256 _amount) external payable;
/// @notice Allocates funds to a recipient.
/// @dev Each strategy will handle the allocation of funds differently.
/// @param _poolId The ID of the pool to allocate funds from
/// @param _data The data to pass to the strategy and may be handled differently by each strategy.
function allocate(uint256 _poolId, bytes memory _data) external payable;
/// @notice Allocates funds to multiple recipients.
/// @dev Each strategy will handle the allocation of funds differently
function batchAllocate(uint256[] calldata _poolIds, bytes[] memory _datas) external;
/// @notice Distributes funds to recipients and emits {Distributed} event if successful
/// @dev Each strategy will handle the distribution of funds differently
/// @param _poolId The ID of the pool to distribute from
/// @param _recipientIds The recipient ids to distribute to
/// @param _data The data to pass to the strategy and may be handled differently by each strategy
function distribute(uint256 _poolId, address[] memory _recipientIds, bytes memory _data) external;
/// =========================
/// ==== View Functions =====
/// =========================
/// @notice Checks if an address is a pool admin.
/// @param _poolId The ID of the pool to check
/// @param _address The address to check
/// @return 'true' if the '_address' is a pool admin, otherwise 'false'
function isPoolAdmin(uint256 _poolId, address _address) external view returns (bool);
/// @notice Checks if an address is a pool manager.
/// @param _poolId The ID of the pool to check
/// @param _address The address to check
/// @return 'true' if the '_address' is a pool manager, otherwise 'false'
function isPoolManager(uint256 _poolId, address _address) external view returns (bool);
/// @notice Checks if a strategy is cloneable (is in the cloneableStrategies mapping).
/// @param _strategy The address of the strategy to check
/// @return 'true' if the '_strategy' is cloneable, otherwise 'false'
function isCloneableStrategy(address _strategy) external view returns (bool);
/// @notice Returns the address of the strategy for a given 'poolId'
/// @param _poolId The ID of the pool to check
/// @return strategy The address of the strategy for the ID of the pool passed in
function getStrategy(uint256 _poolId) external view returns (address);
/// @notice Returns the current percent fee
/// @return percentFee The current percentage for the fee
function getPercentFee() external view returns (uint256);
/// @notice Returns the current base fee
/// @return baseFee The current base fee
function getBaseFee() external view returns (uint256);
/// @notice Returns the current treasury address
/// @return treasury The current treasury address
function getTreasury() external view returns (address payable);
/// @notice Returns the current registry address
/// @return registry The current registry address
function getRegistry() external view returns (IRegistry);
/// @notice Returns the 'Pool' struct for a given 'poolId'
/// @param _poolId The ID of the pool to check
/// @return pool The 'Pool' struct for the ID of the pool passed in
function getPool(uint256 _poolId) external view returns (Pool memory);
/// @notice Returns the current fee denominator
/// @dev 1e18 represents 100%
/// @return feeDenominator The current fee denominator
function getFeeDenominator() external view returns (uint256);
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
interface IDonations {
function vote(bytes memory encodedVote, address roundContractAddress, address asset) external payable;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {ISchemaRegistry} from "./ISchemaRegistry.sol";
import {Attestation, EIP712Signature} from "../libs/Common.sol";
/// @notice A struct representing the arguments of the attestation request.
struct AttestationRequestData {
address recipient; // The recipient of the attestation.
uint64 expirationTime; // The time when the attestation expires (Unix timestamp).
bool revocable; // Whether the attestation is revocable.
bytes32 refUID; // The UID of the related attestation.
bytes data; // Custom attestation data.
uint256 value; // An explicit ETH amount to send to the resolver. This is important to prevent accidental user errors.
}
/// @notice A struct representing the full arguments of the attestation request.
struct AttestationRequest {
bytes32 schema; // The unique identifier of the schema.
AttestationRequestData data; // The arguments of the attestation request.
}
/// @notice A struct representing the full arguments of the full delegated attestation request.
struct DelegatedAttestationRequest {
bytes32 schema; // The unique identifier of the schema.
AttestationRequestData data; // The arguments of the attestation request.
EIP712Signature signature; // The EIP712 signature data.
address attester; // The attesting account.
}
/// @notice A struct representing the full arguments of the multi attestation request.
struct MultiAttestationRequest {
bytes32 schema; // The unique identifier of the schema.
AttestationRequestData[] data; // The arguments of the attestation request.
}
/// @notice A struct representing the full arguments of the delegated multi attestation request.
struct MultiDelegatedAttestationRequest {
bytes32 schema; // The unique identifier of the schema.
AttestationRequestData[] data; // The arguments of the attestation requests.
EIP712Signature[] signatures; // The EIP712 signatures data. Please note that the signatures are assumed to be signed with increasing nonces.
address attester; // The attesting account.
}
/// @notice A struct representing the arguments of the revocation request.
struct RevocationRequestData {
bytes32 uid; // The UID of the attestation to revoke.
uint256 value; // An explicit ETH amount to send to the resolver. This is important to prevent accidental user errors.
}
/// @notice A struct representing the full arguments of the revocation request.
struct RevocationRequest {
bytes32 schema; // The unique identifier of the schema.
RevocationRequestData data; // The arguments of the revocation request.
}
/// @notice A struct representing the arguments of the full delegated revocation request.
struct DelegatedRevocationRequest {
bytes32 schema; // The unique identifier of the schema.
RevocationRequestData data; // The arguments of the revocation request.
EIP712Signature signature; // The EIP712 signature data.
address revoker; // The revoking account.
}
/// @notice A struct representing the full arguments of the multi revocation request.
struct MultiRevocationRequest {
bytes32 schema; // The unique identifier of the schema.
RevocationRequestData[] data; // The arguments of the revocation request.
}
/// @notice A struct representing the full arguments of the delegated multi revocation request.
struct MultiDelegatedRevocationRequest {
bytes32 schema; // The unique identifier of the schema.
RevocationRequestData[] data; // The arguments of the revocation requests.
EIP712Signature[] signatures; // The EIP712 signatures data. Please note that the signatures are assumed to be signed with increasing nonces.
address revoker; // The revoking account.
}
/// @title IEAS
/// @notice EAS - Ethereum Attestation Service interface.
interface IEAS {
event Attested(
address indexed recipient,
address indexed attester,
bytes32 uid,
bytes32 indexed schema
);
event Revoked(
address indexed recipient,
address indexed attester,
bytes32 uid,
bytes32 indexed schema
);
event Timestamped(bytes32 indexed data, uint64 indexed timestamp);
event RevokedOffchain(
address indexed revoker,
bytes32 indexed data,
uint64 indexed timestamp
);
function getSchemaRegistry() external view returns (ISchemaRegistry);
function attest(
AttestationRequest calldata request
) external payable returns (bytes32);
function attestByDelegation(
DelegatedAttestationRequest calldata delegatedRequest
) external payable returns (bytes32);
function multiAttest(
MultiAttestationRequest[] calldata multiRequests
) external payable returns (bytes32[] memory);
function multiAttestByDelegation(
MultiDelegatedAttestationRequest[] calldata multiDelegatedRequests
) external payable returns (bytes32[] memory);
function revoke(RevocationRequest calldata request) external payable;
function revokeByDelegation(
DelegatedRevocationRequest calldata delegatedRequest
) external payable;
function multiRevoke(
MultiRevocationRequest[] calldata multiRequests
) external payable;
function multiRevokeByDelegation(
MultiDelegatedRevocationRequest[] calldata multiDelegatedRequests
) external payable;
function timestamp(bytes32 data) external returns (uint64);
function multiTimestamp(bytes32[] calldata data) external returns (uint64);
function revokeOffchain(bytes32 data) external returns (uint64);
function multiRevokeOffchain(
bytes32[] calldata data
) external returns (uint64);
function getAttestation(
bytes32 uid
) external view returns (Attestation memory);
function isAttestationValid(bytes32 uid) external view returns (bool);
function getTimestamp(bytes32 data) external view returns (uint64);
function getRevokeOffchain(
address revoker,
bytes32 data
) external view returns (uint64);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
interface IEIP712 {
function DOMAIN_SEPARATOR() external view returns (bytes32);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
// Internal Libraries
import {Metadata} from "../libs/Metadata.sol";
// ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
// ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
// ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⢿⣿⣿⣿⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
// ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⣿⣿⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⡟⠘⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
// ⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⣿⣿⣾⠻⣿⣿⣿⣿⣿⣿⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⡿⠀⠀⠸⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⠀⠀⠀⢀⣠⣴⣴⣶⣶⣶⣦⣦⣀⡀⠀⠀⠀⠀⠀⠀
// ⠀⠀⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⡿⠃⠀⠙⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣿⠁⠀⠀⠀⢻⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⡀⠀⠀⠀⠀
// ⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⡿⠁⠀⠀⠀⠘⣿⣿⣿⣿⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⠃⠀⠀⠀⠀⠈⢿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⣰⣿⣿⣿⡿⠋⠁⠀⠀⠈⠘⠹⣿⣿⣿⣿⣆⠀⠀⠀
// ⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⡿⠀⠀⠀⠀⠀⠀⠈⢿⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣾⣿⣿⣿⠏⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⢰⣿⣿⣿⣿⠁⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⡀⠀⠀
// ⠀⠀⠀⢠⣿⣿⣿⣿⣿⣿⣿⣟⠀⡀⢀⠀⡀⢀⠀⡀⢈⢿⡟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⡇⠀⠀
// ⠀⠀⣠⣿⣿⣿⣿⣿⣿⡿⠋⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣶⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⡿⢿⠿⠿⠿⠿⠿⠿⠿⠿⠿⢿⣿⣿⣿⣷⡀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠸⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣿⠂⠀⠀
// ⠀⠀⠙⠛⠿⠻⠻⠛⠉⠀⠀⠈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⣿⣿⣿⣧⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⢻⣿⣿⣿⣷⣀⢀⠀⠀⠀⡀⣰⣾⣿⣿⣿⠏⠀⠀⠀
// ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠛⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⢰⣿⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⣧⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⠀⠹⢿⣿⣿⣿⣿⣾⣾⣷⣿⣿⣿⣿⡿⠋⠀⠀⠀⠀
// ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠙⠋⠛⠙⠋⠛⠙⠋⠛⠙⠋⠃⠀⠀⠀⠀⠀⠀⠀⠀⠠⠿⠻⠟⠿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⠟⠿⠟⠿⠆⠀⠸⠿⠿⠟⠯⠀⠀⠀⠸⠿⠿⠿⠏⠀⠀⠀⠀⠀⠈⠉⠻⠻⡿⣿⢿⡿⡿⠿⠛⠁⠀⠀⠀⠀⠀⠀
// allo.gitcoin.co
/// @title IRegistry Interface
/// @author @thelostone-mc <[email protected]>, @0xKurt <[email protected]>, @codenamejason <[email protected]>, @0xZakk <[email protected]>, @nfrgosselin <[email protected]>
/// @notice Interface for the Registry contract and exposes all functions needed to use the Registry
/// within the Allo protocol.
/// @dev The Registry Interface is used to interact with the Allo protocol and create profiles
/// that can be used to interact with the Allo protocol. The Registry is the main contract
/// that all other contracts interact with to get the 'Profile' information needed to
/// interact with the Allo protocol. The Registry is also used to create new profiles
/// and update existing profiles. The Registry is also used to add and remove members
/// from a profile. The Registry will not always be used in a strategy and will depend on
/// the strategy being used.
interface IRegistry {
/// ======================
/// ======= Structs ======
/// ======================
/// @dev The Profile struct that all profiles are based from
struct Profile {
bytes32 id;
uint256 nonce;
string name;
Metadata metadata;
address owner;
address anchor;
}
/// ======================
/// ======= Events =======
/// ======================
/// @dev Emitted when a profile is created. This will return your anchor address.
event ProfileCreated(
bytes32 indexed profileId, uint256 nonce, string name, Metadata metadata, address owner, address anchor
);
/// @dev Emitted when a profile name is updated. This will update the anchor when the name is updated and return it.
event ProfileNameUpdated(bytes32 indexed profileId, string name, address anchor);
/// @dev Emitted when a profile's metadata is updated.
event ProfileMetadataUpdated(bytes32 indexed profileId, Metadata metadata);
/// @dev Emitted when a profile owner is updated.
event ProfileOwnerUpdated(bytes32 indexed profileId, address owner);
/// @dev Emitted when a profile pending owner is updated.
event ProfilePendingOwnerUpdated(bytes32 indexed profileId, address pendingOwner);
/// =========================
/// ==== View Functions =====
/// =========================
/// @dev Returns the 'Profile' for a '_profileId' passed
/// @param _profileId The 'profileId' to return the 'Profile' for
/// @return profile The 'Profile' for the '_profileId' passed
function getProfileById(bytes32 _profileId) external view returns (Profile memory profile);
/// @dev Returns the 'Profile' for an '_anchor' passed
/// @param _anchor The 'anchor' to return the 'Profile' for
/// @return profile The 'Profile' for the '_anchor' passed
function getProfileByAnchor(address _anchor) external view returns (Profile memory profile);
/// @dev Returns a boolean if the '_account' is a member or owner of the '_profileId' passed in
/// @param _profileId The 'profileId' to check if the '_account' is a member or owner of
/// @param _account The 'account' to check if they are a member or owner of the '_profileId' passed in
/// @return isOwnerOrMemberOfProfile A boolean if the '_account' is a member or owner of the '_profileId' passed in
function isOwnerOrMemberOfProfile(bytes32 _profileId, address _account)
external
view
returns (bool isOwnerOrMemberOfProfile);
/// @dev Returns a boolean if the '_account' is an owner of the '_profileId' passed in
/// @param _profileId The 'profileId' to check if the '_account' is an owner of
/// @param _owner The 'owner' to check if they are an owner of the '_profileId' passed in
/// @return isOwnerOfProfile A boolean if the '_account' is an owner of the '_profileId' passed in
function isOwnerOfProfile(bytes32 _profileId, address _owner) external view returns (bool isOwnerOfProfile);
/// @dev Returns a boolean if the '_account' is a member of the '_profileId' passed in
/// @param _profileId The 'profileId' to check if the '_account' is a member of
/// @param _member The 'member' to check if they are a member of the '_profileId' passed in
/// @return isMemberOfProfile A boolean if the '_account' is a member of the '_profileId' passed in
function isMemberOfProfile(bytes32 _profileId, address _member) external view returns (bool isMemberOfProfile);
/// ====================================
/// ==== External/Public Functions =====
/// ====================================
/// @dev Creates a new 'Profile' and returns the 'profileId' of the new profile
///
/// Note: The 'name' and 'nonce' are used to generate the 'anchor' address
///
/// Requirements: None, anyone can create a new profile
///
/// @param _nonce The nonce to use to generate the 'anchor' address
/// @param _name The name to use to generate the 'anchor' address
/// @param _metadata The 'Metadata' to use to generate the 'anchor' address
/// @param _owner The 'owner' to use to generate the 'anchor' address
/// @param _members The 'members' to use to generate the 'anchor' address
/// @return profileId The 'profileId' of the new profile
function createProfile(
uint256 _nonce,
string memory _name,
Metadata memory _metadata,
address _owner,
address[] memory _members
) external returns (bytes32 profileId);
/// @dev Updates the 'name' of the '_profileId' passed in and returns the new 'anchor' address
///
/// Requirements: Only the 'Profile' owner can update the name
///
/// Note: The 'name' and 'nonce' are used to generate the 'anchor' address and this will update the 'anchor'
/// so please use caution. You can always recreate your 'anchor' address by updating the name back
/// to the original name used to create the profile.
///
/// @param _profileId The 'profileId' to update the name for
/// @param _name The new 'name' value
/// @return anchor The new 'anchor' address
function updateProfileName(bytes32 _profileId, string memory _name) external returns (address anchor);
/// @dev Updates the 'Metadata' of the '_profileId' passed in
///
/// Requirements: Only the 'Profile' owner can update the metadata
///
/// @param _profileId The 'profileId' to update the metadata for
/// @param _metadata The new 'Metadata' value
function updateProfileMetadata(bytes32 _profileId, Metadata memory _metadata) external;
/// @dev Updates the pending 'owner' of the '_profileId' passed in
///
/// Requirements: Only the 'Profile' owner can update the pending owner
///
/// @param _profileId The 'profileId' to update the pending owner for
/// @param _pendingOwner The new pending 'owner' value
function updateProfilePendingOwner(bytes32 _profileId, address _pendingOwner) external;
/// @dev Accepts the pending 'owner' of the '_profileId' passed in
///
/// Requirements: Only the pending owner can accept the ownership
///
/// @param _profileId The 'profileId' to accept the ownership for
function acceptProfileOwnership(bytes32 _profileId) external;
/// @dev Adds members to the '_profileId' passed in
///
/// Requirements: Only the 'Profile' owner can add members
///
/// @param _profileId The 'profileId' to add members to
/// @param _members The members to add to the '_profileId' passed in
function addMembers(bytes32 _profileId, address[] memory _members) external;
/// @dev Removes members from the '_profileId' passed in
///
/// Requirements: Only the 'Profile' owner can remove members
///
/// @param _profileId The 'profileId' to remove members from
/// @param _members The members to remove from the '_profileId' passed in
function removeMembers(bytes32 _profileId, address[] memory _members) external;
/// @dev Recovers funds from the contract
///
/// Requirements: Must be the Allo owner
///
/// @param _token The token you want to use to recover funds
/// @param _recipient The recipient of the recovered funds
function recoverFunds(address _token, address _recipient) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {ISchemaResolver} from "./resolver/ISchemaResolver.sol";
/// @notice A struct representing a record for a submitted schema.
struct SchemaRecord {
bytes32 uid; // The unique identifier of the schema.
ISchemaResolver resolver; // Optional schema resolver.
bool revocable; // Whether the schema allows revocations explicitly.
string schema; // Custom specification of the schema (e.g., an ABI).
}
/// @title ISchemaRegistry
/// @notice The global schema registry interface.
interface ISchemaRegistry {
/// @notice Emitted when a new schema has been registered
/// @param uid The schema UID.
/// @param registerer The address of the account used to register the schema.
event Registered(bytes32 indexed uid, address registerer);
/// @notice Submits and reserves a new schema
/// @param schema The schema data schema.
/// @param resolver An optional schema resolver.
/// @param revocable Whether the schema allows revocations explicitly.
/// @return The UID of the new schema.
function register(
string calldata schema,
ISchemaResolver resolver,
bool revocable
) external returns (bytes32);
/// @notice Returns an existing schema by UID
/// @param uid The UID of the schema to retrieve.
/// @return The schema data members.
function getSchema(bytes32 uid) external view returns (SchemaRecord memory);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;
import {IEIP712} from "./IEIP712.sol";
/// @title SignatureTransfer
/// @notice Handles ERC20 token transfers through signature based actions
/// @dev Requires user's token approval on the Permit2 contract
interface ISignatureTransfer is IEIP712 {
/// @notice Thrown when the requested amount for a transfer is larger than the permissioned amount
/// @param maxAmount The maximum amount a spender can request to transfer
error InvalidAmount(uint256 maxAmount);
/// @notice Thrown when the number of tokens permissioned to a spender does not match the number of tokens being transferred
/// @dev If the spender does not need to transfer the number of tokens permitted, the spender can request amount 0 to be transferred
error LengthMismatch();
/// @notice Emits an event when the owner successfully invalidates an unordered nonce.
event UnorderedNonceInvalidation(address indexed owner, uint256 word, uint256 mask);
/// @notice The token and amount details for a transfer signed in the permit transfer signature
struct TokenPermissions {
// ERC20 token address
address token;
// the maximum amount that can be spent
uint256 amount;
}
/// @notice The signed permit message for a single token transfer
struct PermitTransferFrom {
TokenPermissions permitted;
// a unique value for every token owner's signature to prevent signature replays
uint256 nonce;
// deadline on the permit signature
uint256 deadline;
}
/// @notice Specifies the recipient address and amount for batched transfers.
/// @dev Recipients and amounts correspond to the index of the signed token permissions array.
/// @dev Reverts if the requested amount is greater than the permitted signed amount.
struct SignatureTransferDetails {
// recipient address
address to;
// spender requested amount
uint256 requestedAmount;
}
/// @notice Used to reconstruct the signed permit message for multiple token transfers
/// @dev Do not need to pass in spender address as it is required that it is msg.sender
/// @dev Note that a user still signs over a spender address
struct PermitBatchTransferFrom {
// the tokens and corresponding amounts permitted for a transfer
TokenPermissions[] permitted;
// a unique value for every token owner's signature to prevent signature replays
uint256 nonce;
// deadline on the permit signature
uint256 deadline;
}
/// @notice A map from token owner address and a caller specified word index to a bitmap. Used to set bits in the bitmap to prevent against signature replay protection
/// @dev Uses unordered nonces so that permit messages do not need to be spent in a certain order
/// @dev The mapping is indexed first by the token owner, then by an index specified in the nonce
/// @dev It returns a uint256 bitmap
/// @dev The index, or wordPosition is capped at type(uint248).max
function nonceBitmap(address, uint256) external view returns (uint256);
/// @notice Transfers a token using a signed permit message
/// @dev Reverts if the requested amount is greater than the permitted signed amount
/// @param permit The permit data signed over by the owner
/// @param owner The owner of the tokens to transfer
/// @param transferDetails The spender's requested transfer details for the permitted token
/// @param signature The signature to verify
function permitTransferFrom(
PermitTransferFrom memory permit,
SignatureTransferDetails calldata transferDetails,
address owner,
bytes calldata signature
) external;
/// @notice Transfers a token using a signed permit message
/// @notice Includes extra data provided by the caller to verify signature over
/// @dev The witness type string must follow EIP712 ordering of nested structs and must include the TokenPermissions type definition
/// @dev Reverts if the requested amount is greater than the permitted signed amount
/// @param permit The permit data signed over by the owner
/// @param owner The owner of the tokens to transfer
/// @param transferDetails The spender's requested transfer details for the permitted token
/// @param witness Extra data to include when checking the user signature
/// @param witnessTypeString The EIP-712 type definition for remaining string stub of the typehash
/// @param signature The signature to verify
function permitWitnessTransferFrom(
PermitTransferFrom memory permit,
SignatureTransferDetails calldata transferDetails,
address owner,
bytes32 witness,
string calldata witnessTypeString,
bytes calldata signature
) external;
/// @notice Transfers multiple tokens using a signed permit message
/// @param permit The permit data signed over by the owner
/// @param owner The owner of the tokens to transfer
/// @param transferDetails Specifies the recipient and requested amount for the token transfer
/// @param signature The signature to verify
function permitTransferFrom(
PermitBatchTransferFrom memory permit,
SignatureTransferDetails[] calldata transferDetails,
address owner,
bytes calldata signature
) external;
/// @notice Transfers multiple tokens using a signed permit message
/// @dev The witness type string must follow EIP712 ordering of nested structs and must include the TokenPermissions type definition
/// @notice Includes extra data provided by the caller to verify signature over
/// @param permit The permit data signed over by the owner
/// @param owner The owner of the tokens to transfer
/// @param transferDetails Specifies the recipient and requested amount for the token transfer
/// @param witness Extra data to include when checking the user signature
/// @param witnessTypeString The EIP-712 type definition for remaining string stub of the typehash
/// @param signature The signature to verify
function permitWitnessTransferFrom(
PermitBatchTransferFrom memory permit,
SignatureTransferDetails[] calldata transferDetails,
address owner,
bytes32 witness,
string calldata witnessTypeString,
bytes calldata signature
) external;
/// @notice Invalidates the bits specified in mask for the bitmap at the word position
/// @dev The wordPos is maxed at type(uint248).max
/// @param wordPos A number to index the nonceBitmap at
/// @param mask A bitmap masked against msg.sender's current bitmap at the word position
function invalidateUnorderedNonces(uint256 wordPos, uint256 mask) external;
}// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;
// Contains structs and functions used by SpokePool contracts to facilitate universal settlement.
interface V3SpokePoolInterface {
/**************************************
* FUNCTIONS *
**************************************/
function depositV3(
address depositor,
address recipient,
address inputToken,
address outputToken,
uint256 inputAmount,
uint256 outputAmount,
uint256 destinationChainId,
address exclusiveRelayer,
uint32 quoteTimestamp,
uint32 fillDeadline,
uint32 exclusivityDeadline,
bytes calldata message
) external payable;
}// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity ^0.8.19;
// Interfaces
import {IAllo} from "./IAllo.sol";
// ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
// ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
// ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⢿⣿⣿⣿⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
// ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⣿⣿⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⡟⠘⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
// ⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⣿⣿⣾⠻⣿⣿⣿⣿⣿⣿⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⡿⠀⠀⠸⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⠀⠀⠀⢀⣠⣴⣴⣶⣶⣶⣦⣦⣀⡀⠀⠀⠀⠀⠀⠀
// ⠀⠀⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⡿⠃⠀⠙⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣿⠁⠀⠀⠀⢻⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⡀⠀⠀⠀⠀
// ⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⡿⠁⠀⠀⠀⠘⣿⣿⣿⣿⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⠃⠀⠀⠀⠀⠈⢿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⣰⣿⣿⣿⡿⠋⠁⠀⠀⠈⠘⠹⣿⣿⣿⣿⣆⠀⠀⠀
// ⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⡿⠀⠀⠀⠀⠀⠀⠈⢿⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣾⣿⣿⣿⠏⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⢰⣿⣿⣿⣿⠁⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⡀⠀⠀
// ⠀⠀⠀⢠⣿⣿⣿⣿⣿⣿⣿⣟⠀⡀⢀⠀⡀⢀⠀⡀⢈⢿⡟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⡇⠀⠀
// ⠀⠀⣠⣿⣿⣿⣿⣿⣿⡿⠋⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣶⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⡿⢿⠿⠿⠿⠿⠿⠿⠿⠿⠿⢿⣿⣿⣿⣷⡀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠸⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣿⠂⠀⠀
// ⠀⠀⠙⠛⠿⠻⠻⠛⠉⠀⠀⠈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⣿⣿⣿⣧⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⢻⣿⣿⣿⣷⣀⢀⠀⠀⠀⡀⣰⣾⣿⣿⣿⠏⠀⠀⠀
// ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠛⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⢰⣿⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⣧⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⠀⠹⢿⣿⣿⣿⣿⣾⣾⣷⣿⣿⣿⣿⡿⠋⠀⠀⠀⠀
// ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠙⠋⠛⠙⠋⠛⠙⠋⠛⠙⠋⠃⠀⠀⠀⠀⠀⠀⠀⠀⠠⠿⠻⠟⠿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⠟⠿⠟⠿⠆⠀⠸⠿⠿⠟⠯⠀⠀⠀⠸⠿⠿⠿⠏⠀⠀⠀⠀⠀⠈⠉⠻⠻⡿⣿⢿⡿⡿⠿⠛⠁⠀⠀⠀⠀⠀⠀
// allo.gitcoin.co
/// @title IStrategy Interface
/// @author @thelostone-mc <[email protected]>, @0xKurt <[email protected]>, @codenamejason <[email protected]>, @0xZakk <[email protected]>, @nfrgosselin <[email protected]> @0xZakk <[email protected]>, @nfrgosselin <[email protected]>
/// @notice BaseStrategy is the base contract that all strategies should inherit from and uses this interface.
interface IStrategy {
/// ======================
/// ======= Storage ======
/// ======================
/// @notice The Status enum that all recipients are based from
enum Status {
None,
Pending,
Accepted,
Rejected,
Appealed,
InReview,
Canceled
}
/// @notice Payout summary struct to hold the payout data
struct PayoutSummary {
address recipientAddress;
uint256 amount;
}
/// ======================
/// ======= Events =======
/// ======================
/// @notice Emitted when strategy is initialized.
/// @param poolId The ID of the pool
/// @param data The data passed to the 'initialize' function
event Initialized(uint256 poolId, bytes data);
/// @notice Emitted when a recipient is registered.
/// @param recipientId The ID of the recipient
/// @param data The data passed to the 'registerRecipient' function
/// @param sender The sender
event Registered(address indexed recipientId, bytes data, address sender);
/// @notice Emitted when a recipient is allocated to.
/// @param recipientId The ID of the recipient
/// @param amount The amount allocated
/// @param token The token allocated
event Allocated(address indexed recipientId, uint256 amount, address token, address sender);
/// @notice Emitted when tokens are distributed.
/// @param recipientId The ID of the recipient
/// @param recipientAddress The recipient
/// @param amount The amount distributed
/// @param sender The sender
event Distributed(address indexed recipientId, address recipientAddress, uint256 amount, address sender);
/// @notice Emitted when pool is set to active status.
/// @param active The status of the pool
event PoolActive(bool active);
/// ======================
/// ======= Views ========
/// ======================
/// @notice Getter for the address of the Allo contract.
/// @return The 'Allo' contract
function getAllo() external view returns (IAllo);
/// @notice Getter for the 'poolId' for this strategy.
/// @return The ID of the pool
function getPoolId() external view returns (uint256);
/// @notice Getter for the 'id' of the strategy.
/// @return The ID of the strategy
function getStrategyId() external view returns (bytes32);
/// @notice Checks whether a allocator is valid or not, will usually be true for all strategies
/// and will depend on the strategy implementation.
/// @param _allocator The allocator to check
/// @return Whether the allocator is valid or not
function isValidAllocator(address _allocator) external view returns (bool);
/// @notice whether pool is active.
/// @return Whether the pool is active or not
function isPoolActive() external returns (bool);
/// @notice Checks the amount of tokens in the pool.
/// @return The balance of the pool
function getPoolAmount() external view returns (uint256);
/// @notice Increases the balance of the pool.
/// @param _amount The amount to increase the pool by
function increasePoolAmount(uint256 _amount) external;
/// @notice Checks the status of a recipient probably tracked in a mapping, but will depend on the implementation
/// for example, the OpenSelfRegistration only maps users to bool, and then assumes Accepted for those
/// since there is no need for Pending or Rejected.
/// @param _recipientId The ID of the recipient
/// @return The status of the recipient
function getRecipientStatus(address _recipientId) external view returns (Status);
/// @notice Checks the amount allocated to a recipient for distribution.
/// @dev Input the values you would send to distribute(), get the amounts each recipient in the array would receive.
/// The encoded '_data' will be determined by the strategy, and will be used to determine the payout.
/// @param _recipientIds The IDs of the recipients
/// @param _data The encoded data
function getPayouts(address[] memory _recipientIds, bytes[] memory _data)
external
view
returns (PayoutSummary[] memory);
/// ======================
/// ===== Functions ======
/// ======================
/// @notice
/// @dev The default BaseStrategy version will not use the data if a strategy wants to use it, they will overwrite it,
/// use it, and then call super.initialize().
/// @param _poolId The ID of the pool
/// @param _data The encoded data
function initialize(uint256 _poolId, bytes memory _data) external;
/// @notice This will register a recipient, set their status (and any other strategy specific values), and
/// return the ID of the recipient.
/// @dev Able to change status all the way up to 'Accepted', or to 'Pending' and if there are more steps, additional
/// functions should be added to allow the owner to check this. The owner could also check attestations directly
/// and then accept for instance. The '_data' will be determined by the strategy implementation.
/// @param _data The data to use to register the recipient
/// @param _sender The address of the sender
/// @return The ID of the recipient
function registerRecipient(bytes memory _data, address _sender) external payable returns (address);
/// @notice This will allocate to a recipient.
/// @dev The encoded '_data' will be determined by the strategy implementation.
/// @param _data The data to use to allocate to the recipient
/// @param _sender The address of the sender
function allocate(bytes memory _data, address _sender) external payable;
/// @notice This will distribute funds (tokens) to recipients.
/// @dev most strategies will track a TOTAL amount per recipient, and a PAID amount, and pay the difference
/// this contract will need to track the amount paid already, so that it doesn't double pay.
function distribute(address[] memory _recipientIds, bytes memory _data, address _sender) external;
}// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;
/**
* @notice Interface for the WETH9 contract.
*/
interface WETH9Interface {
/**
* @notice Burn Wrapped Ether and receive native Ether.
* @param wad Amount of WETH to unwrap and send to caller.
*/
function withdraw(uint256 wad) external;
/**
* @notice Lock native Ether and mint Wrapped Ether ERC20
* @dev msg.value is amount of Wrapped Ether to mint/Ether to lock.
*/
function deposit() external payable;
/**
* @notice Get balance of WETH held by `guy`.
* @param guy Address to get balance of.
* @return wad Amount of WETH held by `guy`.
*/
function balanceOf(address guy) external view returns (uint256 wad);
/**
* @notice Transfer `wad` of WETH from caller to `guy`.
* @param guy Address to send WETH to.
* @param wad Amount of WETH to send.
* @return ok True if transfer succeeded.
*/
function transfer(address guy, uint256 wad) external returns (bool);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {Attestation} from "../../libs/Common.sol";
/// @title ISchemaResolver
/// @notice The interface of an optional schema resolver.
interface ISchemaResolver {
/// @notice Returns whether the resolver supports ETH transfers.
function isPayable() external pure returns (bool);
/// @notice Processes an attestation and verifies whether it's valid.
/// @param attestation The new attestation.
/// @return Whether the attestation is valid.
function attest(
Attestation calldata attestation
) external payable returns (bool);
/// @notice Processes multiple attestations and verifies whether they are valid.
/// @param attestations The new attestations.
/// @param values Explicit ETH amounts which were sent with each attestation.
/// @return Whether all the attestations are valid.
function multiAttest(
Attestation[] calldata attestations,
uint256[] calldata values
) external payable returns (bool);
/// @notice Processes an attestation revocation and verifies if it can be revoked.
/// @param attestation The existing attestation to be revoked.
/// @return Whether the attestation can be revoked.
function revoke(
Attestation calldata attestation
) external payable returns (bool);
/// @notice Processes revocation of multiple attestation and verifies they can be revoked.
/// @param attestations The existing attestations to be revoked.
/// @param values Explicit ETH amounts which were sent with each revocation.
/// @return Whether the attestations can be revoked.
function multiRevoke(
Attestation[] calldata attestations,
uint256[] calldata values
) external payable returns (bool);
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
import {IEAS, AttestationRequest, AttestationRequestData} from "../interfaces/IEAS.sol";
import {NO_EXPIRATION_TIME, EMPTY_UID} from "./Common.sol";
/**
* @title PublicGoodAttester
*/
contract PublicGoodAttester {
error InvalidEAS();
// The address of the global EAS contract.
IEAS private EAS;
bytes32 public EAS_SCHEMA;
constructor(address eas, bytes32 easSchema) {
if (eas != address(0)) {
_initializeEAS(eas, easSchema);
}
}
function _initializeEAS(address eas, bytes32 easSchema) internal {
if (eas == address(0)) {
revert InvalidEAS();
}
EAS = IEAS(eas);
EAS_SCHEMA = easSchema;
}
function _attestDonor(
address _donor,
address _recipientId,
uint256 _round,
address _tokenSent,
uint256 _amount,
address _relayer
) internal {
if (address(EAS) == address(0)) return;
EAS.attest(
AttestationRequest({
schema: EAS_SCHEMA,
data: AttestationRequestData({
recipient: _donor,
expirationTime: NO_EXPIRATION_TIME,
revocable: false,
refUID: EMPTY_UID,
data: abi.encode(
_donor,
_recipientId,
_round,
_tokenSent,
_amount,
_relayer
),
value: 0
})
})
);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
// A representation of an empty/uninitialized UID.
bytes32 constant EMPTY_UID = 0;
// A zero expiration represents an non-expiring attestation.
uint64 constant NO_EXPIRATION_TIME = 0;
/// @notice A struct representing EIP712 signature data.
struct EIP712Signature {
uint8 v; // The recovery ID.
bytes32 r; // The x-coordinate of the nonce R.
bytes32 s; // The signature data.
}
/// @notice A struct representing a single attestation.
struct Attestation {
bytes32 uid; // A unique identifier of the attestation.
bytes32 schema; // The unique identifier of the schema.
uint64 time; // The time when the attestation was created (Unix timestamp).
uint64 expirationTime; // The time when the attestation expires (Unix timestamp).
uint64 revocationTime; // The time when the attestation was revoked (Unix timestamp).
bytes32 refUID; // The UID of the related attestation.
address recipient; // The recipient of the attestation.
address attester; // The attester/sender of the attestation.
bool revocable; // Whether the attestation is revocable.
bytes data; // Custom attestation data.
}// SPDX-License-Identifier: AGPL-3.0-only pragma solidity 0.8.19; // ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ // ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ // ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⢿⣿⣿⣿⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ // ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⣿⣿⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⡟⠘⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ // ⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⣿⣿⣾⠻⣿⣿⣿⣿⣿⣿⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⡿⠀⠀⠸⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⠀⠀⠀⢀⣠⣴⣴⣶⣶⣶⣦⣦⣀⡀⠀⠀⠀⠀⠀⠀ // ⠀⠀⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⡿⠃⠀⠙⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣿⠁⠀⠀⠀⢻⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⡀⠀⠀⠀⠀ // ⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⡿⠁⠀⠀⠀⠘⣿⣿⣿⣿⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⠃⠀⠀⠀⠀⠈⢿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⣰⣿⣿⣿⡿⠋⠁⠀⠀⠈⠘⠹⣿⣿⣿⣿⣆⠀⠀⠀ // ⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⡿⠀⠀⠀⠀⠀⠀⠈⢿⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣾⣿⣿⣿⠏⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⢰⣿⣿⣿⣿⠁⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⡀⠀⠀ // ⠀⠀⠀⢠⣿⣿⣿⣿⣿⣿⣿⣟⠀⡀⢀⠀⡀⢀⠀⡀⢈⢿⡟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⡇⠀⠀ // ⠀⠀⣠⣿⣿⣿⣿⣿⣿⡿⠋⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣶⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⡿⢿⠿⠿⠿⠿⠿⠿⠿⠿⠿⢿⣿⣿⣿⣷⡀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠸⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣿⠂⠀⠀ // ⠀⠀⠙⠛⠿⠻⠻⠛⠉⠀⠀⠈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⣿⣿⣿⣧⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⢻⣿⣿⣿⣷⣀⢀⠀⠀⠀⡀⣰⣾⣿⣿⣿⠏⠀⠀⠀ // ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠛⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⢰⣿⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⣧⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⠀⠹⢿⣿⣿⣿⣿⣾⣾⣷⣿⣿⣿⣿⡿⠋⠀⠀⠀⠀ // ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠙⠋⠛⠙⠋⠛⠙⠋⠛⠙⠋⠃⠀⠀⠀⠀⠀⠀⠀⠀⠠⠿⠻⠟⠿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⠟⠿⠟⠿⠆⠀⠸⠿⠿⠟⠯⠀⠀⠀⠸⠿⠿⠿⠏⠀⠀⠀⠀⠀⠈⠉⠻⠻⡿⣿⢿⡿⡿⠿⠛⠁⠀⠀⠀⠀⠀⠀ // allo.gitcoin.co /// @title Metadata /// @author @thelostone-mc <[email protected]>, @0xKurt <[email protected]>, @codenamejason <[email protected]>, @0xZakk <[email protected]>, @nfrgosselin <[email protected]> /// @notice Metadata is used to define the metadata for the protocol that is used throughout the system. struct Metadata { /// @notice Protocol ID corresponding to a specific protocol (currently using IPFS = 1) uint256 protocol; /// @notice Pointer (hash) to fetch metadata for the specified protocol string pointer; }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity 0.8.19; // ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ // ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣿⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ // ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⢿⣿⣿⣿⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ // ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⣿⣿⣿⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⡟⠘⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ // ⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⣾⣿⣿⣿⣿⣾⠻⣿⣿⣿⣿⣿⣿⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⡿⠀⠀⠸⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⠀⠀⠀⢀⣠⣴⣴⣶⣶⣶⣦⣦⣀⡀⠀⠀⠀⠀⠀⠀ // ⠀⠀⠀⠀⠀⠀⠀⣴⣿⣿⣿⣿⣿⣿⡿⠃⠀⠙⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣿⠁⠀⠀⠀⢻⣿⣿⣿⣧⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⡀⠀⠀⠀⠀ // ⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⡿⠁⠀⠀⠀⠘⣿⣿⣿⣿⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⠃⠀⠀⠀⠀⠈⢿⣿⣿⣿⣆⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⣰⣿⣿⣿⡿⠋⠁⠀⠀⠈⠘⠹⣿⣿⣿⣿⣆⠀⠀⠀ // ⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⡿⠀⠀⠀⠀⠀⠀⠈⢿⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣾⣿⣿⣿⠏⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⢰⣿⣿⣿⣿⠁⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⡀⠀⠀ // ⠀⠀⠀⢠⣿⣿⣿⣿⣿⣿⣿⣟⠀⡀⢀⠀⡀⢀⠀⡀⢈⢿⡟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⡇⠀⠀ // ⠀⠀⣠⣿⣿⣿⣿⣿⣿⡿⠋⢻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣶⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⣿⣿⡿⢿⠿⠿⠿⠿⠿⠿⠿⠿⠿⢿⣿⣿⣿⣷⡀⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠸⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠀⠀⢠⣿⣿⣿⣿⠂⠀⠀ // ⠀⠀⠙⠛⠿⠻⠻⠛⠉⠀⠀⠈⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢿⣿⣿⣿⣧⠀⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⢻⣿⣿⣿⣷⣀⢀⠀⠀⠀⡀⣰⣾⣿⣿⣿⠏⠀⠀⠀ // ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠛⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⢰⣿⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⣧⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⠀⠹⢿⣿⣿⣿⣿⣾⣾⣷⣿⣿⣿⣿⡿⠋⠀⠀⠀⠀ // ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠙⠋⠛⠙⠋⠛⠙⠋⠛⠙⠋⠃⠀⠀⠀⠀⠀⠀⠀⠀⠠⠿⠻⠟⠿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⠟⠿⠟⠿⠆⠀⠸⠿⠿⠟⠯⠀⠀⠀⠸⠿⠿⠿⠏⠀⠀⠀⠀⠀⠈⠉⠻⠻⡿⣿⢿⡿⡿⠿⠛⠁⠀⠀⠀⠀⠀⠀ // allo.gitcoin.co /// @title Native token information /// @author @thelostone-mc <[email protected]>, @0xKurt <[email protected]>, @codenamejason <[email protected]>, @0xZakk <[email protected]>, @nfrgosselin <[email protected]> /// @notice This is used to define the address of the native token for the protocol contract Native { /// @notice Address of the native token address public constant NATIVE = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; }
{
"optimizer": {
"enabled": true,
"runs": 400
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_eas","type":"address"},{"internalType":"bytes32","name":"_easSchema","type":"bytes32"},{"internalType":"address","name":"_acrossSpokePool","type":"address"},{"internalType":"address","name":"_allo","type":"address"},{"internalType":"address","name":"_wethAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InsufficientFunds","type":"error"},{"inputs":[],"name":"InvalidEAS","type":"error"},{"inputs":[],"name":"NoRoundOnDestination","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes","name":"","type":"bytes"}],"name":"Logger","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"ALLO_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"EAS_SCHEMA","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NATIVE","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SPOKE_POOL","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETH_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"inputToken","type":"address"},{"internalType":"address","name":"outputToken","type":"address"},{"internalType":"uint256","name":"inputAmount","type":"uint256"},{"internalType":"uint256","name":"outputAmount","type":"uint256"},{"internalType":"uint256","name":"destinationChainId","type":"uint256"},{"internalType":"address","name":"exclusiveRelayer","type":"address"},{"internalType":"uint32","name":"quoteTimestamp","type":"uint32"},{"internalType":"uint32","name":"fillDeadline","type":"uint32"},{"internalType":"uint32","name":"exclusivityDeadline","type":"uint32"}],"internalType":"struct DonationWrapper.DepositParams","name":"params","type":"tuple"},{"internalType":"bytes","name":"message","type":"bytes"}],"name":"callDepositV3","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_messageHash","type":"bytes32"}],"name":"getEthSignedMessageHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes","name":"_message","type":"bytes"}],"name":"getMessageHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"tokenSent","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"address","name":"relayer","type":"address"},{"internalType":"bytes","name":"message","type":"bytes"}],"name":"handleV3AcrossMessage","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"permit2","outputs":[{"internalType":"contract ISignatureTransfer","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_ethSignedMessageHash","type":"bytes32"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"recoverSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"sig","type":"bytes"}],"name":"splitSignature","outputs":[{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"unwrapWETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"},{"internalType":"bytes","name":"_message","type":"bytes"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"verify","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes","name":"donationData","type":"bytes"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"verifyDonation","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
60806040523480156200001157600080fd5b506040516200172f3803806200172f833981016040819052620000349162000186565b84846200004133620000cb565b600180556001600160a01b0382161562000061576200006182826200011b565b5050600480546001600160a01b039485166001600160a01b0319918216811790925560068054938616938216841790556005805494909516938116841790945560078054851690911790556008805484169092179091556009805490921617905550620001ed9050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03821662000143576040516341bc07ff60e11b815260040160405180910390fd5b600280546001600160a01b0319166001600160a01b039390931692909217909155600355565b80516001600160a01b03811681146200018157600080fd5b919050565b600080600080600060a086880312156200019f57600080fd5b620001aa8662000169565b945060208601519350620001c16040870162000169565b9250620001d16060870162000169565b9150620001e16080870162000169565b90509295509295909350565b61153280620001fd6000396000f3fe6080604052600436106101185760003560e01c8063715018a6116100a0578063a7bb580311610064578063a7bb5803146102ed578063e641b3b31461032b578063f018a8c11461034b578063f2fde38b1461036b578063fa5408011461038b57600080fd5b8063715018a6146102525780638021fef7146102675780638da5cb5b1461028757806397aba7f9146102a5578063a0cf0aea146102c557600080fd5b80633a5be8cb116100e75780633a5be8cb146101c55780633ccfd60b146101da5780634736f442146101ef5780635ade66331461021f5780636fde47311461023f57600080fd5b8063040141e5146101245780630a1028c41461016157806312261ee71461018f57806325705f8b146101af57600080fd5b3661011f57005b600080fd5b34801561013057600080fd5b50600654610144906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561016d57600080fd5b5061018161017c366004610e52565b6103ab565b604051908152602001610158565b34801561019b57600080fd5b50600a54610144906001600160a01b031681565b3480156101bb57600080fd5b5061018160035481565b6101d86101d3366004610eac565b6103db565b005b3480156101e657600080fd5b506101d86104ba565b3480156101fb57600080fd5b5061020f61020a366004610f18565b6105af565b6040519015158152602001610158565b34801561022b57600080fd5b5061020f61023a366004610f7c565b6105dd565b6101d861024d366004611006565b610620565b34801561025e57600080fd5b506101d8610700565b34801561027357600080fd5b50600454610144906001600160a01b031681565b34801561029357600080fd5b506000546001600160a01b0316610144565b3480156102b157600080fd5b506101446102c03660046110ed565b610766565b3480156102d157600080fd5b5061014473eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81565b3480156102f957600080fd5b5061030d610308366004610e52565b6107e5565b60408051938452602084019290925260ff1690820152606001610158565b34801561033757600080fd5b50600554610144906001600160a01b031681565b34801561035757600080fd5b506101d861036636600461111e565b610859565b34801561037757600080fd5b506101d8610386366004611137565b6108ba565b34801561039757600080fd5b506101816103a636600461111e565b610982565b6000816040516020016103be919061117f565b604051602081830303815290604052805190602001209050919050565b6002600154036104325760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b60026001556004546001600160a01b03163314610461576040516282b42960e81b815260040160405180910390fd5b6000808280602001905181019061047891906111e0565b9150915061048682826105af565b6104a2576040516282b42960e81b815260040160405180910390fd5b6104ae828688876109bd565b50506001805550505050565b6000546001600160a01b031633146105145760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610429565b604051600090339047908381818185875af1925050503d8060008114610556576040519150601f19603f3d011682016040523d82523d6000602084013e61055b565b606091505b50509050806105ac5760405162461bcd60e51b815260206004820152601360248201527f4661696c656420746f2077697468647261772e000000000000000000000000006044820152606401610429565b50565b600080838060200190518101906105c6919061123a565b509150506105d58185856105dd565b949350505050565b6000806105e9846103ab565b905060006105f682610982565b9050856001600160a01b031661060c8286610766565b6001600160a01b0316149695505050505050565b6002600154036106725760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610429565b60026001819055506000808280602001905181019061069191906111e0565b915091506000828060200190518101906106ab919061123a565b509150506106b983836105af565b15806106ce5750336001600160a01b03821614155b156106eb576040516282b42960e81b815260040160405180910390fd5b6106f58585610a62565b505060018055505050565b6000546001600160a01b0316331461075a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610429565b6107646000610b1a565b565b600080600080610775856107e5565b6040805160008152602081018083528b905260ff8316918101919091526060810184905260808101839052929550909350915060019060a0016020604051602081039080840390855afa1580156107d0573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b6000806000835160411461083b5760405162461bcd60e51b815260206004820152601860248201527f696e76616c6964207369676e6174757265206c656e67746800000000000000006044820152606401610429565b50505060208101516040820151606090920151909260009190911a90565b600954604051632e1a7d4d60e01b8152600481018390526001600160a01b0390911690632e1a7d4d90602401600060405180830381600087803b15801561089f57600080fd5b505af11580156108b3573d6000803e3d6000fd5b5050505050565b6000546001600160a01b031633146109145760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610429565b6001600160a01b0381166109795760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610429565b6105ac81610b1a565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c016103be565b6000806000868060200190518101906109d6919061123a565b925092509250600080828060200190518101906109f3919061128a565b80515160200151929450925050881015610a205760405163356680b760e01b815260040160405180910390fd5b610a2988610859565b610a438483878a856000015160000151602001518b610b77565b80515160200151610a579086908590610c89565b505050505050505050565b600760009054906101000a90046001600160a01b03166001600160a01b0316637b9392323433856000015186602001518760400151886060015189608001518a60a001518b60c001518c60e001518d61010001518e61012001518e6040518e63ffffffff1660e01b8152600401610ae49c9b9a999897969594939291906113bb565b6000604051808303818588803b158015610afd57600080fd5b505af1158015610b11573d6000803e3d6000fd5b50505050505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6002546001600160a01b031615610c81576002546040805180820182526003548152815160c080820184526001600160a01b038b81168084526000602080860182905285880182905260608087018390528851808301949094528e8516848a015283018d90528b841660808085019190915260a08085018d90528b8616858801528951808603909701875260e090940189528601949094529084015290830191909152915163f17325e760e01b8152919092169163f17325e791610c3e9190600401611446565b6020604051808303816000875af1158015610c5d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1191906114ca565b505050505050565b6008546001600160a01b0316610cb2576040516374c3698f60e11b815260040160405180910390fd5b6008546040516305d8703160e31b81526001600160a01b0390911690632ec38188908390610ce690879087906004016114e3565b6000604051808303818588803b158015610cff57600080fd5b505af1158015610d13573d6000803e3d6000fd5b5050505050505050565b634e487b7160e01b600052604160045260246000fd5b604051610140810167ffffffffffffffff81118282101715610d5757610d57610d1d565b60405290565b6040805190810167ffffffffffffffff81118282101715610d5757610d57610d1d565b6040516060810167ffffffffffffffff81118282101715610d5757610d57610d1d565b604051601f8201601f1916810167ffffffffffffffff81118282101715610dcc57610dcc610d1d565b604052919050565b600067ffffffffffffffff821115610dee57610dee610d1d565b50601f01601f191660200190565b600082601f830112610e0d57600080fd5b8135610e20610e1b82610dd4565b610da3565b818152846020838601011115610e3557600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215610e6457600080fd5b813567ffffffffffffffff811115610e7b57600080fd5b6105d584828501610dfc565b6001600160a01b03811681146105ac57600080fd5b8035610ea781610e87565b919050565b60008060008060808587031215610ec257600080fd5b8435610ecd81610e87565b9350602085013592506040850135610ee481610e87565b9150606085013567ffffffffffffffff811115610f0057600080fd5b610f0c87828801610dfc565b91505092959194509250565b60008060408385031215610f2b57600080fd5b823567ffffffffffffffff80821115610f4357600080fd5b610f4f86838701610dfc565b93506020850135915080821115610f6557600080fd5b50610f7285828601610dfc565b9150509250929050565b600080600060608486031215610f9157600080fd5b8335610f9c81610e87565b9250602084013567ffffffffffffffff80821115610fb957600080fd5b610fc587838801610dfc565b93506040860135915080821115610fdb57600080fd5b50610fe886828701610dfc565b9150509250925092565b803563ffffffff81168114610ea757600080fd5b60008082840361016081121561101b57600080fd5b6101408082121561102b57600080fd5b611033610d33565b915061103e85610e9c565b825261104c60208601610e9c565b602083015261105d60408601610e9c565b6040830152606085013560608301526080850135608083015260a085013560a083015261108c60c08601610e9c565b60c083015261109d60e08601610ff2565b60e08301526101006110b0818701610ff2565b908301526101206110c2868201610ff2565b9083015290925083013567ffffffffffffffff8111156110e157600080fd5b610f7285828601610dfc565b6000806040838503121561110057600080fd5b82359150602083013567ffffffffffffffff8111156110e157600080fd5b60006020828403121561113057600080fd5b5035919050565b60006020828403121561114957600080fd5b813561115481610e87565b9392505050565b60005b8381101561117657818101518382015260200161115e565b50506000910152565b6000825161119181846020870161115b565b9190910192915050565b600082601f8301126111ac57600080fd5b81516111ba610e1b82610dd4565b8181528460208386010111156111cf57600080fd5b6105d582602083016020870161115b565b600080604083850312156111f357600080fd5b825167ffffffffffffffff8082111561120b57600080fd5b6112178683870161119b565b9350602085015191508082111561122d57600080fd5b50610f728582860161119b565b60008060006060848603121561124f57600080fd5b83519250602084015161126181610e87565b604085015190925067ffffffffffffffff81111561127e57600080fd5b610fe88682870161119b565b60008060006060848603121561129f57600080fd5b83516112aa81610e87565b6020850151909350600481106112bf57600080fd5b604085015190925067ffffffffffffffff808211156112dd57600080fd5b9085019081870360a08112156112f257600080fd5b6112fa610d5d565b608082121561130857600080fd5b611310610d80565b604083121561131e57600080fd5b611326610d5d565b9250845161133381610e87565b8084525060208501516020840152828152604085015160208201526060850151604082015280825250608084015191508282111561137057600080fd5b61137c8983860161119b565b6020820152809450505050509250925092565b600081518084526113a781602086016020860161115b565b601f01601f19169290920160200192915050565b6001600160a01b038d811682528c811660208301528b811660408301528a81166060830152608082018a905260a0820189905260c08201889052861660e082015263ffffffff8581166101008301528481166101208301528316610140820152600061018061016083015261143461018083018461138f565b9e9d5050505050505050505050505050565b6020815281516020820152600060208301516040808401526001600160a01b03815116606084015267ffffffffffffffff60208201511660808401526040810151151560a0840152606081015160c0840152608081015160c060e08501526114b261012085018261138f565b905060a0820151610100850152809250505092915050565b6000602082840312156114dc57600080fd5b5051919050565b8281526040602082015260006105d5604083018461138f56fea26469706673582212209a7d1c3c256b8713ecea0b797fc754629692744c29144c8b5a4396be44cdc2a064736f6c63430008130033000000000000000000000000bd75f629a22dc1ced33dda0b68c546a1c035c458199429ee45da2c99fd2617ec4865749ca292009f44ee2a0a43721adef1c9c9df000000000000000000000000e35e9842fceaca96570b734083f4a58e8f7c5f2a0000000000000000000000001133ea7af70876e64665ecd07c0a0476d09465a100000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab1
Deployed Bytecode
0x6080604052600436106101185760003560e01c8063715018a6116100a0578063a7bb580311610064578063a7bb5803146102ed578063e641b3b31461032b578063f018a8c11461034b578063f2fde38b1461036b578063fa5408011461038b57600080fd5b8063715018a6146102525780638021fef7146102675780638da5cb5b1461028757806397aba7f9146102a5578063a0cf0aea146102c557600080fd5b80633a5be8cb116100e75780633a5be8cb146101c55780633ccfd60b146101da5780634736f442146101ef5780635ade66331461021f5780636fde47311461023f57600080fd5b8063040141e5146101245780630a1028c41461016157806312261ee71461018f57806325705f8b146101af57600080fd5b3661011f57005b600080fd5b34801561013057600080fd5b50600654610144906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561016d57600080fd5b5061018161017c366004610e52565b6103ab565b604051908152602001610158565b34801561019b57600080fd5b50600a54610144906001600160a01b031681565b3480156101bb57600080fd5b5061018160035481565b6101d86101d3366004610eac565b6103db565b005b3480156101e657600080fd5b506101d86104ba565b3480156101fb57600080fd5b5061020f61020a366004610f18565b6105af565b6040519015158152602001610158565b34801561022b57600080fd5b5061020f61023a366004610f7c565b6105dd565b6101d861024d366004611006565b610620565b34801561025e57600080fd5b506101d8610700565b34801561027357600080fd5b50600454610144906001600160a01b031681565b34801561029357600080fd5b506000546001600160a01b0316610144565b3480156102b157600080fd5b506101446102c03660046110ed565b610766565b3480156102d157600080fd5b5061014473eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee81565b3480156102f957600080fd5b5061030d610308366004610e52565b6107e5565b60408051938452602084019290925260ff1690820152606001610158565b34801561033757600080fd5b50600554610144906001600160a01b031681565b34801561035757600080fd5b506101d861036636600461111e565b610859565b34801561037757600080fd5b506101d8610386366004611137565b6108ba565b34801561039757600080fd5b506101816103a636600461111e565b610982565b6000816040516020016103be919061117f565b604051602081830303815290604052805190602001209050919050565b6002600154036104325760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064015b60405180910390fd5b60026001556004546001600160a01b03163314610461576040516282b42960e81b815260040160405180910390fd5b6000808280602001905181019061047891906111e0565b9150915061048682826105af565b6104a2576040516282b42960e81b815260040160405180910390fd5b6104ae828688876109bd565b50506001805550505050565b6000546001600160a01b031633146105145760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610429565b604051600090339047908381818185875af1925050503d8060008114610556576040519150601f19603f3d011682016040523d82523d6000602084013e61055b565b606091505b50509050806105ac5760405162461bcd60e51b815260206004820152601360248201527f4661696c656420746f2077697468647261772e000000000000000000000000006044820152606401610429565b50565b600080838060200190518101906105c6919061123a565b509150506105d58185856105dd565b949350505050565b6000806105e9846103ab565b905060006105f682610982565b9050856001600160a01b031661060c8286610766565b6001600160a01b0316149695505050505050565b6002600154036106725760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610429565b60026001819055506000808280602001905181019061069191906111e0565b915091506000828060200190518101906106ab919061123a565b509150506106b983836105af565b15806106ce5750336001600160a01b03821614155b156106eb576040516282b42960e81b815260040160405180910390fd5b6106f58585610a62565b505060018055505050565b6000546001600160a01b0316331461075a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610429565b6107646000610b1a565b565b600080600080610775856107e5565b6040805160008152602081018083528b905260ff8316918101919091526060810184905260808101839052929550909350915060019060a0016020604051602081039080840390855afa1580156107d0573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b6000806000835160411461083b5760405162461bcd60e51b815260206004820152601860248201527f696e76616c6964207369676e6174757265206c656e67746800000000000000006044820152606401610429565b50505060208101516040820151606090920151909260009190911a90565b600954604051632e1a7d4d60e01b8152600481018390526001600160a01b0390911690632e1a7d4d90602401600060405180830381600087803b15801561089f57600080fd5b505af11580156108b3573d6000803e3d6000fd5b5050505050565b6000546001600160a01b031633146109145760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610429565b6001600160a01b0381166109795760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610429565b6105ac81610b1a565b6040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c016103be565b6000806000868060200190518101906109d6919061123a565b925092509250600080828060200190518101906109f3919061128a565b80515160200151929450925050881015610a205760405163356680b760e01b815260040160405180910390fd5b610a2988610859565b610a438483878a856000015160000151602001518b610b77565b80515160200151610a579086908590610c89565b505050505050505050565b600760009054906101000a90046001600160a01b03166001600160a01b0316637b9392323433856000015186602001518760400151886060015189608001518a60a001518b60c001518c60e001518d61010001518e61012001518e6040518e63ffffffff1660e01b8152600401610ae49c9b9a999897969594939291906113bb565b6000604051808303818588803b158015610afd57600080fd5b505af1158015610b11573d6000803e3d6000fd5b50505050505050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6002546001600160a01b031615610c81576002546040805180820182526003548152815160c080820184526001600160a01b038b81168084526000602080860182905285880182905260608087018390528851808301949094528e8516848a015283018d90528b841660808085019190915260a08085018d90528b8616858801528951808603909701875260e090940189528601949094529084015290830191909152915163f17325e760e01b8152919092169163f17325e791610c3e9190600401611446565b6020604051808303816000875af1158015610c5d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1191906114ca565b505050505050565b6008546001600160a01b0316610cb2576040516374c3698f60e11b815260040160405180910390fd5b6008546040516305d8703160e31b81526001600160a01b0390911690632ec38188908390610ce690879087906004016114e3565b6000604051808303818588803b158015610cff57600080fd5b505af1158015610d13573d6000803e3d6000fd5b5050505050505050565b634e487b7160e01b600052604160045260246000fd5b604051610140810167ffffffffffffffff81118282101715610d5757610d57610d1d565b60405290565b6040805190810167ffffffffffffffff81118282101715610d5757610d57610d1d565b6040516060810167ffffffffffffffff81118282101715610d5757610d57610d1d565b604051601f8201601f1916810167ffffffffffffffff81118282101715610dcc57610dcc610d1d565b604052919050565b600067ffffffffffffffff821115610dee57610dee610d1d565b50601f01601f191660200190565b600082601f830112610e0d57600080fd5b8135610e20610e1b82610dd4565b610da3565b818152846020838601011115610e3557600080fd5b816020850160208301376000918101602001919091529392505050565b600060208284031215610e6457600080fd5b813567ffffffffffffffff811115610e7b57600080fd5b6105d584828501610dfc565b6001600160a01b03811681146105ac57600080fd5b8035610ea781610e87565b919050565b60008060008060808587031215610ec257600080fd5b8435610ecd81610e87565b9350602085013592506040850135610ee481610e87565b9150606085013567ffffffffffffffff811115610f0057600080fd5b610f0c87828801610dfc565b91505092959194509250565b60008060408385031215610f2b57600080fd5b823567ffffffffffffffff80821115610f4357600080fd5b610f4f86838701610dfc565b93506020850135915080821115610f6557600080fd5b50610f7285828601610dfc565b9150509250929050565b600080600060608486031215610f9157600080fd5b8335610f9c81610e87565b9250602084013567ffffffffffffffff80821115610fb957600080fd5b610fc587838801610dfc565b93506040860135915080821115610fdb57600080fd5b50610fe886828701610dfc565b9150509250925092565b803563ffffffff81168114610ea757600080fd5b60008082840361016081121561101b57600080fd5b6101408082121561102b57600080fd5b611033610d33565b915061103e85610e9c565b825261104c60208601610e9c565b602083015261105d60408601610e9c565b6040830152606085013560608301526080850135608083015260a085013560a083015261108c60c08601610e9c565b60c083015261109d60e08601610ff2565b60e08301526101006110b0818701610ff2565b908301526101206110c2868201610ff2565b9083015290925083013567ffffffffffffffff8111156110e157600080fd5b610f7285828601610dfc565b6000806040838503121561110057600080fd5b82359150602083013567ffffffffffffffff8111156110e157600080fd5b60006020828403121561113057600080fd5b5035919050565b60006020828403121561114957600080fd5b813561115481610e87565b9392505050565b60005b8381101561117657818101518382015260200161115e565b50506000910152565b6000825161119181846020870161115b565b9190910192915050565b600082601f8301126111ac57600080fd5b81516111ba610e1b82610dd4565b8181528460208386010111156111cf57600080fd5b6105d582602083016020870161115b565b600080604083850312156111f357600080fd5b825167ffffffffffffffff8082111561120b57600080fd5b6112178683870161119b565b9350602085015191508082111561122d57600080fd5b50610f728582860161119b565b60008060006060848603121561124f57600080fd5b83519250602084015161126181610e87565b604085015190925067ffffffffffffffff81111561127e57600080fd5b610fe88682870161119b565b60008060006060848603121561129f57600080fd5b83516112aa81610e87565b6020850151909350600481106112bf57600080fd5b604085015190925067ffffffffffffffff808211156112dd57600080fd5b9085019081870360a08112156112f257600080fd5b6112fa610d5d565b608082121561130857600080fd5b611310610d80565b604083121561131e57600080fd5b611326610d5d565b9250845161133381610e87565b8084525060208501516020840152828152604085015160208201526060850151604082015280825250608084015191508282111561137057600080fd5b61137c8983860161119b565b6020820152809450505050509250925092565b600081518084526113a781602086016020860161115b565b601f01601f19169290920160200192915050565b6001600160a01b038d811682528c811660208301528b811660408301528a81166060830152608082018a905260a0820189905260c08201889052861660e082015263ffffffff8581166101008301528481166101208301528316610140820152600061018061016083015261143461018083018461138f565b9e9d5050505050505050505050505050565b6020815281516020820152600060208301516040808401526001600160a01b03815116606084015267ffffffffffffffff60208201511660808401526040810151151560a0840152606081015160c0840152608081015160c060e08501526114b261012085018261138f565b905060a0820151610100850152809250505092915050565b6000602082840312156114dc57600080fd5b5051919050565b8281526040602082015260006105d5604083018461138f56fea26469706673582212209a7d1c3c256b8713ecea0b797fc754629692744c29144c8b5a4396be44cdc2a064736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000bd75f629a22dc1ced33dda0b68c546a1c035c458199429ee45da2c99fd2617ec4865749ca292009f44ee2a0a43721adef1c9c9df000000000000000000000000e35e9842fceaca96570b734083f4a58e8f7c5f2a0000000000000000000000001133ea7af70876e64665ecd07c0a0476d09465a100000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab1
-----Decoded View---------------
Arg [0] : _eas (address): 0xbD75f629A22Dc1ceD33dDA0b68c546A1c035c458
Arg [1] : _easSchema (bytes32): 0x199429ee45da2c99fd2617ec4865749ca292009f44ee2a0a43721adef1c9c9df
Arg [2] : _acrossSpokePool (address): 0xe35e9842fceaCA96570B734083f4a58e8F7C5f2A
Arg [3] : _allo (address): 0x1133eA7Af70876e64665ecD07C0A0476d09465a1
Arg [4] : _wethAddress (address): 0x82aF49447D8a07e3bd95BD0d56f35241523fBab1
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000bd75f629a22dc1ced33dda0b68c546a1c035c458
Arg [1] : 199429ee45da2c99fd2617ec4865749ca292009f44ee2a0a43721adef1c9c9df
Arg [2] : 000000000000000000000000e35e9842fceaca96570b734083f4a58e8f7c5f2a
Arg [3] : 0000000000000000000000001133ea7af70876e64665ecd07c0a0476d09465a1
Arg [4] : 00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab1
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.