@allo-team/allo-v2-sdk
Version:
349 lines (348 loc) • 8.16 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.abi = exports.getAddress = void 0;
// Factory for DonationVotingMerkleDistributionDirectTransferStrategy v2.1
const getAddress = (chainId) => {
switch (chainId) {
case 300: // ZkSync Era Testnet
case 324: // ZkSync Era Mainnet
return "0x4eed0E5f18059057fE00308773eE6D804A0Dc5Fe";
default:
throw new Error("Chain not supported by SDK");
}
};
exports.getAddress = getAddress;
exports.abi = [
{
inputs: [
{
internalType: "address",
name: "_allo",
type: "address",
},
{
internalType: "string",
name: "_name",
type: "string",
},
{
internalType: "contract ISignatureTransfer",
name: "_permit2",
type: "address",
},
],
stateMutability: "nonpayable",
type: "constructor",
},
{
inputs: [],
name: "NewOwnerIsZeroAddress",
type: "error",
},
{
inputs: [],
name: "NoHandoverRequest",
type: "error",
},
{
inputs: [],
name: "Unauthorized",
type: "error",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "address",
name: "allo",
type: "address",
},
],
name: "AlloUpdated",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "string",
name: "name",
type: "string",
},
],
name: "NameUpdated",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "pendingOwner",
type: "address",
},
],
name: "OwnershipHandoverCanceled",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "pendingOwner",
type: "address",
},
],
name: "OwnershipHandoverRequested",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "oldOwner",
type: "address",
},
{
indexed: true,
internalType: "address",
name: "newOwner",
type: "address",
},
],
name: "OwnershipTransferred",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "contract ISignatureTransfer",
name: "permit2",
type: "address",
},
],
name: "Permit2Updated",
type: "event",
},
{
anonymous: false,
inputs: [
{
indexed: false,
internalType: "address",
name: "strategy",
type: "address",
},
],
name: "StrategyCreated",
type: "event",
},
{
inputs: [],
name: "allo",
outputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "cancelOwnershipHandover",
outputs: [],
stateMutability: "payable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "pendingOwner",
type: "address",
},
],
name: "completeOwnershipHandover",
outputs: [],
stateMutability: "payable",
type: "function",
},
{
inputs: [],
name: "createStrategy",
outputs: [
{
internalType: "address",
name: "strategy",
type: "address",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "_allo",
type: "address",
},
{
internalType: "string",
name: "_name",
type: "string",
},
{
internalType: "contract ISignatureTransfer",
name: "_permit2",
type: "address",
},
],
name: "createStrategyCustom",
outputs: [
{
internalType: "address",
name: "strategy",
type: "address",
},
],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "name",
outputs: [
{
internalType: "string",
name: "",
type: "string",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "owner",
outputs: [
{
internalType: "address",
name: "result",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "pendingOwner",
type: "address",
},
],
name: "ownershipHandoverExpiresAt",
outputs: [
{
internalType: "uint256",
name: "result",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "permit2",
outputs: [
{
internalType: "contract ISignatureTransfer",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "renounceOwnership",
outputs: [],
stateMutability: "payable",
type: "function",
},
{
inputs: [],
name: "requestOwnershipHandover",
outputs: [],
stateMutability: "payable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "newOwner",
type: "address",
},
],
name: "transferOwnership",
outputs: [],
stateMutability: "payable",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "_allo",
type: "address",
},
],
name: "updateAllo",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "string",
name: "_name",
type: "string",
},
],
name: "updateName",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{
internalType: "contract ISignatureTransfer",
name: "_permit2",
type: "address",
},
],
name: "updatePermit2",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
];