-
Notifications
You must be signed in to change notification settings - Fork 921
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
better handling of deployedContracts and external contract #592
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really great job @technophile-04, amazing PR and context to it <3
I'm all in with this. Left a few comments.
Now regarding the name generated/deployedContract.ts we should change it since this change tries to blur the line between external contracts and deployedContracts maybe we could do contracts/index.ts? (please feel free to suggest an alternate name)
We definitely need to change generated/
to contracts/
. deployedContracts
I think it covers both: "external" contracts + contracts deployed with SE-2. Both are deployed contracts, right? :D
index.ts
follows the convention. The only reason I don't like it is because there are a bunch of index.ts files in the project (barrel files most of them)... and it'd be hard to navigate (at least how I do it: CTRL + P, start typing "deploy..." and enter). But maybe contracts/deployedContracts.ts
is too redundant.
IDK, I'd love to hear what others think too.
I like this approach of simplifying the contract definition file. Downside of putting everything in the same file is running So with that in mind, it might be beneficial to keep a 2-file approach. What the types for this would look like can be seen here. If we would go this route, I can definitely help adding this. |
Yup 💯
Yup yup agree it's really bad that external contract will be overridden :(
This is the most optimal / best-of-all approach if we get it working, As I understand the problem we are facing with 2-file approach is Merging two objects at the type level and also make sure the typescript doesn't widen's the type while merging From Samuel's branch : What if we do instead of return { ...external, ...combined } as MergeDeepRecords<typeof contractData, typeof externalContractsData>; Here is MergeDeepRecords type or we can do any type helper which hopefully does this job, btw found that Ramda function Thanks guys for the great suggestions !! Will try to explore the 2-files approach since I kind of got the path thanks to Samuel's finding 🙌 |
This is a great point. If we can figure out the Types for the 2-files approach, it's definitely the way to go ( Thanks @technophile-04 & @sverps !! |
There is actually no type widening in the deepMerge function, since the return type is declared rather than inferred. I'm guessing the
Could work, don't know enough about this specific rambda function, so we'd need to test it out. The I pushed your suggestion to my branch and fixed a small error for |
Great work @technophile-04 !! I don't have much to say. I agree that having 2 files is the best option, and the names should be contracts/deployedContracts.ts and contracts/externalContracts.ts or maybe contracts/deployed.ts and contracts/external.ts |
😅 My bad Ramda dosen't work nicely tried it :( The new approach I followed is using Also renamed Just a thought what keep name This PR is ready for test 🙌 I tested it normally works great but will also do through pass tomorrow 🙌 Tysm all |
Thanks @technophile-04 for pulling this off <3 I'll do a pass soon too.
I like both being in the same folder ( // This file is autogenerated by Scaffold-ETH.
// You should not edit it manually or your changes might be overwritten. |
Great job Shiv! 👍
like! |
I like using this dependency, it seems well established and widely used, so no harm in that. I liked writing and exploring the typescript magic I created custom, but from a maintainability perspective, it wasn't ideal. If we can externalize it this way, it's even better 👍 PR looks nice. I agree with placing generated and manual contract files in same location, we can explain everything about it in the readme and in comments. |
updated at cbfbe85 Tested it nicely just wanted to make sure that types don't behave in weird way(like it kind of did in #377 related issue) when there is large amount of merging or things get way too big. But everything works great 🙌!! Tysm all for great suggestion really appreciate it and thanks again @sverps for chiming in 🙌!! BTW here is mock test data : externalContract.tsimport { GenericContractsDeclaration } from "~~/utils/scaffold-eth/contract";
/**
* @example
* const externalContracts = {
* 1: {
* DAI: {
* address: "0x...",
* abi: [...],
* }
* } as const;
*/
const externalContracts = {
11155111: {
DAI: {
address: "0x53844F9577C2334e541Aec7Df7174ECe5dF1fCf0",
abi: [
{
inputs: [{ internalType: "address", name: "_to", type: "address" }],
stateMutability: "nonpayable",
type: "constructor",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "owner", type: "address" },
{ indexed: true, internalType: "address", name: "spender", type: "address" },
{ indexed: false, internalType: "uint256", name: "value", type: "uint256" },
],
name: "Approval",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "from", type: "address" },
{ indexed: true, internalType: "address", name: "to", type: "address" },
{ indexed: false, internalType: "uint256", name: "value", type: "uint256" },
],
name: "Transfer",
type: "event",
},
{
inputs: [
{ internalType: "address", name: "owner", type: "address" },
{ internalType: "address", name: "spender", type: "address" },
],
name: "allowance",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "spender", type: "address" },
{ internalType: "uint256", name: "value", type: "uint256" },
],
name: "approve",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "owner", type: "address" }],
name: "balanceOf",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "uint256", name: "amount", type: "uint256" }],
name: "burn",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "account", type: "address" },
{ internalType: "uint256", name: "amount", type: "uint256" },
],
name: "burnFrom",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "to", type: "address" }],
name: "create",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "decimals",
outputs: [{ internalType: "uint8", name: "", type: "uint8" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "spender", type: "address" },
{ internalType: "uint256", name: "subtractedValue", type: "uint256" },
],
name: "decreaseAllowance",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "spender", type: "address" },
{ internalType: "uint256", name: "addedValue", type: "uint256" },
],
name: "increaseAllowance",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "name",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "symbol",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "totalSupply",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "to", type: "address" },
{ internalType: "uint256", name: "value", type: "uint256" },
],
name: "transfer",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "from", type: "address" },
{ internalType: "address", name: "to", type: "address" },
{ internalType: "uint256", name: "value", type: "uint256" },
],
name: "transferFrom",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
],
},
USDC: {
address: "0x8267cF9254734C6Eb452a7bb9AAF97B392258b21",
abi: [
{
inputs: [{ internalType: "address", name: "_to", type: "address" }],
stateMutability: "nonpayable",
type: "constructor",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "owner", type: "address" },
{ indexed: true, internalType: "address", name: "spender", type: "address" },
{ indexed: false, internalType: "uint256", name: "value", type: "uint256" },
],
name: "Approval",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "from", type: "address" },
{ indexed: true, internalType: "address", name: "to", type: "address" },
{ indexed: false, internalType: "uint256", name: "value", type: "uint256" },
],
name: "Transfer",
type: "event",
},
{
inputs: [
{ internalType: "address", name: "owner", type: "address" },
{ internalType: "address", name: "spender", type: "address" },
],
name: "allowance",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "spender", type: "address" },
{ internalType: "uint256", name: "value", type: "uint256" },
],
name: "approve",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "owner", type: "address" }],
name: "balanceOf",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "uint256", name: "amount", type: "uint256" }],
name: "burn",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "account", type: "address" },
{ internalType: "uint256", name: "amount", type: "uint256" },
],
name: "burnFrom",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "to", type: "address" }],
name: "create",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "decimals",
outputs: [{ internalType: "uint8", name: "", type: "uint8" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "spender", type: "address" },
{ internalType: "uint256", name: "subtractedValue", type: "uint256" },
],
name: "decreaseAllowance",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "spender", type: "address" },
{ internalType: "uint256", name: "addedValue", type: "uint256" },
],
name: "increaseAllowance",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "name",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "symbol",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "totalSupply",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "to", type: "address" },
{ internalType: "uint256", name: "value", type: "uint256" },
],
name: "transfer",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "from", type: "address" },
{ internalType: "address", name: "to", type: "address" },
{ internalType: "uint256", name: "value", type: "uint256" },
],
name: "transferFrom",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
],
},
WETH: {
address: "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9",
abi: [
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "src", type: "address" },
{ indexed: true, internalType: "address", name: "guy", type: "address" },
{ indexed: false, internalType: "uint256", name: "wad", type: "uint256" },
],
name: "Approval",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "dst", type: "address" },
{ indexed: false, internalType: "uint256", name: "wad", type: "uint256" },
],
name: "Deposit",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "src", type: "address" },
{ indexed: true, internalType: "address", name: "dst", type: "address" },
{ indexed: false, internalType: "uint256", name: "wad", type: "uint256" },
],
name: "Transfer",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "src", type: "address" },
{ indexed: false, internalType: "uint256", name: "wad", type: "uint256" },
],
name: "Withdrawal",
type: "event",
},
{
inputs: [
{ internalType: "address", name: "", type: "address" },
{ internalType: "address", name: "", type: "address" },
],
name: "allowance",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "guy", type: "address" },
{ internalType: "uint256", name: "wad", type: "uint256" },
],
name: "approve",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "", type: "address" }],
name: "balanceOf",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "decimals",
outputs: [{ internalType: "uint8", name: "", type: "uint8" }],
stateMutability: "view",
type: "function",
},
{ inputs: [], name: "deposit", outputs: [], stateMutability: "payable", type: "function" },
{
inputs: [],
name: "name",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "symbol",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "totalSupply",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "dst", type: "address" },
{ internalType: "uint256", name: "wad", type: "uint256" },
],
name: "transfer",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "src", type: "address" },
{ internalType: "address", name: "dst", type: "address" },
{ internalType: "uint256", name: "wad", type: "uint256" },
],
name: "transferFrom",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "uint256", name: "wad", type: "uint256" }],
name: "withdraw",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{ stateMutability: "payable", type: "receive" },
],
},
LAUNCHPAD: {
address: "0x93B1F8bBAf7a893B6dDaAd63e4dDA7cC78A6Fce8",
abi: [
{ inputs: [], stateMutability: "nonpayable", type: "constructor" },
{ inputs: [], name: "AlreadyInitialized", type: "error" },
{ inputs: [], name: "AlreadyRevealed", type: "error" },
{ inputs: [], name: "ArrayLengthsDiffer", type: "error" },
{ inputs: [], name: "BaseURINotSet", type: "error" },
{ inputs: [], name: "ClaimPeriodTooShort", type: "error" },
{ inputs: [], name: "CurrentlyNotClaimPeriod", type: "error" },
{ inputs: [], name: "IncorrectAddress", type: "error" },
{ inputs: [], name: "InsufficientBalance", type: "error" },
{ inputs: [], name: "InvalidPartnerSharePct", type: "error" },
{ inputs: [], name: "InvalidPartnerWallet", type: "error" },
{ inputs: [], name: "InvalidProof", type: "error" },
{ inputs: [], name: "MaxSupplyReached", type: "error" },
{ inputs: [], name: "MintLimitReached", type: "error" },
{ inputs: [], name: "MsgSenderIsNotOwner", type: "error" },
{ inputs: [], name: "NoConfirmedIds", type: "error" },
{
inputs: [{ internalType: "address", name: "operator", type: "address" }],
name: "OperatorNotAllowed",
type: "error",
},
{ inputs: [], name: "PartnerActive", type: "error" },
{ inputs: [], name: "PartnerAlreadyExists", type: "error" },
{ inputs: [], name: "PartnerDeactivated", type: "error" },
{ inputs: [], name: "PartnerNotFound", type: "error" },
{ inputs: [], name: "TierLengthTooShort", type: "error" },
{ inputs: [], name: "TierNumberIncorrect", type: "error" },
{ inputs: [], name: "TierPeriodHasEnded", type: "error" },
{ inputs: [], name: "TierPeriodHasntStarted", type: "error" },
{ inputs: [], name: "TokenIsSoulbound", type: "error" },
{ inputs: [], name: "TokenNotAcceptedAsPayment", type: "error" },
{ inputs: [], name: "TotalSupplyGreaterThanMaxSupply", type: "error" },
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "account", type: "address" },
{ indexed: true, internalType: "address", name: "operator", type: "address" },
{ indexed: false, internalType: "bool", name: "approved", type: "bool" },
],
name: "ApprovalForAll",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "user", type: "address" },
{ indexed: true, internalType: "uint256[]", name: "_ids", type: "uint256[]" },
{ indexed: true, internalType: "uint256[]", name: "_amounts", type: "uint256[]" },
],
name: "BatchMint",
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",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "uint256", name: "_tokenId", type: "uint256" },
{ indexed: true, internalType: "uint256", name: "_amount", type: "uint256" },
{ indexed: true, internalType: "address", name: "_user", type: "address" },
],
name: "TokenBurn",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "uint256[]", name: "_tokenIds", type: "uint256[]" },
{ indexed: true, internalType: "uint256[]", name: "_amounts", type: "uint256[]" },
{ indexed: true, internalType: "address", name: "_user", type: "address" },
],
name: "TokenBurnBatch",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "operator", type: "address" },
{ indexed: true, internalType: "address", name: "from", type: "address" },
{ indexed: true, internalType: "address", name: "to", type: "address" },
{ indexed: false, internalType: "uint256[]", name: "ids", type: "uint256[]" },
{ indexed: false, internalType: "uint256[]", name: "values", type: "uint256[]" },
],
name: "TransferBatch",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "operator", type: "address" },
{ indexed: true, internalType: "address", name: "from", type: "address" },
{ indexed: true, internalType: "address", name: "to", type: "address" },
{ indexed: false, internalType: "uint256", name: "id", type: "uint256" },
{ indexed: false, internalType: "uint256", name: "value", type: "uint256" },
],
name: "TransferSingle",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: false, internalType: "string", name: "value", type: "string" },
{ indexed: true, internalType: "uint256", name: "id", type: "uint256" },
],
name: "URI",
type: "event",
},
{
inputs: [],
name: "OPERATOR_FILTER_REGISTRY",
outputs: [{ internalType: "contract IOperatorFilterRegistry", name: "", type: "address" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "string", name: "_baseURI", type: "string" },
{ internalType: "string", name: "_name", type: "string" },
{ internalType: "string", name: "_symbol", type: "string" },
],
name: "_erc1155Initializer",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "account", type: "address" },
{ internalType: "uint256", name: "id", type: "uint256" },
],
name: "balanceOf",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address[]", name: "accounts", type: "address[]" },
{ internalType: "uint256[]", name: "ids", type: "uint256[]" },
],
name: "balanceOfBatch",
outputs: [{ internalType: "uint256[]", name: "", type: "uint256[]" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "baseURI",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "to", type: "address" },
{ internalType: "uint256[]", name: "ids", type: "uint256[]" },
{ internalType: "uint256[]", name: "amounts", type: "uint256[]" },
{ internalType: "bytes", name: "data", type: "bytes" },
],
name: "batchMint",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "from", type: "address" },
{ internalType: "uint256", name: "id", type: "uint256" },
{ internalType: "uint256", name: "amount", type: "uint256" },
],
name: "burn",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "from", type: "address" },
{ internalType: "uint256[]", name: "ids", type: "uint256[]" },
{ internalType: "uint256[]", name: "amounts", type: "uint256[]" },
],
name: "burnBatch",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "erc1155Initialized",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "uint256", name: "_id", type: "uint256" }],
name: "getSupplyPerId",
outputs: [
{ internalType: "uint256", name: "", type: "uint256" },
{ internalType: "uint256", name: "", type: "uint256" },
],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "address", name: "", type: "address" }],
name: "isAdmin",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "account", type: "address" },
{ internalType: "address", name: "operator", type: "address" },
],
name: "isApprovedForAll",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "to", type: "address" },
{ internalType: "uint256", name: "id", type: "uint256" },
{ internalType: "uint256", name: "amount", type: "uint256" },
{ internalType: "bytes", name: "data", type: "bytes" },
],
name: "mint",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "name",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "owner",
outputs: [{ internalType: "address", name: "", type: "address" }],
stateMutability: "view",
type: "function",
},
{ inputs: [], name: "renounceOwnership", outputs: [], stateMutability: "nonpayable", type: "function" },
{
inputs: [
{ internalType: "address", name: "from", type: "address" },
{ internalType: "address", name: "to", type: "address" },
{ internalType: "uint256[]", name: "tokenIds", type: "uint256[]" },
{ internalType: "uint256[]", name: "amounts", type: "uint256[]" },
{ internalType: "bytes", name: "data", type: "bytes" },
],
name: "safeBatchTransferFrom",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "from", type: "address" },
{ internalType: "address", name: "to", type: "address" },
{ internalType: "uint256", name: "tokenId", type: "uint256" },
{ internalType: "uint256", name: "amount", type: "uint256" },
{ internalType: "bytes", name: "data", type: "bytes" },
],
name: "safeTransferFrom",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "_admin", type: "address" },
{ internalType: "bool", name: "_isAdmin", type: "bool" },
],
name: "setAdmin",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "operator", type: "address" },
{ internalType: "bool", name: "approved", type: "bool" },
],
name: "setApprovalForAll",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "string", name: "_baseURI", type: "string" }],
name: "setBaseURI",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "string", name: "_name", type: "string" }],
name: "setName",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "string", name: "_symbol", type: "string" }],
name: "setSymbol",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "uint256[]", name: "_tokenIds", type: "uint256[]" },
{ internalType: "uint256[]", name: "_maxSupplys", type: "uint256[]" },
],
name: "setTokenIdMaxSupply",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "uint256", name: "", type: "uint256" }],
name: "supplyPerId",
outputs: [
{ internalType: "uint256", name: "max", type: "uint256" },
{ internalType: "uint256", name: "total", type: "uint256" },
],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "bytes4", name: "interfaceId", type: "bytes4" }],
name: "supportsInterface",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "symbol",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "address", name: "newOwner", type: "address" }],
name: "transferOwnership",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "uint256", name: "_id", type: "uint256" },
{ internalType: "uint256", name: "_amount", type: "uint256" },
],
name: "updateSupplyPerId",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "uint256", name: "tokenId", type: "uint256" }],
name: "uri",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
],
},
SIMPLE_ACCOUNT: {
address: "0xeF9f55913fE6fB931d920Fa1881E311523ed8EE9",
abi: [
{
inputs: [
{ internalType: "contract IEntryPoint", name: "_entryPoint", type: "address" },
{ internalType: "address", name: "_master", type: "address" },
],
stateMutability: "nonpayable",
type: "constructor",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "bytes32", name: "role", type: "bytes32" },
{ indexed: true, internalType: "bytes32", name: "previousAdminRole", type: "bytes32" },
{ indexed: true, internalType: "bytes32", name: "newAdminRole", type: "bytes32" },
],
name: "RoleAdminChanged",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "bytes32", name: "role", type: "bytes32" },
{ indexed: true, internalType: "address", name: "account", type: "address" },
{ indexed: true, internalType: "address", name: "sender", type: "address" },
],
name: "RoleGranted",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "bytes32", name: "role", type: "bytes32" },
{ indexed: true, internalType: "address", name: "account", type: "address" },
{ indexed: true, internalType: "address", name: "sender", type: "address" },
],
name: "RoleRevoked",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "owner", type: "address" },
{ indexed: true, internalType: "contract IAccount", name: "simpleAccount", type: "address" },
],
name: "SimpleAccountCreated",
type: "event",
},
{
inputs: [],
name: "ACCOUNT_CREATOR",
outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "DEFAULT_ADMIN_ROLE",
outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "address", name: "owner", type: "address" }],
name: "createAccount",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "owner", type: "address" }],
name: "getAccount",
outputs: [{ internalType: "contract IAccount", name: "simpleAccount", type: "address" }],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "bytes32", name: "role", type: "bytes32" }],
name: "getRoleAdmin",
outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "bytes32", name: "role", type: "bytes32" },
{ internalType: "address", name: "account", type: "address" },
],
name: "grantRole",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "bytes32", name: "role", type: "bytes32" },
{ internalType: "address", name: "account", type: "address" },
],
name: "hasRole",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "bytes32", name: "role", type: "bytes32" },
{ internalType: "address", name: "account", type: "address" },
],
name: "renounceRole",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "bytes32", name: "role", type: "bytes32" },
{ internalType: "address", name: "account", type: "address" },
],
name: "revokeRole",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "", type: "address" }],
name: "simpleAccounts",
outputs: [{ internalType: "contract IAccount", name: "", type: "address" }],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "bytes4", name: "interfaceId", type: "bytes4" }],
name: "supportsInterface",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "view",
type: "function",
},
],
},
PAYMET_CHANNEL: {
address: "0xc0f59f5A41298BB5c08563693Bb3a111699ac86F",
abi: [
{
inputs: [
{ internalType: "address", name: "initialOwner_", type: "address" },
{ internalType: "contract IERC20", name: "USDT_", type: "address" },
],
stateMutability: "nonpayable",
type: "constructor",
},
{ inputs: [], name: "ECDSAInvalidSignature", type: "error" },
{
inputs: [{ internalType: "uint256", name: "length", type: "uint256" }],
name: "ECDSAInvalidSignatureLength",
type: "error",
},
{
inputs: [{ internalType: "bytes32", name: "s", type: "bytes32" }],
name: "ECDSAInvalidSignatureS",
type: "error",
},
{ inputs: [], name: "EnforcedPause", type: "error" },
{ inputs: [], name: "ExpectedPause", type: "error" },
{
inputs: [{ internalType: "address", name: "owner", type: "address" }],
name: "OwnableInvalidOwner",
type: "error",
},
{
inputs: [{ internalType: "address", name: "account", type: "address" }],
name: "OwnableUnauthorizedAccount",
type: "error",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "creator", type: "address" },
{ indexed: true, internalType: "address", name: "recipient", type: "address" },
{ indexed: false, internalType: "uint256", name: "sequence", type: "uint256" },
],
name: "ChannelClosed",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "creator", type: "address" },
{ indexed: true, internalType: "address", name: "recipient", type: "address" },
],
name: "ChannelInitialized",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "creator", type: "address" },
{ indexed: true, internalType: "address", name: "recipient", type: "address" },
{ indexed: false, internalType: "uint256", name: "duration", type: "uint256" },
{ indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
],
name: "ChannelOpened",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "creator", type: "address" },
{ indexed: false, internalType: "uint256", name: "newExpiration", type: "uint256" },
],
name: "DurationExtended",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "creator", type: "address" },
{ indexed: true, internalType: "address", name: "recipient", type: "address" },
{ indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
],
name: "FundsDeposited",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "previousOwner", type: "address" },
{ indexed: true, internalType: "address", name: "newOwner", type: "address" },
],
name: "OwnershipTransferStarted",
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",
},
{
anonymous: false,
inputs: [{ indexed: false, internalType: "address", name: "account", type: "address" }],
name: "Paused",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "creator", type: "address" },
{ indexed: true, internalType: "address", name: "recipient", type: "address" },
{ indexed: false, internalType: "uint256", name: "amountTransferred", type: "uint256" },
],
name: "PaymentClaimed",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "creator_", type: "address" },
{ indexed: true, internalType: "address", name: "recipient_", type: "address" },
{ indexed: false, internalType: "uint256", name: "sequence", type: "uint256" },
{ indexed: false, internalType: "uint256", name: "blockTimestamp", type: "uint256" },
{ indexed: false, internalType: "uint256", name: "channelExpiration", type: "uint256" },
],
name: "TimeoutClaimed",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "owner", type: "address" },
{ indexed: true, internalType: "address", name: "newAddress", type: "address" },
],
name: "USDTAddressChanged",
type: "event",
},
{
anonymous: false,
inputs: [{ indexed: false, internalType: "address", name: "account", type: "address" }],
name: "Unpaused",
type: "event",
},
{
inputs: [],
name: "USDT",
outputs: [{ internalType: "contract IERC20", name: "", type: "address" }],
stateMutability: "view",
type: "function",
},
{ inputs: [], name: "acceptOwnership", outputs: [], stateMutability: "nonpayable", type: "function" },
{
inputs: [
{ internalType: "address", name: "", type: "address" },
{ internalType: "address", name: "", type: "address" },
],
name: "channels",
outputs: [
{ internalType: "uint256", name: "balance", type: "uint256" },
{ internalType: "uint256", name: "sequence", type: "uint256" },
{ internalType: "uint256", name: "expiration", type: "uint256" },
{ internalType: "uint256", name: "initialized", type: "uint256" },
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "creator_", type: "address" },
{ internalType: "uint256", name: "amount_", type: "uint256" },
{ internalType: "uint256", name: "sequence_", type: "uint256" },
{ internalType: "bytes", name: "signature_", type: "bytes" },
],
name: "claimPayment",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "recipient_", type: "address" },
{ internalType: "uint256", name: "amount_", type: "uint256" },
],
name: "depositFunds",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "recipient_", type: "address" },
{ internalType: "uint256", name: "newExpiration_", type: "uint256" },
],
name: "extendDuration",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "creator_", type: "address" }],
name: "initializeChannel",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "recipient_", type: "address" },
{ internalType: "uint256", name: "duration_", type: "uint256" },
{ internalType: "uint256", name: "amount_", type: "uint256" },
],
name: "openChannel",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "owner",
outputs: [{ internalType: "address", name: "", type: "address" }],
stateMutability: "view",
type: "function",
},
{ inputs: [], name: "pause", outputs: [], stateMutability: "nonpayable", type: "function" },
{
inputs: [],
name: "paused",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "pendingOwner",
outputs: [{ internalType: "address", name: "", type: "address" }],
stateMutability: "view",
type: "function",
},
{ inputs: [], name: "renounceOwnership", outputs: [], stateMutability: "nonpayable", type: "function" },
{
inputs: [{ internalType: "address", name: "_usdtAddress", type: "address" }],
name: "setUSDTAddress",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "recipient_", type: "address" }],
name: "timeoutClaim",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "newOwner", type: "address" }],
name: "transferOwnership",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{ inputs: [], name: "unpause", outputs: [], stateMutability: "nonpayable", type: "function" },
],
},
},
1: {
DAI: {
address: "0x53844F9577C2334e541Aec7Df7174ECe5dF1fCf0",
abi: [
{
inputs: [{ internalType: "address", name: "_to", type: "address" }],
stateMutability: "nonpayable",
type: "constructor",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "owner", type: "address" },
{ indexed: true, internalType: "address", name: "spender", type: "address" },
{ indexed: false, internalType: "uint256", name: "value", type: "uint256" },
],
name: "Approval",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "from", type: "address" },
{ indexed: true, internalType: "address", name: "to", type: "address" },
{ indexed: false, internalType: "uint256", name: "value", type: "uint256" },
],
name: "Transfer",
type: "event",
},
{
inputs: [
{ internalType: "address", name: "owner", type: "address" },
{ internalType: "address", name: "spender", type: "address" },
],
name: "allowance",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "spender", type: "address" },
{ internalType: "uint256", name: "value", type: "uint256" },
],
name: "approve",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "owner", type: "address" }],
name: "balanceOf",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "uint256", name: "amount", type: "uint256" }],
name: "burn",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "account", type: "address" },
{ internalType: "uint256", name: "amount", type: "uint256" },
],
name: "burnFrom",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "to", type: "address" }],
name: "create",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "decimals",
outputs: [{ internalType: "uint8", name: "", type: "uint8" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "spender", type: "address" },
{ internalType: "uint256", name: "subtractedValue", type: "uint256" },
],
name: "decreaseAllowance",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "spender", type: "address" },
{ internalType: "uint256", name: "addedValue", type: "uint256" },
],
name: "increaseAllowance",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "name",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "symbol",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "totalSupply",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "to", type: "address" },
{ internalType: "uint256", name: "value", type: "uint256" },
],
name: "transfer",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "from", type: "address" },
{ internalType: "address", name: "to", type: "address" },
{ internalType: "uint256", name: "value", type: "uint256" },
],
name: "transferFrom",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
],
},
USDC: {
address: "0x8267cF9254734C6Eb452a7bb9AAF97B392258b21",
abi: [
{
inputs: [{ internalType: "address", name: "_to", type: "address" }],
stateMutability: "nonpayable",
type: "constructor",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "owner", type: "address" },
{ indexed: true, internalType: "address", name: "spender", type: "address" },
{ indexed: false, internalType: "uint256", name: "value", type: "uint256" },
],
name: "Approval",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "from", type: "address" },
{ indexed: true, internalType: "address", name: "to", type: "address" },
{ indexed: false, internalType: "uint256", name: "value", type: "uint256" },
],
name: "Transfer",
type: "event",
},
{
inputs: [
{ internalType: "address", name: "owner", type: "address" },
{ internalType: "address", name: "spender", type: "address" },
],
name: "allowance",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "spender", type: "address" },
{ internalType: "uint256", name: "value", type: "uint256" },
],
name: "approve",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "owner", type: "address" }],
name: "balanceOf",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "uint256", name: "amount", type: "uint256" }],
name: "burn",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "account", type: "address" },
{ internalType: "uint256", name: "amount", type: "uint256" },
],
name: "burnFrom",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "to", type: "address" }],
name: "create",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "decimals",
outputs: [{ internalType: "uint8", name: "", type: "uint8" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "spender", type: "address" },
{ internalType: "uint256", name: "subtractedValue", type: "uint256" },
],
name: "decreaseAllowance",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "spender", type: "address" },
{ internalType: "uint256", name: "addedValue", type: "uint256" },
],
name: "increaseAllowance",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "name",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "symbol",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "totalSupply",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "to", type: "address" },
{ internalType: "uint256", name: "value", type: "uint256" },
],
name: "transfer",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "from", type: "address" },
{ internalType: "address", name: "to", type: "address" },
{ internalType: "uint256", name: "value", type: "uint256" },
],
name: "transferFrom",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
],
},
WETH: {
address: "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9",
abi: [
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "src", type: "address" },
{ indexed: true, internalType: "address", name: "guy", type: "address" },
{ indexed: false, internalType: "uint256", name: "wad", type: "uint256" },
],
name: "Approval",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "dst", type: "address" },
{ indexed: false, internalType: "uint256", name: "wad", type: "uint256" },
],
name: "Deposit",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "src", type: "address" },
{ indexed: true, internalType: "address", name: "dst", type: "address" },
{ indexed: false, internalType: "uint256", name: "wad", type: "uint256" },
],
name: "Transfer",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "src", type: "address" },
{ indexed: false, internalType: "uint256", name: "wad", type: "uint256" },
],
name: "Withdrawal",
type: "event",
},
{
inputs: [
{ internalType: "address", name: "", type: "address" },
{ internalType: "address", name: "", type: "address" },
],
name: "allowance",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "guy", type: "address" },
{ internalType: "uint256", name: "wad", type: "uint256" },
],
name: "approve",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "", type: "address" }],
name: "balanceOf",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "decimals",
outputs: [{ internalType: "uint8", name: "", type: "uint8" }],
stateMutability: "view",
type: "function",
},
{ inputs: [], name: "deposit", outputs: [], stateMutability: "payable", type: "function" },
{
inputs: [],
name: "name",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "symbol",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "totalSupply",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "dst", type: "address" },
{ internalType: "uint256", name: "wad", type: "uint256" },
],
name: "transfer",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "src", type: "address" },
{ internalType: "address", name: "dst", type: "address" },
{ internalType: "uint256", name: "wad", type: "uint256" },
],
name: "transferFrom",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "uint256", name: "wad", type: "uint256" }],
name: "withdraw",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{ stateMutability: "payable", type: "receive" },
],
},
LAUNCHPAD: {
address: "0x93B1F8bBAf7a893B6dDaAd63e4dDA7cC78A6Fce8",
abi: [
{ inputs: [], stateMutability: "nonpayable", type: "constructor" },
{ inputs: [], name: "AlreadyInitialized", type: "error" },
{ inputs: [], name: "AlreadyRevealed", type: "error" },
{ inputs: [], name: "ArrayLengthsDiffer", type: "error" },
{ inputs: [], name: "BaseURINotSet", type: "error" },
{ inputs: [], name: "ClaimPeriodTooShort", type: "error" },
{ inputs: [], name: "CurrentlyNotClaimPeriod", type: "error" },
{ inputs: [], name: "IncorrectAddress", type: "error" },
{ inputs: [], name: "InsufficientBalance", type: "error" },
{ inputs: [], name: "InvalidPartnerSharePct", type: "error" },
{ inputs: [], name: "InvalidPartnerWallet", type: "error" },
{ inputs: [], name: "InvalidProof", type: "error" },
{ inputs: [], name: "MaxSupplyReached", type: "error" },
{ inputs: [], name: "MintLimitReached", type: "error" },
{ inputs: [], name: "MsgSenderIsNotOwner", type: "error" },
{ inputs: [], name: "NoConfirmedIds", type: "error" },
{
inputs: [{ internalType: "address", name: "operator", type: "address" }],
name: "OperatorNotAllowed",
type: "error",
},
{ inputs: [], name: "PartnerActive", type: "error" },
{ inputs: [], name: "PartnerAlreadyExists", type: "error" },
{ inputs: [], name: "PartnerDeactivated", type: "error" },
{ inputs: [], name: "PartnerNotFound", type: "error" },
{ inputs: [], name: "TierLengthTooShort", type: "error" },
{ inputs: [], name: "TierNumberIncorrect", type: "error" },
{ inputs: [], name: "TierPeriodHasEnded", type: "error" },
{ inputs: [], name: "TierPeriodHasntStarted", type: "error" },
{ inputs: [], name: "TokenIsSoulbound", type: "error" },
{ inputs: [], name: "TokenNotAcceptedAsPayment", type: "error" },
{ inputs: [], name: "TotalSupplyGreaterThanMaxSupply", type: "error" },
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "account", type: "address" },
{ indexed: true, internalType: "address", name: "operator", type: "address" },
{ indexed: false, internalType: "bool", name: "approved", type: "bool" },
],
name: "ApprovalForAll",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "user", type: "address" },
{ indexed: true, internalType: "uint256[]", name: "_ids", type: "uint256[]" },
{ indexed: true, internalType: "uint256[]", name: "_amounts", type: "uint256[]" },
],
name: "BatchMint",
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",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "uint256", name: "_tokenId", type: "uint256" },
{ indexed: true, internalType: "uint256", name: "_amount", type: "uint256" },
{ indexed: true, internalType: "address", name: "_user", type: "address" },
],
name: "TokenBurn",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "uint256[]", name: "_tokenIds", type: "uint256[]" },
{ indexed: true, internalType: "uint256[]", name: "_amounts", type: "uint256[]" },
{ indexed: true, internalType: "address", name: "_user", type: "address" },
],
name: "TokenBurnBatch",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "operator", type: "address" },
{ indexed: true, internalType: "address", name: "from", type: "address" },
{ indexed: true, internalType: "address", name: "to", type: "address" },
{ indexed: false, internalType: "uint256[]", name: "ids", type: "uint256[]" },
{ indexed: false, internalType: "uint256[]", name: "values", type: "uint256[]" },
],
name: "TransferBatch",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "operator", type: "address" },
{ indexed: true, internalType: "address", name: "from", type: "address" },
{ indexed: true, internalType: "address", name: "to", type: "address" },
{ indexed: false, internalType: "uint256", name: "id", type: "uint256" },
{ indexed: false, internalType: "uint256", name: "value", type: "uint256" },
],
name: "TransferSingle",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: false, internalType: "string", name: "value", type: "string" },
{ indexed: true, internalType: "uint256", name: "id", type: "uint256" },
],
name: "URI",
type: "event",
},
{
inputs: [],
name: "OPERATOR_FILTER_REGISTRY",
outputs: [{ internalType: "contract IOperatorFilterRegistry", name: "", type: "address" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "string", name: "_baseURI", type: "string" },
{ internalType: "string", name: "_name", type: "string" },
{ internalType: "string", name: "_symbol", type: "string" },
],
name: "_erc1155Initializer",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "account", type: "address" },
{ internalType: "uint256", name: "id", type: "uint256" },
],
name: "balanceOf",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address[]", name: "accounts", type: "address[]" },
{ internalType: "uint256[]", name: "ids", type: "uint256[]" },
],
name: "balanceOfBatch",
outputs: [{ internalType: "uint256[]", name: "", type: "uint256[]" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "baseURI",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "to", type: "address" },
{ internalType: "uint256[]", name: "ids", type: "uint256[]" },
{ internalType: "uint256[]", name: "amounts", type: "uint256[]" },
{ internalType: "bytes", name: "data", type: "bytes" },
],
name: "batchMint",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "from", type: "address" },
{ internalType: "uint256", name: "id", type: "uint256" },
{ internalType: "uint256", name: "amount", type: "uint256" },
],
name: "burn",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "from", type: "address" },
{ internalType: "uint256[]", name: "ids", type: "uint256[]" },
{ internalType: "uint256[]", name: "amounts", type: "uint256[]" },
],
name: "burnBatch",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "erc1155Initialized",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "uint256", name: "_id", type: "uint256" }],
name: "getSupplyPerId",
outputs: [
{ internalType: "uint256", name: "", type: "uint256" },
{ internalType: "uint256", name: "", type: "uint256" },
],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "address", name: "", type: "address" }],
name: "isAdmin",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "account", type: "address" },
{ internalType: "address", name: "operator", type: "address" },
],
name: "isApprovedForAll",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "to", type: "address" },
{ internalType: "uint256", name: "id", type: "uint256" },
{ internalType: "uint256", name: "amount", type: "uint256" },
{ internalType: "bytes", name: "data", type: "bytes" },
],
name: "mint",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "name",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "owner",
outputs: [{ internalType: "address", name: "", type: "address" }],
stateMutability: "view",
type: "function",
},
{ inputs: [], name: "renounceOwnership", outputs: [], stateMutability: "nonpayable", type: "function" },
{
inputs: [
{ internalType: "address", name: "from", type: "address" },
{ internalType: "address", name: "to", type: "address" },
{ internalType: "uint256[]", name: "tokenIds", type: "uint256[]" },
{ internalType: "uint256[]", name: "amounts", type: "uint256[]" },
{ internalType: "bytes", name: "data", type: "bytes" },
],
name: "safeBatchTransferFrom",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "from", type: "address" },
{ internalType: "address", name: "to", type: "address" },
{ internalType: "uint256", name: "tokenId", type: "uint256" },
{ internalType: "uint256", name: "amount", type: "uint256" },
{ internalType: "bytes", name: "data", type: "bytes" },
],
name: "safeTransferFrom",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "_admin", type: "address" },
{ internalType: "bool", name: "_isAdmin", type: "bool" },
],
name: "setAdmin",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "operator", type: "address" },
{ internalType: "bool", name: "approved", type: "bool" },
],
name: "setApprovalForAll",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "string", name: "_baseURI", type: "string" }],
name: "setBaseURI",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "string", name: "_name", type: "string" }],
name: "setName",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "string", name: "_symbol", type: "string" }],
name: "setSymbol",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "uint256[]", name: "_tokenIds", type: "uint256[]" },
{ internalType: "uint256[]", name: "_maxSupplys", type: "uint256[]" },
],
name: "setTokenIdMaxSupply",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "uint256", name: "", type: "uint256" }],
name: "supplyPerId",
outputs: [
{ internalType: "uint256", name: "max", type: "uint256" },
{ internalType: "uint256", name: "total", type: "uint256" },
],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "bytes4", name: "interfaceId", type: "bytes4" }],
name: "supportsInterface",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "symbol",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "address", name: "newOwner", type: "address" }],
name: "transferOwnership",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "uint256", name: "_id", type: "uint256" },
{ internalType: "uint256", name: "_amount", type: "uint256" },
],
name: "updateSupplyPerId",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "uint256", name: "tokenId", type: "uint256" }],
name: "uri",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
],
},
SIMPLE_ACCOUNT: {
address: "0xeF9f55913fE6fB931d920Fa1881E311523ed8EE9",
abi: [
{
inputs: [
{ internalType: "contract IEntryPoint", name: "_entryPoint", type: "address" },
{ internalType: "address", name: "_master", type: "address" },
],
stateMutability: "nonpayable",
type: "constructor",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "bytes32", name: "role", type: "bytes32" },
{ indexed: true, internalType: "bytes32", name: "previousAdminRole", type: "bytes32" },
{ indexed: true, internalType: "bytes32", name: "newAdminRole", type: "bytes32" },
],
name: "RoleAdminChanged",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "bytes32", name: "role", type: "bytes32" },
{ indexed: true, internalType: "address", name: "account", type: "address" },
{ indexed: true, internalType: "address", name: "sender", type: "address" },
],
name: "RoleGranted",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "bytes32", name: "role", type: "bytes32" },
{ indexed: true, internalType: "address", name: "account", type: "address" },
{ indexed: true, internalType: "address", name: "sender", type: "address" },
],
name: "RoleRevoked",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "owner", type: "address" },
{ indexed: true, internalType: "contract IAccount", name: "simpleAccount", type: "address" },
],
name: "SimpleAccountCreated",
type: "event",
},
{
inputs: [],
name: "ACCOUNT_CREATOR",
outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "DEFAULT_ADMIN_ROLE",
outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "address", name: "owner", type: "address" }],
name: "createAccount",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "owner", type: "address" }],
name: "getAccount",
outputs: [{ internalType: "contract IAccount", name: "simpleAccount", type: "address" }],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "bytes32", name: "role", type: "bytes32" }],
name: "getRoleAdmin",
outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "bytes32", name: "role", type: "bytes32" },
{ internalType: "address", name: "account", type: "address" },
],
name: "grantRole",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "bytes32", name: "role", type: "bytes32" },
{ internalType: "address", name: "account", type: "address" },
],
name: "hasRole",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "bytes32", name: "role", type: "bytes32" },
{ internalType: "address", name: "account", type: "address" },
],
name: "renounceRole",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "bytes32", name: "role", type: "bytes32" },
{ internalType: "address", name: "account", type: "address" },
],
name: "revokeRole",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "", type: "address" }],
name: "simpleAccounts",
outputs: [{ internalType: "contract IAccount", name: "", type: "address" }],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "bytes4", name: "interfaceId", type: "bytes4" }],
name: "supportsInterface",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "view",
type: "function",
},
],
},
PAYMET_CHANNEL: {
address: "0xc0f59f5A41298BB5c08563693Bb3a111699ac86F",
abi: [
{
inputs: [
{ internalType: "address", name: "initialOwner_", type: "address" },
{ internalType: "contract IERC20", name: "USDT_", type: "address" },
],
stateMutability: "nonpayable",
type: "constructor",
},
{ inputs: [], name: "ECDSAInvalidSignature", type: "error" },
{
inputs: [{ internalType: "uint256", name: "length", type: "uint256" }],
name: "ECDSAInvalidSignatureLength",
type: "error",
},
{
inputs: [{ internalType: "bytes32", name: "s", type: "bytes32" }],
name: "ECDSAInvalidSignatureS",
type: "error",
},
{ inputs: [], name: "EnforcedPause", type: "error" },
{ inputs: [], name: "ExpectedPause", type: "error" },
{
inputs: [{ internalType: "address", name: "owner", type: "address" }],
name: "OwnableInvalidOwner",
type: "error",
},
{
inputs: [{ internalType: "address", name: "account", type: "address" }],
name: "OwnableUnauthorizedAccount",
type: "error",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "creator", type: "address" },
{ indexed: true, internalType: "address", name: "recipient", type: "address" },
{ indexed: false, internalType: "uint256", name: "sequence", type: "uint256" },
],
name: "ChannelClosed",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "creator", type: "address" },
{ indexed: true, internalType: "address", name: "recipient", type: "address" },
],
name: "ChannelInitialized",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "creator", type: "address" },
{ indexed: true, internalType: "address", name: "recipient", type: "address" },
{ indexed: false, internalType: "uint256", name: "duration", type: "uint256" },
{ indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
],
name: "ChannelOpened",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "creator", type: "address" },
{ indexed: false, internalType: "uint256", name: "newExpiration", type: "uint256" },
],
name: "DurationExtended",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "creator", type: "address" },
{ indexed: true, internalType: "address", name: "recipient", type: "address" },
{ indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
],
name: "FundsDeposited",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "previousOwner", type: "address" },
{ indexed: true, internalType: "address", name: "newOwner", type: "address" },
],
name: "OwnershipTransferStarted",
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",
},
{
anonymous: false,
inputs: [{ indexed: false, internalType: "address", name: "account", type: "address" }],
name: "Paused",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "creator", type: "address" },
{ indexed: true, internalType: "address", name: "recipient", type: "address" },
{ indexed: false, internalType: "uint256", name: "amountTransferred", type: "uint256" },
],
name: "PaymentClaimed",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "creator_", type: "address" },
{ indexed: true, internalType: "address", name: "recipient_", type: "address" },
{ indexed: false, internalType: "uint256", name: "sequence", type: "uint256" },
{ indexed: false, internalType: "uint256", name: "blockTimestamp", type: "uint256" },
{ indexed: false, internalType: "uint256", name: "channelExpiration", type: "uint256" },
],
name: "TimeoutClaimed",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "owner", type: "address" },
{ indexed: true, internalType: "address", name: "newAddress", type: "address" },
],
name: "USDTAddressChanged",
type: "event",
},
{
anonymous: false,
inputs: [{ indexed: false, internalType: "address", name: "account", type: "address" }],
name: "Unpaused",
type: "event",
},
{
inputs: [],
name: "USDT",
outputs: [{ internalType: "contract IERC20", name: "", type: "address" }],
stateMutability: "view",
type: "function",
},
{ inputs: [], name: "acceptOwnership", outputs: [], stateMutability: "nonpayable", type: "function" },
{
inputs: [
{ internalType: "address", name: "", type: "address" },
{ internalType: "address", name: "", type: "address" },
],
name: "channels",
outputs: [
{ internalType: "uint256", name: "balance", type: "uint256" },
{ internalType: "uint256", name: "sequence", type: "uint256" },
{ internalType: "uint256", name: "expiration", type: "uint256" },
{ internalType: "uint256", name: "initialized", type: "uint256" },
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "creator_", type: "address" },
{ internalType: "uint256", name: "amount_", type: "uint256" },
{ internalType: "uint256", name: "sequence_", type: "uint256" },
{ internalType: "bytes", name: "signature_", type: "bytes" },
],
name: "claimPayment",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "recipient_", type: "address" },
{ internalType: "uint256", name: "amount_", type: "uint256" },
],
name: "depositFunds",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "recipient_", type: "address" },
{ internalType: "uint256", name: "newExpiration_", type: "uint256" },
],
name: "extendDuration",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "creator_", type: "address" }],
name: "initializeChannel",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "recipient_", type: "address" },
{ internalType: "uint256", name: "duration_", type: "uint256" },
{ internalType: "uint256", name: "amount_", type: "uint256" },
],
name: "openChannel",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "owner",
outputs: [{ internalType: "address", name: "", type: "address" }],
stateMutability: "view",
type: "function",
},
{ inputs: [], name: "pause", outputs: [], stateMutability: "nonpayable", type: "function" },
{
inputs: [],
name: "paused",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "pendingOwner",
outputs: [{ internalType: "address", name: "", type: "address" }],
stateMutability: "view",
type: "function",
},
{ inputs: [], name: "renounceOwnership", outputs: [], stateMutability: "nonpayable", type: "function" },
{
inputs: [{ internalType: "address", name: "_usdtAddress", type: "address" }],
name: "setUSDTAddress",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "recipient_", type: "address" }],
name: "timeoutClaim",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "newOwner", type: "address" }],
name: "transferOwnership",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{ inputs: [], name: "unpause", outputs: [], stateMutability: "nonpayable", type: "function" },
],
},
},
5: {
DAI: {
address: "0x53844F9577C2334e541Aec7Df7174ECe5dF1fCf0",
abi: [
{
inputs: [{ internalType: "address", name: "_to", type: "address" }],
stateMutability: "nonpayable",
type: "constructor",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "owner", type: "address" },
{ indexed: true, internalType: "address", name: "spender", type: "address" },
{ indexed: false, internalType: "uint256", name: "value", type: "uint256" },
],
name: "Approval",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "from", type: "address" },
{ indexed: true, internalType: "address", name: "to", type: "address" },
{ indexed: false, internalType: "uint256", name: "value", type: "uint256" },
],
name: "Transfer",
type: "event",
},
{
inputs: [
{ internalType: "address", name: "owner", type: "address" },
{ internalType: "address", name: "spender", type: "address" },
],
name: "allowance",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "spender", type: "address" },
{ internalType: "uint256", name: "value", type: "uint256" },
],
name: "approve",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "owner", type: "address" }],
name: "balanceOf",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "uint256", name: "amount", type: "uint256" }],
name: "burn",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "account", type: "address" },
{ internalType: "uint256", name: "amount", type: "uint256" },
],
name: "burnFrom",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "to", type: "address" }],
name: "create",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "decimals",
outputs: [{ internalType: "uint8", name: "", type: "uint8" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "spender", type: "address" },
{ internalType: "uint256", name: "subtractedValue", type: "uint256" },
],
name: "decreaseAllowance",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "spender", type: "address" },
{ internalType: "uint256", name: "addedValue", type: "uint256" },
],
name: "increaseAllowance",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "name",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "symbol",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "totalSupply",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "to", type: "address" },
{ internalType: "uint256", name: "value", type: "uint256" },
],
name: "transfer",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "from", type: "address" },
{ internalType: "address", name: "to", type: "address" },
{ internalType: "uint256", name: "value", type: "uint256" },
],
name: "transferFrom",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
],
},
USDC: {
address: "0x8267cF9254734C6Eb452a7bb9AAF97B392258b21",
abi: [
{
inputs: [{ internalType: "address", name: "_to", type: "address" }],
stateMutability: "nonpayable",
type: "constructor",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "owner", type: "address" },
{ indexed: true, internalType: "address", name: "spender", type: "address" },
{ indexed: false, internalType: "uint256", name: "value", type: "uint256" },
],
name: "Approval",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "from", type: "address" },
{ indexed: true, internalType: "address", name: "to", type: "address" },
{ indexed: false, internalType: "uint256", name: "value", type: "uint256" },
],
name: "Transfer",
type: "event",
},
{
inputs: [
{ internalType: "address", name: "owner", type: "address" },
{ internalType: "address", name: "spender", type: "address" },
],
name: "allowance",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "spender", type: "address" },
{ internalType: "uint256", name: "value", type: "uint256" },
],
name: "approve",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "owner", type: "address" }],
name: "balanceOf",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "uint256", name: "amount", type: "uint256" }],
name: "burn",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "account", type: "address" },
{ internalType: "uint256", name: "amount", type: "uint256" },
],
name: "burnFrom",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "to", type: "address" }],
name: "create",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "decimals",
outputs: [{ internalType: "uint8", name: "", type: "uint8" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "spender", type: "address" },
{ internalType: "uint256", name: "subtractedValue", type: "uint256" },
],
name: "decreaseAllowance",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "spender", type: "address" },
{ internalType: "uint256", name: "addedValue", type: "uint256" },
],
name: "increaseAllowance",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "name",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "symbol",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "totalSupply",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "to", type: "address" },
{ internalType: "uint256", name: "value", type: "uint256" },
],
name: "transfer",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "from", type: "address" },
{ internalType: "address", name: "to", type: "address" },
{ internalType: "uint256", name: "value", type: "uint256" },
],
name: "transferFrom",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
],
},
WETH: {
address: "0x7b79995e5f793A07Bc00c21412e50Ecae098E7f9",
abi: [
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "src", type: "address" },
{ indexed: true, internalType: "address", name: "guy", type: "address" },
{ indexed: false, internalType: "uint256", name: "wad", type: "uint256" },
],
name: "Approval",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "dst", type: "address" },
{ indexed: false, internalType: "uint256", name: "wad", type: "uint256" },
],
name: "Deposit",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "src", type: "address" },
{ indexed: true, internalType: "address", name: "dst", type: "address" },
{ indexed: false, internalType: "uint256", name: "wad", type: "uint256" },
],
name: "Transfer",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "src", type: "address" },
{ indexed: false, internalType: "uint256", name: "wad", type: "uint256" },
],
name: "Withdrawal",
type: "event",
},
{
inputs: [
{ internalType: "address", name: "", type: "address" },
{ internalType: "address", name: "", type: "address" },
],
name: "allowance",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "guy", type: "address" },
{ internalType: "uint256", name: "wad", type: "uint256" },
],
name: "approve",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "", type: "address" }],
name: "balanceOf",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "decimals",
outputs: [{ internalType: "uint8", name: "", type: "uint8" }],
stateMutability: "view",
type: "function",
},
{ inputs: [], name: "deposit", outputs: [], stateMutability: "payable", type: "function" },
{
inputs: [],
name: "name",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "symbol",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "totalSupply",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "dst", type: "address" },
{ internalType: "uint256", name: "wad", type: "uint256" },
],
name: "transfer",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "src", type: "address" },
{ internalType: "address", name: "dst", type: "address" },
{ internalType: "uint256", name: "wad", type: "uint256" },
],
name: "transferFrom",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "uint256", name: "wad", type: "uint256" }],
name: "withdraw",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{ stateMutability: "payable", type: "receive" },
],
},
LAUNCHPAD: {
address: "0x93B1F8bBAf7a893B6dDaAd63e4dDA7cC78A6Fce8",
abi: [
{ inputs: [], stateMutability: "nonpayable", type: "constructor" },
{ inputs: [], name: "AlreadyInitialized", type: "error" },
{ inputs: [], name: "AlreadyRevealed", type: "error" },
{ inputs: [], name: "ArrayLengthsDiffer", type: "error" },
{ inputs: [], name: "BaseURINotSet", type: "error" },
{ inputs: [], name: "ClaimPeriodTooShort", type: "error" },
{ inputs: [], name: "CurrentlyNotClaimPeriod", type: "error" },
{ inputs: [], name: "IncorrectAddress", type: "error" },
{ inputs: [], name: "InsufficientBalance", type: "error" },
{ inputs: [], name: "InvalidPartnerSharePct", type: "error" },
{ inputs: [], name: "InvalidPartnerWallet", type: "error" },
{ inputs: [], name: "InvalidProof", type: "error" },
{ inputs: [], name: "MaxSupplyReached", type: "error" },
{ inputs: [], name: "MintLimitReached", type: "error" },
{ inputs: [], name: "MsgSenderIsNotOwner", type: "error" },
{ inputs: [], name: "NoConfirmedIds", type: "error" },
{
inputs: [{ internalType: "address", name: "operator", type: "address" }],
name: "OperatorNotAllowed",
type: "error",
},
{ inputs: [], name: "PartnerActive", type: "error" },
{ inputs: [], name: "PartnerAlreadyExists", type: "error" },
{ inputs: [], name: "PartnerDeactivated", type: "error" },
{ inputs: [], name: "PartnerNotFound", type: "error" },
{ inputs: [], name: "TierLengthTooShort", type: "error" },
{ inputs: [], name: "TierNumberIncorrect", type: "error" },
{ inputs: [], name: "TierPeriodHasEnded", type: "error" },
{ inputs: [], name: "TierPeriodHasntStarted", type: "error" },
{ inputs: [], name: "TokenIsSoulbound", type: "error" },
{ inputs: [], name: "TokenNotAcceptedAsPayment", type: "error" },
{ inputs: [], name: "TotalSupplyGreaterThanMaxSupply", type: "error" },
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "account", type: "address" },
{ indexed: true, internalType: "address", name: "operator", type: "address" },
{ indexed: false, internalType: "bool", name: "approved", type: "bool" },
],
name: "ApprovalForAll",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "user", type: "address" },
{ indexed: true, internalType: "uint256[]", name: "_ids", type: "uint256[]" },
{ indexed: true, internalType: "uint256[]", name: "_amounts", type: "uint256[]" },
],
name: "BatchMint",
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",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "uint256", name: "_tokenId", type: "uint256" },
{ indexed: true, internalType: "uint256", name: "_amount", type: "uint256" },
{ indexed: true, internalType: "address", name: "_user", type: "address" },
],
name: "TokenBurn",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "uint256[]", name: "_tokenIds", type: "uint256[]" },
{ indexed: true, internalType: "uint256[]", name: "_amounts", type: "uint256[]" },
{ indexed: true, internalType: "address", name: "_user", type: "address" },
],
name: "TokenBurnBatch",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "operator", type: "address" },
{ indexed: true, internalType: "address", name: "from", type: "address" },
{ indexed: true, internalType: "address", name: "to", type: "address" },
{ indexed: false, internalType: "uint256[]", name: "ids", type: "uint256[]" },
{ indexed: false, internalType: "uint256[]", name: "values", type: "uint256[]" },
],
name: "TransferBatch",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "operator", type: "address" },
{ indexed: true, internalType: "address", name: "from", type: "address" },
{ indexed: true, internalType: "address", name: "to", type: "address" },
{ indexed: false, internalType: "uint256", name: "id", type: "uint256" },
{ indexed: false, internalType: "uint256", name: "value", type: "uint256" },
],
name: "TransferSingle",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: false, internalType: "string", name: "value", type: "string" },
{ indexed: true, internalType: "uint256", name: "id", type: "uint256" },
],
name: "URI",
type: "event",
},
{
inputs: [],
name: "OPERATOR_FILTER_REGISTRY",
outputs: [{ internalType: "contract IOperatorFilterRegistry", name: "", type: "address" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "string", name: "_baseURI", type: "string" },
{ internalType: "string", name: "_name", type: "string" },
{ internalType: "string", name: "_symbol", type: "string" },
],
name: "_erc1155Initializer",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "account", type: "address" },
{ internalType: "uint256", name: "id", type: "uint256" },
],
name: "balanceOf",
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address[]", name: "accounts", type: "address[]" },
{ internalType: "uint256[]", name: "ids", type: "uint256[]" },
],
name: "balanceOfBatch",
outputs: [{ internalType: "uint256[]", name: "", type: "uint256[]" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "baseURI",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "to", type: "address" },
{ internalType: "uint256[]", name: "ids", type: "uint256[]" },
{ internalType: "uint256[]", name: "amounts", type: "uint256[]" },
{ internalType: "bytes", name: "data", type: "bytes" },
],
name: "batchMint",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "from", type: "address" },
{ internalType: "uint256", name: "id", type: "uint256" },
{ internalType: "uint256", name: "amount", type: "uint256" },
],
name: "burn",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "from", type: "address" },
{ internalType: "uint256[]", name: "ids", type: "uint256[]" },
{ internalType: "uint256[]", name: "amounts", type: "uint256[]" },
],
name: "burnBatch",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "erc1155Initialized",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "uint256", name: "_id", type: "uint256" }],
name: "getSupplyPerId",
outputs: [
{ internalType: "uint256", name: "", type: "uint256" },
{ internalType: "uint256", name: "", type: "uint256" },
],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "address", name: "", type: "address" }],
name: "isAdmin",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "account", type: "address" },
{ internalType: "address", name: "operator", type: "address" },
],
name: "isApprovedForAll",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "to", type: "address" },
{ internalType: "uint256", name: "id", type: "uint256" },
{ internalType: "uint256", name: "amount", type: "uint256" },
{ internalType: "bytes", name: "data", type: "bytes" },
],
name: "mint",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "name",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "owner",
outputs: [{ internalType: "address", name: "", type: "address" }],
stateMutability: "view",
type: "function",
},
{ inputs: [], name: "renounceOwnership", outputs: [], stateMutability: "nonpayable", type: "function" },
{
inputs: [
{ internalType: "address", name: "from", type: "address" },
{ internalType: "address", name: "to", type: "address" },
{ internalType: "uint256[]", name: "tokenIds", type: "uint256[]" },
{ internalType: "uint256[]", name: "amounts", type: "uint256[]" },
{ internalType: "bytes", name: "data", type: "bytes" },
],
name: "safeBatchTransferFrom",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "from", type: "address" },
{ internalType: "address", name: "to", type: "address" },
{ internalType: "uint256", name: "tokenId", type: "uint256" },
{ internalType: "uint256", name: "amount", type: "uint256" },
{ internalType: "bytes", name: "data", type: "bytes" },
],
name: "safeTransferFrom",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "_admin", type: "address" },
{ internalType: "bool", name: "_isAdmin", type: "bool" },
],
name: "setAdmin",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "operator", type: "address" },
{ internalType: "bool", name: "approved", type: "bool" },
],
name: "setApprovalForAll",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "string", name: "_baseURI", type: "string" }],
name: "setBaseURI",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "string", name: "_name", type: "string" }],
name: "setName",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "string", name: "_symbol", type: "string" }],
name: "setSymbol",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "uint256[]", name: "_tokenIds", type: "uint256[]" },
{ internalType: "uint256[]", name: "_maxSupplys", type: "uint256[]" },
],
name: "setTokenIdMaxSupply",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "uint256", name: "", type: "uint256" }],
name: "supplyPerId",
outputs: [
{ internalType: "uint256", name: "max", type: "uint256" },
{ internalType: "uint256", name: "total", type: "uint256" },
],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "bytes4", name: "interfaceId", type: "bytes4" }],
name: "supportsInterface",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "symbol",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "address", name: "newOwner", type: "address" }],
name: "transferOwnership",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "uint256", name: "_id", type: "uint256" },
{ internalType: "uint256", name: "_amount", type: "uint256" },
],
name: "updateSupplyPerId",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "uint256", name: "tokenId", type: "uint256" }],
name: "uri",
outputs: [{ internalType: "string", name: "", type: "string" }],
stateMutability: "view",
type: "function",
},
],
},
SIMPLE_ACCOUNT: {
address: "0xeF9f55913fE6fB931d920Fa1881E311523ed8EE9",
abi: [
{
inputs: [
{ internalType: "contract IEntryPoint", name: "_entryPoint", type: "address" },
{ internalType: "address", name: "_master", type: "address" },
],
stateMutability: "nonpayable",
type: "constructor",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "bytes32", name: "role", type: "bytes32" },
{ indexed: true, internalType: "bytes32", name: "previousAdminRole", type: "bytes32" },
{ indexed: true, internalType: "bytes32", name: "newAdminRole", type: "bytes32" },
],
name: "RoleAdminChanged",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "bytes32", name: "role", type: "bytes32" },
{ indexed: true, internalType: "address", name: "account", type: "address" },
{ indexed: true, internalType: "address", name: "sender", type: "address" },
],
name: "RoleGranted",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "bytes32", name: "role", type: "bytes32" },
{ indexed: true, internalType: "address", name: "account", type: "address" },
{ indexed: true, internalType: "address", name: "sender", type: "address" },
],
name: "RoleRevoked",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "owner", type: "address" },
{ indexed: true, internalType: "contract IAccount", name: "simpleAccount", type: "address" },
],
name: "SimpleAccountCreated",
type: "event",
},
{
inputs: [],
name: "ACCOUNT_CREATOR",
outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "DEFAULT_ADMIN_ROLE",
outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "address", name: "owner", type: "address" }],
name: "createAccount",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "owner", type: "address" }],
name: "getAccount",
outputs: [{ internalType: "contract IAccount", name: "simpleAccount", type: "address" }],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "bytes32", name: "role", type: "bytes32" }],
name: "getRoleAdmin",
outputs: [{ internalType: "bytes32", name: "", type: "bytes32" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "bytes32", name: "role", type: "bytes32" },
{ internalType: "address", name: "account", type: "address" },
],
name: "grantRole",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "bytes32", name: "role", type: "bytes32" },
{ internalType: "address", name: "account", type: "address" },
],
name: "hasRole",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "bytes32", name: "role", type: "bytes32" },
{ internalType: "address", name: "account", type: "address" },
],
name: "renounceRole",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "bytes32", name: "role", type: "bytes32" },
{ internalType: "address", name: "account", type: "address" },
],
name: "revokeRole",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "", type: "address" }],
name: "simpleAccounts",
outputs: [{ internalType: "contract IAccount", name: "", type: "address" }],
stateMutability: "view",
type: "function",
},
{
inputs: [{ internalType: "bytes4", name: "interfaceId", type: "bytes4" }],
name: "supportsInterface",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "view",
type: "function",
},
],
},
PAYMET_CHANNEL: {
address: "0xc0f59f5A41298BB5c08563693Bb3a111699ac86F",
abi: [
{
inputs: [
{ internalType: "address", name: "initialOwner_", type: "address" },
{ internalType: "contract IERC20", name: "USDT_", type: "address" },
],
stateMutability: "nonpayable",
type: "constructor",
},
{ inputs: [], name: "ECDSAInvalidSignature", type: "error" },
{
inputs: [{ internalType: "uint256", name: "length", type: "uint256" }],
name: "ECDSAInvalidSignatureLength",
type: "error",
},
{
inputs: [{ internalType: "bytes32", name: "s", type: "bytes32" }],
name: "ECDSAInvalidSignatureS",
type: "error",
},
{ inputs: [], name: "EnforcedPause", type: "error" },
{ inputs: [], name: "ExpectedPause", type: "error" },
{
inputs: [{ internalType: "address", name: "owner", type: "address" }],
name: "OwnableInvalidOwner",
type: "error",
},
{
inputs: [{ internalType: "address", name: "account", type: "address" }],
name: "OwnableUnauthorizedAccount",
type: "error",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "creator", type: "address" },
{ indexed: true, internalType: "address", name: "recipient", type: "address" },
{ indexed: false, internalType: "uint256", name: "sequence", type: "uint256" },
],
name: "ChannelClosed",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "creator", type: "address" },
{ indexed: true, internalType: "address", name: "recipient", type: "address" },
],
name: "ChannelInitialized",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "creator", type: "address" },
{ indexed: true, internalType: "address", name: "recipient", type: "address" },
{ indexed: false, internalType: "uint256", name: "duration", type: "uint256" },
{ indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
],
name: "ChannelOpened",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "creator", type: "address" },
{ indexed: false, internalType: "uint256", name: "newExpiration", type: "uint256" },
],
name: "DurationExtended",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "creator", type: "address" },
{ indexed: true, internalType: "address", name: "recipient", type: "address" },
{ indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
],
name: "FundsDeposited",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "previousOwner", type: "address" },
{ indexed: true, internalType: "address", name: "newOwner", type: "address" },
],
name: "OwnershipTransferStarted",
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",
},
{
anonymous: false,
inputs: [{ indexed: false, internalType: "address", name: "account", type: "address" }],
name: "Paused",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "creator", type: "address" },
{ indexed: true, internalType: "address", name: "recipient", type: "address" },
{ indexed: false, internalType: "uint256", name: "amountTransferred", type: "uint256" },
],
name: "PaymentClaimed",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "creator_", type: "address" },
{ indexed: true, internalType: "address", name: "recipient_", type: "address" },
{ indexed: false, internalType: "uint256", name: "sequence", type: "uint256" },
{ indexed: false, internalType: "uint256", name: "blockTimestamp", type: "uint256" },
{ indexed: false, internalType: "uint256", name: "channelExpiration", type: "uint256" },
],
name: "TimeoutClaimed",
type: "event",
},
{
anonymous: false,
inputs: [
{ indexed: true, internalType: "address", name: "owner", type: "address" },
{ indexed: true, internalType: "address", name: "newAddress", type: "address" },
],
name: "USDTAddressChanged",
type: "event",
},
{
anonymous: false,
inputs: [{ indexed: false, internalType: "address", name: "account", type: "address" }],
name: "Unpaused",
type: "event",
},
{
inputs: [],
name: "USDT",
outputs: [{ internalType: "contract IERC20", name: "", type: "address" }],
stateMutability: "view",
type: "function",
},
{ inputs: [], name: "acceptOwnership", outputs: [], stateMutability: "nonpayable", type: "function" },
{
inputs: [
{ internalType: "address", name: "", type: "address" },
{ internalType: "address", name: "", type: "address" },
],
name: "channels",
outputs: [
{ internalType: "uint256", name: "balance", type: "uint256" },
{ internalType: "uint256", name: "sequence", type: "uint256" },
{ internalType: "uint256", name: "expiration", type: "uint256" },
{ internalType: "uint256", name: "initialized", type: "uint256" },
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "creator_", type: "address" },
{ internalType: "uint256", name: "amount_", type: "uint256" },
{ internalType: "uint256", name: "sequence_", type: "uint256" },
{ internalType: "bytes", name: "signature_", type: "bytes" },
],
name: "claimPayment",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "recipient_", type: "address" },
{ internalType: "uint256", name: "amount_", type: "uint256" },
],
name: "depositFunds",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "recipient_", type: "address" },
{ internalType: "uint256", name: "newExpiration_", type: "uint256" },
],
name: "extendDuration",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "creator_", type: "address" }],
name: "initializeChannel",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [
{ internalType: "address", name: "recipient_", type: "address" },
{ internalType: "uint256", name: "duration_", type: "uint256" },
{ internalType: "uint256", name: "amount_", type: "uint256" },
],
name: "openChannel",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [],
name: "owner",
outputs: [{ internalType: "address", name: "", type: "address" }],
stateMutability: "view",
type: "function",
},
{ inputs: [], name: "pause", outputs: [], stateMutability: "nonpayable", type: "function" },
{
inputs: [],
name: "paused",
outputs: [{ internalType: "bool", name: "", type: "bool" }],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "pendingOwner",
outputs: [{ internalType: "address", name: "", type: "address" }],
stateMutability: "view",
type: "function",
},
{ inputs: [], name: "renounceOwnership", outputs: [], stateMutability: "nonpayable", type: "function" },
{
inputs: [{ internalType: "address", name: "_usdtAddress", type: "address" }],
name: "setUSDTAddress",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "recipient_", type: "address" }],
name: "timeoutClaim",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
inputs: [{ internalType: "address", name: "newOwner", type: "address" }],
name: "transferOwnership",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{ inputs: [], name: "unpause", outputs: [], stateMutability: "nonpayable", type: "function" },
],
},
},
} as const;
export default externalContracts satisfies GenericContractsDeclaration; deployedContract.ts/**
* This file is autogenerated by Scaffold-ETH.
* You should not edit it manually or your changes might be overwritten.
*/
import { GenericContractsDeclaration } from "~~/utils/scaffold-eth/contract";
const deployedContracts = {
31337: {
YourContract: {
address: "0x5FbDB2315678afecb367f032d93F642f64180aa3",
abi: [
{
inputs: [
{
internalType: "address",
name: "_owner",
type: "address",
},
],
stateMutability: "nonpayable",
type: "constructor",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "greetingSetter",
type: "address",
},
{
indexed: false,
internalType: "string",
name: "newGreeting",
type: "string",
},
{
indexed: false,
internalType: "bool",
name: "premium",
type: "bool",
},
{
indexed: false,
internalType: "uint256",
name: "value",
type: "uint256",
},
],
name: "GreetingChange",
type: "event",
},
{
inputs: [],
name: "greeting",
outputs: [
{
internalType: "string",
name: "",
type: "string",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "owner",
outputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "premium",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "string",
name: "_newGreeting",
type: "string",
},
],
name: "setGreeting",
outputs: [],
stateMutability: "payable",
type: "function",
},
{
inputs: [],
name: "totalCounter",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
name: "userGreetingCounter",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "withdraw",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
stateMutability: "payable",
type: "receive",
},
],
},
},
11155111: {
YourContract: {
address: "0xD1c25a3A28D13114FC9620BeAD81E954D1abD9D4",
abi: [
{
inputs: [
{
internalType: "address",
name: "_owner",
type: "address",
},
],
stateMutability: "nonpayable",
type: "constructor",
},
{
anonymous: false,
inputs: [
{
indexed: true,
internalType: "address",
name: "greetingSetter",
type: "address",
},
{
indexed: false,
internalType: "string",
name: "newGreeting",
type: "string",
},
{
indexed: false,
internalType: "bool",
name: "premium",
type: "bool",
},
{
indexed: false,
internalType: "uint256",
name: "value",
type: "uint256",
},
],
name: "GreetingChange",
type: "event",
},
{
inputs: [],
name: "greeting",
outputs: [
{
internalType: "string",
name: "",
type: "string",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "owner",
outputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "premium",
outputs: [
{
internalType: "bool",
name: "",
type: "bool",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "string",
name: "_newGreeting",
type: "string",
},
],
name: "setGreeting",
outputs: [],
stateMutability: "payable",
type: "function",
},
{
inputs: [],
name: "totalCounter",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [
{
internalType: "address",
name: "",
type: "address",
},
],
name: "userGreetingCounter",
outputs: [
{
internalType: "uint256",
name: "",
type: "uint256",
},
],
stateMutability: "view",
type: "function",
},
{
inputs: [],
name: "withdraw",
outputs: [],
stateMutability: "nonpayable",
type: "function",
},
{
stateMutability: "payable",
type: "receive",
},
],
},
},
} as const;
export default deployedContracts satisfies GenericContractsDeclaration;
Yup will create an issue on SE-2 docs 🙌 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm! Thanks @technophile-04 !
Hats off to everyone for this PR! Really nice context, explanations and research @technophile-04. It's been a pleasure to read the discussion with everyone's contributions and research about this, GJ 🙌 I think it will be very user friendly having this in two separate files with these names, Tested it and looks good to me 👌 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing stuff, it works great.
Thank you all <3
Description
Tries to simply
deployedContracts
structure so that it's more intuitive.Reason :
This is a kind of RFC which we can close for sure if it does not make sense 🙌
Current Structure (
hardhat-deploy
structure) :Generic Strucutre :
Example
The reason why `hardhat-deploy` have `chainId: Array` instead of `chainId : Object` directly is because of this ->
wighawag/hardhat-deploy#325 (comment)
Since now we are generating this manually we are actually missing the edge-case mentioned in the above comment i.e having same
chainId
but different network names for eg:goerli-stage
,goerli-prod
scaffold-eth-2/packages/hardhat/deploy/99_generateTsAbis.ts
Line 43 in e88419a
Ideally we should have done
output[chainId].push({...})
but I think it's fine since It is a very rare case that people do the above thing having samechainId
but diff nameRedundant/non-intuitive part which we are not utilising in frontend :
Therefore final struct proposal :
Or We can even removecontracts
key from the object.EDIT: Removed
contracts
filed at bd4c916 since it made more sense, but please let me know if we should keep it 🙌How will this help us and why?
The reason we have
deployedContract.ts
files is because SE-2 hooks are able to provide autocompletion by looking at this file. But if people already have contracts deployed or using any generic contract likeDAI
or they chooseNone
option inCLI
then this makes our custom hooks non-usable.Now regarding the name
generated/deployedContract.ts
we should change it since this change tries to blur the line between external contracts and deployedContracts maybe we could docontracts/index.ts
? (please feel free to suggest an alternate name)We have also discussed this in #271 and TG chat we tried
@wagmi/cli
but it seems not that feasible :(. Regarding separateexternal_contract.ts
it looks hard to get typescript inference from multiple files (TBH I am saying this without trying 😅 but looks hard) and even with havingexternal_contract.ts
people will still manually need to paste the address and abi why not do it directly incontracts/index.ts
?Next Steps :
In case we plan to take this forward then :
1. Maybe removeremoved at bd4c916contracts
key too from structure (would love everyone's suggestion here)2. Choose a better name instead of
contracts/deployedContracts.ts
3. Mention in docs maybe in Recipe section how to add your already deployed contract.
Thanks, Also it is completely fine if we don't go with this approach !!🙌