From 0281d10397f0f8710056a4ee3bda8a02f7612e7d Mon Sep 17 00:00:00 2001 From: Andres Aiello Date: Mon, 25 Mar 2024 18:09:10 -0300 Subject: [PATCH 1/2] feat: deploy updated contracts on mainnet for erc-20 --- .../contracts/withdrawErc20/withdrawErc20.sol | 30 +- .../zevm-app-contracts/data/addresses.json | 10 +- packages/zevm-app-contracts/hardhat.config.ts | 7 + .../scripts/address.helpers.ts | 21 +- .../liquidity-incentives/add-reward.ts | 2 +- .../deploy-default-rewards.ts | 4 +- .../deploy-token-reward.ts | 4 +- .../deploy-zrc20-reward.ts | 4 +- .../scripts/liquidity-incentives/deploy.ts | 2 +- .../liquidity-incentives/read-rewards-data.ts | 2 +- .../uniswap/add-liquidity-zeta-uniswap.ts | 2 +- .../uniswap/remove-liquidity-zeta-uniswap.ts | 2 +- .../scripts/uniswap/sell-token.ts | 2 +- .../scripts/uniswap/sell-zeta.ts | 2 +- .../scripts/withdrawERC20/deploy.ts | 3 +- .../scripts/withdrawERC20/withdraw.ts | 15 +- .../scripts/zeta-swap/deploy.ts | 2 +- .../scripts/zeta-swap/get-system-data.ts | 6 +- .../scripts/zeta-swap/stress-swap.ts | 2 +- .../scripts/zeta-swap/swap-on-zevm.ts | 2 +- .../scripts/zeta-swap/swap.ts | 4 +- packages/zevm-app-contracts/temp.json | 1055 +++++++++++++++++ 22 files changed, 1151 insertions(+), 32 deletions(-) create mode 100644 packages/zevm-app-contracts/temp.json diff --git a/packages/zevm-app-contracts/contracts/withdrawErc20/withdrawErc20.sol b/packages/zevm-app-contracts/contracts/withdrawErc20/withdrawErc20.sol index ab84e65e..9342097a 100644 --- a/packages/zevm-app-contracts/contracts/withdrawErc20/withdrawErc20.sol +++ b/packages/zevm-app-contracts/contracts/withdrawErc20/withdrawErc20.sol @@ -1,11 +1,13 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.7; +import "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol"; import "@zetachain/protocol-contracts/contracts/zevm/SystemContract.sol"; import "@zetachain/toolkit/contracts/SwapHelperLib.sol"; contract WithdrawERC20 { + uint16 internal constant MAX_DEADLINE = 200; SystemContract public immutable systemContract; error InsufficientInputAmount(); @@ -14,14 +16,38 @@ contract WithdrawERC20 { systemContract = SystemContract(systemContractAddress); } + function swapTokensForExactTokens( + address zetaToken, + address uniswapV2Router, + address zrc20, + uint256 amount, + address targetZRC20, + uint256 amountInMax + ) internal returns (uint256) { + address[] memory path; + path = new address[](3); + path[0] = zrc20; + path[1] = zetaToken; + path[2] = targetZRC20; + + IZRC20(zrc20).approve(address(uniswapV2Router), amountInMax); + uint256[] memory amounts = IUniswapV2Router01(uniswapV2Router).swapTokensForExactTokens( + amount, + amountInMax, + path, + address(this), + block.timestamp + MAX_DEADLINE + ); + return amounts[0]; + } + function withdraw(address zrc20, uint256 amount, bytes memory to) external virtual { IZRC20(zrc20).transferFrom(msg.sender, address(this), amount); (address gasZRC20, uint256 gasFee) = IZRC20(zrc20).withdrawGasFee(); - uint256 inputForGas = SwapHelperLib.swapTokensForExactTokens( + uint256 inputForGas = swapTokensForExactTokens( systemContract.wZetaContractAddress(), - systemContract.uniswapv2FactoryAddress(), systemContract.uniswapv2Router02Address(), zrc20, gasFee, diff --git a/packages/zevm-app-contracts/data/addresses.json b/packages/zevm-app-contracts/data/addresses.json index 83d5c063..422c919a 100644 --- a/packages/zevm-app-contracts/data/addresses.json +++ b/packages/zevm-app-contracts/data/addresses.json @@ -6,7 +6,15 @@ "zetaSwap": "0xA8168Dc495Ed61E70f5c1941e2860050AB902cEF", "zetaSwapBtcInbound": "0x358E2cfC0E16444Ba7D3164Bbeeb6bEA7472c559", "invitationManager": "0x3649C03C472B698213926543456E9c21081e529d", - "withdrawERC20": "0xa349B9367cc54b47CAb8D09A95836AE8b4D1d84E" + "withdrawERC20": "0x1E8Dc7529FB4CD8711dd846bb59E6c2547a37Bf5" + }, + "zeta_mainnet": { + "disperse": "", + "rewardDistributorFactory": "", + "zetaSwap": "", + "zetaSwapBtcInbound": "", + "invitationManager": "", + "withdrawERC20": "0xe074D5AA7322D6701fAc29743f833A32312eB4Eb" } } } \ No newline at end of file diff --git a/packages/zevm-app-contracts/hardhat.config.ts b/packages/zevm-app-contracts/hardhat.config.ts index f7a284e4..d117900f 100644 --- a/packages/zevm-app-contracts/hardhat.config.ts +++ b/packages/zevm-app-contracts/hardhat.config.ts @@ -51,6 +51,13 @@ const config: HardhatUserConfig = { }, networks: { ...getHardhatConfigNetworks(), + // zeta_mainnet: { + // accounts: PRIVATE_KEYS, + // chainId: 7000, + // gas: 5000000, + // gasPrice: 80000000000, + // url: "https://zetachain-evm.blockpi.network/v1/rpc/public", + // }, }, solidity: { compilers: [ diff --git a/packages/zevm-app-contracts/scripts/address.helpers.ts b/packages/zevm-app-contracts/scripts/address.helpers.ts index d43bdaac..94aa36c3 100644 --- a/packages/zevm-app-contracts/scripts/address.helpers.ts +++ b/packages/zevm-app-contracts/scripts/address.helpers.ts @@ -1,13 +1,18 @@ import { networks } from "@zetachain/networks"; -import { ZetaProtocolNetwork } from "@zetachain/protocol-contracts"; +import { isProtocolNetworkName, isTestnetNetwork, ZetaProtocolNetwork } from "@zetachain/protocol-contracts"; import protocolAddresses from "@zetachain/protocol-contracts/dist/data/addresses.json"; import { readFileSync, writeFileSync } from "fs"; import { join } from "path"; import addresses from "../data/addresses.json"; -export const getZEVMAppAddress = (address: string): string => { - return (addresses["zevm"] as any)["zeta_testnet"][address]; +export const getZEVMAppAddress = (address: string, networkName: string): string => { + if (!isProtocolNetworkName(networkName)) throw new Error("Invalid network name"); + //@ts-ignore + const isTestnet = isTestnetNetwork(networkName); + const zetaChain = isTestnet ? "zeta_testnet" : "zeta_mainnet"; + + return (addresses["zevm"] as any)[zetaChain][address]; }; export const getChainId = (network: ZetaProtocolNetwork): number => { @@ -20,8 +25,14 @@ export const getGasSymbolByNetwork = (network: ZetaProtocolNetwork): number => { return networks[network].gas_symbol; }; -export const getSystemContractAddress = () => { - return protocolAddresses["zevm"]["zeta_testnet"].systemContract; +export const getSystemContractAddress = (networkName: string) => { + if (!isProtocolNetworkName(networkName)) throw new Error("Invalid network name"); + + //@ts-ignore + const isTestnet = isTestnetNetwork(networkName); + const zetaChain = isTestnet ? "zeta_testnet" : "zeta_mainnet"; + + return protocolAddresses["zevm"][zetaChain].systemContract; }; export const saveAddress = (name: string, address: string, networkName: ZetaProtocolNetwork) => { diff --git a/packages/zevm-app-contracts/scripts/liquidity-incentives/add-reward.ts b/packages/zevm-app-contracts/scripts/liquidity-incentives/add-reward.ts index aee56866..34d08f88 100644 --- a/packages/zevm-app-contracts/scripts/liquidity-incentives/add-reward.ts +++ b/packages/zevm-app-contracts/scripts/liquidity-incentives/add-reward.ts @@ -17,7 +17,7 @@ const main = async () => { if (!isProtocolNetworkName(networkName)) throw new Error("Invalid network name"); - const systemContractAddress = getSystemContractAddress(); + const systemContractAddress = getSystemContractAddress(networkName); const systemContract = await SystemContract__factory.connect(systemContractAddress, deployer); await addReward(deployer, systemContract, REWARD_CONTRACT_ADDRESS, REWARD_DURATION, REWARDS_AMOUNT); diff --git a/packages/zevm-app-contracts/scripts/liquidity-incentives/deploy-default-rewards.ts b/packages/zevm-app-contracts/scripts/liquidity-incentives/deploy-default-rewards.ts index 2b4feb22..a02fe151 100644 --- a/packages/zevm-app-contracts/scripts/liquidity-incentives/deploy-default-rewards.ts +++ b/packages/zevm-app-contracts/scripts/liquidity-incentives/deploy-default-rewards.ts @@ -15,10 +15,10 @@ const main = async () => { const networkName = network.name; if (!isProtocolNetworkName(networkName)) throw new Error("Invalid network name"); - const systemContractAddress = getSystemContractAddress(); + const systemContractAddress = getSystemContractAddress(networkName); const systemContract = await SystemContract__factory.connect(systemContractAddress, deployer); - const factoryContractAddress = getZEVMAppAddress("rewardDistributorFactory"); + const factoryContractAddress = getZEVMAppAddress("rewardDistributorFactory", networkName); const rewardDistributorFactory = RewardDistributorFactory__factory.connect(factoryContractAddress, deployer); let rewardContractAddress = ""; diff --git a/packages/zevm-app-contracts/scripts/liquidity-incentives/deploy-token-reward.ts b/packages/zevm-app-contracts/scripts/liquidity-incentives/deploy-token-reward.ts index 2c777db4..2dcfe48c 100644 --- a/packages/zevm-app-contracts/scripts/liquidity-incentives/deploy-token-reward.ts +++ b/packages/zevm-app-contracts/scripts/liquidity-incentives/deploy-token-reward.ts @@ -17,10 +17,10 @@ const main = async () => { if (!isProtocolNetworkName(networkName)) throw new Error("Invalid network name"); - const systemContractAddress = getSystemContractAddress(); + const systemContractAddress = getSystemContractAddress(networkName); const systemContract = await SystemContract__factory.connect(systemContractAddress, deployer); - const factoryContractAddress = getZEVMAppAddress("rewardDistributorFactory"); + const factoryContractAddress = getZEVMAppAddress("rewardDistributorFactory", networkName); const rewardDistributorFactory = RewardDistributorFactory__factory.connect(factoryContractAddress, deployer); diff --git a/packages/zevm-app-contracts/scripts/liquidity-incentives/deploy-zrc20-reward.ts b/packages/zevm-app-contracts/scripts/liquidity-incentives/deploy-zrc20-reward.ts index ef8ff3db..a6b51594 100644 --- a/packages/zevm-app-contracts/scripts/liquidity-incentives/deploy-zrc20-reward.ts +++ b/packages/zevm-app-contracts/scripts/liquidity-incentives/deploy-zrc20-reward.ts @@ -17,10 +17,10 @@ const main = async () => { if (!isProtocolNetworkName(networkName)) throw new Error("Invalid network name"); - const systemContractAddress = getSystemContractAddress(); + const systemContractAddress = getSystemContractAddress(networkName); const systemContract = await SystemContract__factory.connect(systemContractAddress, deployer); - const factoryContractAddress = getZEVMAppAddress("rewardDistributorFactory"); + const factoryContractAddress = getZEVMAppAddress("rewardDistributorFactory", networkName); const rewardDistributorFactory = RewardDistributorFactory__factory.connect(factoryContractAddress, deployer); diff --git a/packages/zevm-app-contracts/scripts/liquidity-incentives/deploy.ts b/packages/zevm-app-contracts/scripts/liquidity-incentives/deploy.ts index e53b0d1b..aea7c784 100644 --- a/packages/zevm-app-contracts/scripts/liquidity-incentives/deploy.ts +++ b/packages/zevm-app-contracts/scripts/liquidity-incentives/deploy.ts @@ -6,7 +6,7 @@ import { getSystemContractAddress, saveAddress } from "../address.helpers"; const networkName = network.name; -const SYSTEM_CONTRACT = getSystemContractAddress(); +const SYSTEM_CONTRACT = getSystemContractAddress(networkName); async function main() { const [deployer] = await ethers.getSigners(); diff --git a/packages/zevm-app-contracts/scripts/liquidity-incentives/read-rewards-data.ts b/packages/zevm-app-contracts/scripts/liquidity-incentives/read-rewards-data.ts index 78fccf1f..a8c74ad6 100644 --- a/packages/zevm-app-contracts/scripts/liquidity-incentives/read-rewards-data.ts +++ b/packages/zevm-app-contracts/scripts/liquidity-incentives/read-rewards-data.ts @@ -39,7 +39,7 @@ async function main() { const [deployer] = await ethers.getSigners(); if (!isProtocolNetworkName(networkName)) throw new Error("Invalid network name"); - const factoryContractAddress = getZEVMAppAddress("rewardDistributorFactory"); + const factoryContractAddress = getZEVMAppAddress("rewardDistributorFactory", networkName); const rewardDistributorFactory = RewardDistributorFactory__factory.connect(factoryContractAddress, deployer); const incentivesContractsLen = await rewardDistributorFactory.incentivesContractsLen(); diff --git a/packages/zevm-app-contracts/scripts/uniswap/add-liquidity-zeta-uniswap.ts b/packages/zevm-app-contracts/scripts/uniswap/add-liquidity-zeta-uniswap.ts index ecc9cfee..980ffcb9 100644 --- a/packages/zevm-app-contracts/scripts/uniswap/add-liquidity-zeta-uniswap.ts +++ b/packages/zevm-app-contracts/scripts/uniswap/add-liquidity-zeta-uniswap.ts @@ -19,7 +19,7 @@ import { getNow, printReserves, sortPair } from "./uniswap.helpers"; const networkName = network.name; -const SYSTEM_CONTRACT = getSystemContractAddress(); +const SYSTEM_CONTRACT = getSystemContractAddress(networkName); const BTC_TO_ADD = parseUnits("0", 8); const ETH_TO_ADD = parseUnits("0"); diff --git a/packages/zevm-app-contracts/scripts/uniswap/remove-liquidity-zeta-uniswap.ts b/packages/zevm-app-contracts/scripts/uniswap/remove-liquidity-zeta-uniswap.ts index 3aa378c6..c32d44fe 100644 --- a/packages/zevm-app-contracts/scripts/uniswap/remove-liquidity-zeta-uniswap.ts +++ b/packages/zevm-app-contracts/scripts/uniswap/remove-liquidity-zeta-uniswap.ts @@ -19,7 +19,7 @@ import { getChainId, getSystemContractAddress } from "../address.helpers"; import { getNow, printReserves, sortPair } from "./uniswap.helpers"; const networkName = network.name; -const SYSTEM_CONTRACT = getSystemContractAddress(); +const SYSTEM_CONTRACT = getSystemContractAddress(networkName); const removeTokenEthLiquidity = async ( tokenContract: ERC20, diff --git a/packages/zevm-app-contracts/scripts/uniswap/sell-token.ts b/packages/zevm-app-contracts/scripts/uniswap/sell-token.ts index 17097847..166687f1 100644 --- a/packages/zevm-app-contracts/scripts/uniswap/sell-token.ts +++ b/packages/zevm-app-contracts/scripts/uniswap/sell-token.ts @@ -16,7 +16,7 @@ import { getChainId, getSystemContractAddress } from "../address.helpers"; import { getNow, printReserves } from "./uniswap.helpers"; const networkName = network.name; -const SYSTEM_CONTRACT = getSystemContractAddress(); +const SYSTEM_CONTRACT = getSystemContractAddress(networkName); const BTC_TO_SELL = parseUnits("0", 8); const ETH_TO_SELL = parseUnits("0"); diff --git a/packages/zevm-app-contracts/scripts/uniswap/sell-zeta.ts b/packages/zevm-app-contracts/scripts/uniswap/sell-zeta.ts index 0a3b4a52..a3ba3c23 100644 --- a/packages/zevm-app-contracts/scripts/uniswap/sell-zeta.ts +++ b/packages/zevm-app-contracts/scripts/uniswap/sell-zeta.ts @@ -15,7 +15,7 @@ import { getChainId, getSystemContractAddress } from "../address.helpers"; import { getNow, printReserves } from "./uniswap.helpers"; const networkName = network.name; -const SYSTEM_CONTRACT = getSystemContractAddress(); +const SYSTEM_CONTRACT = getSystemContractAddress(networkName); const ZETA_TO_SELL = parseUnits("0.001"); diff --git a/packages/zevm-app-contracts/scripts/withdrawERC20/deploy.ts b/packages/zevm-app-contracts/scripts/withdrawERC20/deploy.ts index 2680458a..84ba6b55 100644 --- a/packages/zevm-app-contracts/scripts/withdrawERC20/deploy.ts +++ b/packages/zevm-app-contracts/scripts/withdrawERC20/deploy.ts @@ -1,4 +1,5 @@ import { isProtocolNetworkName } from "@zetachain/protocol-contracts"; +import { BigNumber } from "ethers"; import { ethers, network } from "hardhat"; import { WithdrawERC20__factory } from "../../typechain-types/factories/contracts/withdrawErc20/withdrawErc20.sol"; @@ -6,7 +7,7 @@ import { getSystemContractAddress, saveAddress } from "../address.helpers"; const networkName = network.name; -const SYSTEM_CONTRACT = getSystemContractAddress(); +const SYSTEM_CONTRACT = getSystemContractAddress(networkName); async function main() { if (!isProtocolNetworkName(networkName)) throw new Error("Invalid network name"); diff --git a/packages/zevm-app-contracts/scripts/withdrawERC20/withdraw.ts b/packages/zevm-app-contracts/scripts/withdrawERC20/withdraw.ts index a74413b4..38634cce 100644 --- a/packages/zevm-app-contracts/scripts/withdrawERC20/withdraw.ts +++ b/packages/zevm-app-contracts/scripts/withdrawERC20/withdraw.ts @@ -7,14 +7,14 @@ import { getZEVMAppAddress } from "../address.helpers"; const networkName = network.name; -const ZUSDC_ADDRESS = "0x0cbe0dF132a6c6B4a2974Fa1b7Fb953CF0Cc798a"; -const AMOUNT = ethers.utils.parseUnits("0.5", 6); +const ZUSDC_ADDRESS = "0x05BA149A7bd6dC1F937fA9046A9e05C05f3b18b0"; +const AMOUNT = ethers.utils.parseUnits("0.5", 18); async function main() { if (!isProtocolNetworkName(networkName)) throw new Error("Invalid network name"); const [signer] = await ethers.getSigners(); - const withdrawERC20Address = getZEVMAppAddress("withdrawERC20"); + const withdrawERC20Address = getZEVMAppAddress("withdrawERC20", networkName); const WithdrawERC20Factory = (await ethers.getContractFactory("WithdrawERC20")) as WithdrawERC20__factory; const WithdrawERC20 = WithdrawERC20Factory.attach(withdrawERC20Address); @@ -22,7 +22,14 @@ async function main() { const ERC20Factory = (await ethers.getContractFactory("ERC20")) as ERC20__factory; const erc20 = ERC20Factory.attach(ZUSDC_ADDRESS); - await erc20.approve(WithdrawERC20.address, AMOUNT); + const balance = await erc20.balanceOf(signer.address); + + if (balance.lt(AMOUNT)) { + console.log(`Not enough balance to withdraw ${AMOUNT}`); + process.exit(1); + } + const t1 = await erc20.approve(WithdrawERC20.address, AMOUNT); + await t1.wait(); const tx = await WithdrawERC20.withdraw(erc20.address, AMOUNT, signer.address); console.log(`Sending transaction ${tx.hash}`); } diff --git a/packages/zevm-app-contracts/scripts/zeta-swap/deploy.ts b/packages/zevm-app-contracts/scripts/zeta-swap/deploy.ts index 85e7affe..d8f4a548 100644 --- a/packages/zevm-app-contracts/scripts/zeta-swap/deploy.ts +++ b/packages/zevm-app-contracts/scripts/zeta-swap/deploy.ts @@ -10,7 +10,7 @@ const main = async () => { if (!isProtocolNetworkName(networkName)) throw new Error("Invalid network name"); console.log(`Deploying ZetaSwap...`); - const SYSTEM_CONTRACT = getSystemContractAddress(); + const SYSTEM_CONTRACT = getSystemContractAddress(networkName); const Factory = (await ethers.getContractFactory("ZetaSwap")) as ZetaSwap__factory; const contract = (await Factory.deploy(SYSTEM_CONTRACT)) as ZetaSwap; diff --git a/packages/zevm-app-contracts/scripts/zeta-swap/get-system-data.ts b/packages/zevm-app-contracts/scripts/zeta-swap/get-system-data.ts index ccc303cc..a962caa5 100644 --- a/packages/zevm-app-contracts/scripts/zeta-swap/get-system-data.ts +++ b/packages/zevm-app-contracts/scripts/zeta-swap/get-system-data.ts @@ -1,9 +1,11 @@ import { ZetaProtocolNetwork } from "@zetachain/protocol-contracts"; -import { ethers } from "hardhat"; +import { ethers, network } from "hardhat"; import { SystemContract, SystemContract__factory } from "../../typechain-types"; import { getChainId, getGasSymbolByNetwork, getSystemContractAddress } from "../address.helpers"; +const networkName = network.name; + const getZRC20Address = async (systemContract: SystemContract, network: ZetaProtocolNetwork) => { const tokenAddress = await systemContract.gasCoinZRC20ByChainId(getChainId(network)); console.log(`${getGasSymbolByNetwork(network)}`, tokenAddress); @@ -13,7 +15,7 @@ const getZRC20Address = async (systemContract: SystemContract, network: ZetaProt async function main() { const [deployer] = await ethers.getSigners(); - const SYSTEM_CONTRACT = getSystemContractAddress(); + const SYSTEM_CONTRACT = getSystemContractAddress(networkName); console.log(`SYSTEM CONTRACT:`, SYSTEM_CONTRACT); const systemContract = await SystemContract__factory.connect(SYSTEM_CONTRACT, deployer); diff --git a/packages/zevm-app-contracts/scripts/zeta-swap/stress-swap.ts b/packages/zevm-app-contracts/scripts/zeta-swap/stress-swap.ts index 6ea9127b..1afecbb3 100644 --- a/packages/zevm-app-contracts/scripts/zeta-swap/stress-swap.ts +++ b/packages/zevm-app-contracts/scripts/zeta-swap/stress-swap.ts @@ -65,7 +65,7 @@ const main = async () => { const [signer] = await ethers.getSigners(); - const zetaSwapAddress = getZEVMAppAddress("zetaSwap"); + const zetaSwapAddress = getZEVMAppAddress("zetaSwap", networkName); const tssAddress = getAddress("tss", swappableNetwork); diff --git a/packages/zevm-app-contracts/scripts/zeta-swap/swap-on-zevm.ts b/packages/zevm-app-contracts/scripts/zeta-swap/swap-on-zevm.ts index 82e9ed29..0b8e29e3 100644 --- a/packages/zevm-app-contracts/scripts/zeta-swap/swap-on-zevm.ts +++ b/packages/zevm-app-contracts/scripts/zeta-swap/swap-on-zevm.ts @@ -16,7 +16,7 @@ const main = async () => { if (!isProtocolNetworkName(networkName)) throw new Error("Invalid network name"); const [signer] = await ethers.getSigners(); - const zetaSwap = getZEVMAppAddress(USE_BTC_SWAP ? "zetaSwapBtcInbound" : "zetaSwap"); + const zetaSwap = getZEVMAppAddress(USE_BTC_SWAP ? "zetaSwapBtcInbound" : "zetaSwap", networkName); const amount = parseUnits("0.00001", 8); const sourceToken = getZRC20Address("btc_testnet"); diff --git a/packages/zevm-app-contracts/scripts/zeta-swap/swap.ts b/packages/zevm-app-contracts/scripts/zeta-swap/swap.ts index 2a5ced1b..666977b8 100644 --- a/packages/zevm-app-contracts/scripts/zeta-swap/swap.ts +++ b/packages/zevm-app-contracts/scripts/zeta-swap/swap.ts @@ -6,6 +6,8 @@ import { ethers, network } from "hardhat"; import { getZEVMAppAddress } from "../address.helpers"; import { getSwapData } from "./helpers"; +const networkName = network.name; + const main = async () => { if (!isProtocolNetworkName(network.name)) throw new Error("Invalid network name"); @@ -16,7 +18,7 @@ const main = async () => { const [signer] = await ethers.getSigners(); - const zetaSwapAddress = getZEVMAppAddress("zetaSwap"); + const zetaSwapAddress = getZEVMAppAddress("zetaSwap", networkName); const tssAddress = getAddress("tss", network.name); diff --git a/packages/zevm-app-contracts/temp.json b/packages/zevm-app-contracts/temp.json new file mode 100644 index 00000000..97f17883 --- /dev/null +++ b/packages/zevm-app-contracts/temp.json @@ -0,0 +1,1055 @@ +[ + { + "inputs": [ + { + "internalType": "address", + "name": "_owner", + "type": "address" + }, + { + "internalType": "address", + "name": "_treasuryConfiguration", + "type": "address" + }, + { + "internalType": "uint256", + "name": "_maxLimit", + "type": "uint256" + }, + { + "internalType": "bool", + "name": "_guardOn", + "type": "bool" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "clone", + "type": "address" + }, + { + "indexed": false, + "internalType": "string", + "name": "oldBaseDescriptionURI", + "type": "string" + }, + { + "indexed": false, + "internalType": "string", + "name": "newBaseDescriptionURI", + "type": "string" + } + ], + "name": "BaseDescriptionURISet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "factory", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "clone", + "type": "address" + } + ], + "name": "CloneDeployed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "clone", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "implementation", + "type": "address" + } + ], + "name": "EditionsDeployed", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "bool", + "name": "guard", + "type": "bool" + } + ], + "name": "FactoryGuardSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "factory", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "oldImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "FactoryImplementationSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "factory", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newLimit", + "type": "uint256" + } + ], + "name": "FactoryLimitSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "clone", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "oldFundingRecipient", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newFundingRecipient", + "type": "address" + } + ], + "name": "FundingRecipientSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "oldImplementation", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newImplementation", + "type": "address" + } + ], + "name": "NewImplementation", + "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": "address", + "name": "clone", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newLimit", + "type": "uint256" + } + ], + "name": "PriceSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "clone", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "renderer", + "type": "address" + } + ], + "name": "RendererSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "clone", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "oldRoyaltyRecipient", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldRoyaltyBPS", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "newRoyaltyRecipient", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newRoyaltyBPS", + "type": "uint256" + } + ], + "name": "RoyaltyChange", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "clone", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "factory", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "clone", + "type": "address" + }, + { + "indexed": false, + "internalType": "address", + "name": "oldTributary", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "newTributary", + "type": "address" + } + ], + "name": "TributarySet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "clone", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "oldLimit", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "newLimit", + "type": "uint256" + } + ], + "name": "WritingEditionLimitSet", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "clone", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "indexed": true, + "internalType": "address", + "name": "recipient", + "type": "address" + }, + { + "indexed": false, + "internalType": "uint256", + "name": "price", + "type": "uint256" + }, + { + "indexed": false, + "internalType": "string", + "name": "message", + "type": "string" + } + ], + "name": "WritingEditionPurchased", + "type": "event" + }, + { + "inputs": [], + "name": "CREATE_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "DOMAIN_SEPARATOR", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "VERSION", + "outputs": [ + { + "internalType": "uint8", + "name": "", + "type": "uint8" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "acceptOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "baseDescriptionURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "cancelOwnershipTransfer", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "components": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "internalType": "string", + "name": "imageURI", + "type": "string" + }, + { + "internalType": "string", + "name": "contentURI", + "type": "string" + }, + { + "internalType": "uint256", + "name": "price", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "limit", + "type": "uint256" + }, + { + "internalType": "address", + "name": "fundingRecipient", + "type": "address" + }, + { + "internalType": "address", + "name": "renderer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint16", + "name": "fee", + "type": "uint16" + } + ], + "internalType": "struct IWritingEditions.WritingEdition", + "name": "edition", + "type": "tuple" + } + ], + "name": "create", + "outputs": [ + { + "internalType": "address", + "name": "clone", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "components": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "internalType": "string", + "name": "imageURI", + "type": "string" + }, + { + "internalType": "string", + "name": "contentURI", + "type": "string" + }, + { + "internalType": "uint256", + "name": "price", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "limit", + "type": "uint256" + }, + { + "internalType": "address", + "name": "fundingRecipient", + "type": "address" + }, + { + "internalType": "address", + "name": "renderer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint16", + "name": "fee", + "type": "uint16" + } + ], + "internalType": "struct IWritingEditions.WritingEdition", + "name": "edition", + "type": "tuple" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + }, + { + "internalType": "address", + "name": "tokenRecipient", + "type": "address" + }, + { + "internalType": "string", + "name": "message", + "type": "string" + } + ], + "name": "createWithSignature", + "outputs": [ + { + "internalType": "address", + "name": "clone", + "type": "address" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "components": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "string", + "name": "description", + "type": "string" + }, + { + "internalType": "string", + "name": "imageURI", + "type": "string" + }, + { + "internalType": "string", + "name": "contentURI", + "type": "string" + }, + { + "internalType": "uint256", + "name": "price", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "limit", + "type": "uint256" + }, + { + "internalType": "address", + "name": "fundingRecipient", + "type": "address" + }, + { + "internalType": "address", + "name": "renderer", + "type": "address" + }, + { + "internalType": "uint256", + "name": "nonce", + "type": "uint256" + }, + { + "internalType": "uint16", + "name": "fee", + "type": "uint16" + } + ], + "internalType": "struct IWritingEditions.WritingEdition", + "name": "edition", + "type": "tuple" + } + ], + "name": "getSalt", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "guardOn", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "implementation", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isNextOwner", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "isOwner", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint8", + "name": "v", + "type": "uint8" + }, + { + "internalType": "bytes32", + "name": "r", + "type": "bytes32" + }, + { + "internalType": "bytes32", + "name": "s", + "type": "bytes32" + } + ], + "name": "isValid", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "maxLimit", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "o11y", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + } + ], + "name": "predictDeterministicAddress", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "clone", + "type": "address" + }, + { + "internalType": "address", + "name": "tokenRecipient", + "type": "address" + }, + { + "internalType": "string", + "name": "message", + "type": "string" + } + ], + "name": "purchaseThroughFactory", + "outputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "stateMutability": "payable", + "type": "function" + }, + { + "inputs": [], + "name": "renounceOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "name": "salts", + "outputs": [ + { + "internalType": "bool", + "name": "", + "type": "bool" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "bool", + "name": "_guardOn", + "type": "bool" + } + ], + "name": "setGuard", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "_implementation", + "type": "address" + } + ], + "name": "setImplementation", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "_maxLimit", + "type": "uint256" + } + ], + "name": "setLimit", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "clone", + "type": "address" + }, + { + "internalType": "address", + "name": "_tributary", + "type": "address" + } + ], + "name": "setTributary", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "nextOwner_", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "treasuryConfiguration", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + } +] \ No newline at end of file From 502b3e2149000351ebd5bc3681d43f87df36e22f Mon Sep 17 00:00:00 2001 From: Andres Aiello Date: Mon, 25 Mar 2024 18:11:58 -0300 Subject: [PATCH 2/2] restore file --- packages/zevm-app-contracts/hardhat.config.ts | 7 - packages/zevm-app-contracts/temp.json | 1055 ----------------- 2 files changed, 1062 deletions(-) delete mode 100644 packages/zevm-app-contracts/temp.json diff --git a/packages/zevm-app-contracts/hardhat.config.ts b/packages/zevm-app-contracts/hardhat.config.ts index d117900f..f7a284e4 100644 --- a/packages/zevm-app-contracts/hardhat.config.ts +++ b/packages/zevm-app-contracts/hardhat.config.ts @@ -51,13 +51,6 @@ const config: HardhatUserConfig = { }, networks: { ...getHardhatConfigNetworks(), - // zeta_mainnet: { - // accounts: PRIVATE_KEYS, - // chainId: 7000, - // gas: 5000000, - // gasPrice: 80000000000, - // url: "https://zetachain-evm.blockpi.network/v1/rpc/public", - // }, }, solidity: { compilers: [ diff --git a/packages/zevm-app-contracts/temp.json b/packages/zevm-app-contracts/temp.json deleted file mode 100644 index 97f17883..00000000 --- a/packages/zevm-app-contracts/temp.json +++ /dev/null @@ -1,1055 +0,0 @@ -[ - { - "inputs": [ - { - "internalType": "address", - "name": "_owner", - "type": "address" - }, - { - "internalType": "address", - "name": "_treasuryConfiguration", - "type": "address" - }, - { - "internalType": "uint256", - "name": "_maxLimit", - "type": "uint256" - }, - { - "internalType": "bool", - "name": "_guardOn", - "type": "bool" - } - ], - "stateMutability": "nonpayable", - "type": "constructor" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "clone", - "type": "address" - }, - { - "indexed": false, - "internalType": "string", - "name": "oldBaseDescriptionURI", - "type": "string" - }, - { - "indexed": false, - "internalType": "string", - "name": "newBaseDescriptionURI", - "type": "string" - } - ], - "name": "BaseDescriptionURISet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "factory", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "clone", - "type": "address" - } - ], - "name": "CloneDeployed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "clone", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "implementation", - "type": "address" - } - ], - "name": "EditionsDeployed", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": false, - "internalType": "bool", - "name": "guard", - "type": "bool" - } - ], - "name": "FactoryGuardSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "factory", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "FactoryImplementationSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "factory", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldLimit", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newLimit", - "type": "uint256" - } - ], - "name": "FactoryLimitSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "clone", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "oldFundingRecipient", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newFundingRecipient", - "type": "address" - } - ], - "name": "FundingRecipientSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "oldImplementation", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newImplementation", - "type": "address" - } - ], - "name": "NewImplementation", - "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": "address", - "name": "clone", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldLimit", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newLimit", - "type": "uint256" - } - ], - "name": "PriceSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "clone", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "renderer", - "type": "address" - } - ], - "name": "RendererSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "clone", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "oldRoyaltyRecipient", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldRoyaltyBPS", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "newRoyaltyRecipient", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newRoyaltyBPS", - "type": "uint256" - } - ], - "name": "RoyaltyChange", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "clone", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "from", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "to", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "name": "Transfer", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "factory", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "clone", - "type": "address" - }, - { - "indexed": false, - "internalType": "address", - "name": "oldTributary", - "type": "address" - }, - { - "indexed": true, - "internalType": "address", - "name": "newTributary", - "type": "address" - } - ], - "name": "TributarySet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "clone", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "oldLimit", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "newLimit", - "type": "uint256" - } - ], - "name": "WritingEditionLimitSet", - "type": "event" - }, - { - "anonymous": false, - "inputs": [ - { - "indexed": true, - "internalType": "address", - "name": "clone", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - }, - { - "indexed": true, - "internalType": "address", - "name": "recipient", - "type": "address" - }, - { - "indexed": false, - "internalType": "uint256", - "name": "price", - "type": "uint256" - }, - { - "indexed": false, - "internalType": "string", - "name": "message", - "type": "string" - } - ], - "name": "WritingEditionPurchased", - "type": "event" - }, - { - "inputs": [], - "name": "CREATE_TYPEHASH", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "DOMAIN_SEPARATOR", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "VERSION", - "outputs": [ - { - "internalType": "uint8", - "name": "", - "type": "uint8" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "acceptOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "baseDescriptionURI", - "outputs": [ - { - "internalType": "string", - "name": "", - "type": "string" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "cancelOwnershipTransfer", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "components": [ - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - }, - { - "internalType": "string", - "name": "imageURI", - "type": "string" - }, - { - "internalType": "string", - "name": "contentURI", - "type": "string" - }, - { - "internalType": "uint256", - "name": "price", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "limit", - "type": "uint256" - }, - { - "internalType": "address", - "name": "fundingRecipient", - "type": "address" - }, - { - "internalType": "address", - "name": "renderer", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint16", - "name": "fee", - "type": "uint16" - } - ], - "internalType": "struct IWritingEditions.WritingEdition", - "name": "edition", - "type": "tuple" - } - ], - "name": "create", - "outputs": [ - { - "internalType": "address", - "name": "clone", - "type": "address" - } - ], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "components": [ - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - }, - { - "internalType": "string", - "name": "imageURI", - "type": "string" - }, - { - "internalType": "string", - "name": "contentURI", - "type": "string" - }, - { - "internalType": "uint256", - "name": "price", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "limit", - "type": "uint256" - }, - { - "internalType": "address", - "name": "fundingRecipient", - "type": "address" - }, - { - "internalType": "address", - "name": "renderer", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint16", - "name": "fee", - "type": "uint16" - } - ], - "internalType": "struct IWritingEditions.WritingEdition", - "name": "edition", - "type": "tuple" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - }, - { - "internalType": "address", - "name": "tokenRecipient", - "type": "address" - }, - { - "internalType": "string", - "name": "message", - "type": "string" - } - ], - "name": "createWithSignature", - "outputs": [ - { - "internalType": "address", - "name": "clone", - "type": "address" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "components": [ - { - "internalType": "string", - "name": "name", - "type": "string" - }, - { - "internalType": "string", - "name": "symbol", - "type": "string" - }, - { - "internalType": "string", - "name": "description", - "type": "string" - }, - { - "internalType": "string", - "name": "imageURI", - "type": "string" - }, - { - "internalType": "string", - "name": "contentURI", - "type": "string" - }, - { - "internalType": "uint256", - "name": "price", - "type": "uint256" - }, - { - "internalType": "uint256", - "name": "limit", - "type": "uint256" - }, - { - "internalType": "address", - "name": "fundingRecipient", - "type": "address" - }, - { - "internalType": "address", - "name": "renderer", - "type": "address" - }, - { - "internalType": "uint256", - "name": "nonce", - "type": "uint256" - }, - { - "internalType": "uint16", - "name": "fee", - "type": "uint16" - } - ], - "internalType": "struct IWritingEditions.WritingEdition", - "name": "edition", - "type": "tuple" - } - ], - "name": "getSalt", - "outputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "guardOn", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "implementation", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "isNextOwner", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "isOwner", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "owner", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - }, - { - "internalType": "uint8", - "name": "v", - "type": "uint8" - }, - { - "internalType": "bytes32", - "name": "r", - "type": "bytes32" - }, - { - "internalType": "bytes32", - "name": "s", - "type": "bytes32" - } - ], - "name": "isValid", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "maxLimit", - "outputs": [ - { - "internalType": "uint256", - "name": "", - "type": "uint256" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "o11y", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [], - "name": "owner", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - }, - { - "internalType": "bytes32", - "name": "salt", - "type": "bytes32" - } - ], - "name": "predictDeterministicAddress", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "clone", - "type": "address" - }, - { - "internalType": "address", - "name": "tokenRecipient", - "type": "address" - }, - { - "internalType": "string", - "name": "message", - "type": "string" - } - ], - "name": "purchaseThroughFactory", - "outputs": [ - { - "internalType": "uint256", - "name": "tokenId", - "type": "uint256" - } - ], - "stateMutability": "payable", - "type": "function" - }, - { - "inputs": [], - "name": "renounceOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bytes32", - "name": "", - "type": "bytes32" - } - ], - "name": "salts", - "outputs": [ - { - "internalType": "bool", - "name": "", - "type": "bool" - } - ], - "stateMutability": "view", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "bool", - "name": "_guardOn", - "type": "bool" - } - ], - "name": "setGuard", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "_implementation", - "type": "address" - } - ], - "name": "setImplementation", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "uint256", - "name": "_maxLimit", - "type": "uint256" - } - ], - "name": "setLimit", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "clone", - "type": "address" - }, - { - "internalType": "address", - "name": "_tributary", - "type": "address" - } - ], - "name": "setTributary", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [ - { - "internalType": "address", - "name": "nextOwner_", - "type": "address" - } - ], - "name": "transferOwnership", - "outputs": [], - "stateMutability": "nonpayable", - "type": "function" - }, - { - "inputs": [], - "name": "treasuryConfiguration", - "outputs": [ - { - "internalType": "address", - "name": "", - "type": "address" - } - ], - "stateMutability": "view", - "type": "function" - } -] \ No newline at end of file