From 71844db1548e4a4926f24427ee6fbe2231f610ee Mon Sep 17 00:00:00 2001 From: Sunnesoft Date: Sat, 13 Sep 2025 09:16:34 +0200 Subject: [PATCH 1/6] added automation scripts --- .gitignore | 2 +- Makefile | 149 +++++++++++++++++++++++++ deploy/constants/access-token-owner.js | 5 + deploy/constants/access-token-salt.js | 5 + deploy/constants/create3-deployer.js | 19 ++++ deploy/constants/index.js | 11 ++ deploy/deploy-kyc-nft.js | 43 ++++--- 7 files changed, 217 insertions(+), 17 deletions(-) create mode 100644 Makefile create mode 100644 deploy/constants/access-token-owner.js create mode 100644 deploy/constants/access-token-salt.js create mode 100644 deploy/constants/create3-deployer.js create mode 100644 deploy/constants/index.js diff --git a/.gitignore b/.gitignore index 35ba3bc2..ca80c6e8 100644 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,4 @@ coverage.json .idea -.env +.env* diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..76993ce6 --- /dev/null +++ b/Makefile @@ -0,0 +1,149 @@ +# Conditionally include .env or .env.automation based on OPS_LAUNCH_MODE +ifeq ($(OPS_LAUNCH_MODE),auto) +-include .env.automation +else +-include .env +endif + +CURRENT_DIR=$(shell pwd) + +OPS_NETWORK_=$(shell echo "$(OPS_NETWORK)" | tr -d '\"') +OPS_CHAIN_ID_=$(shell echo "$(OPS_CHAIN_ID)" | tr -d '\"') + +FILE_DEPLOY_KYC_NFT=$(CURRENT_DIR)/deploy/deploy-kyc-nft.js +FILE_CREATE3_DEPLOYER=$(CURRENT_DIR)/deploy/constants/create3-deployer.js +FILE_ACCESS_TOKEN_OWNER=$(CURRENT_DIR)/deploy/constants/access-token-owner.js +FILE_ACCESS_TOKEN_SALT=$(CURRENT_DIR)/deploy/constants/access-token-salt.js + +# New access token deployment targets +deploy-access-token: + @$(MAKE) OPS_CURRENT_DEP_FILE=$(FILE_DEPLOY_KYC_NFT) validate-access-token deploy-skip-all deploy-noskip deploy-access-token-impl deploy-skip + +deploy-access-token-impl: + @{ \ + yarn deploy $(OPS_NETWORK_) || exit 1; \ + } + +# Validation targets +validate-access-token: + @{ \ + if [ -z "$(OPS_NETWORK_)" ]; then echo "OPS_NETWORK is not set!"; exit 1; fi; \ + if [ -z "$(OPS_CHAIN_ID_)" ]; then echo "OPS_CHAIN_ID is not set!"; exit 1; fi; \ + if [ -z "$(OPS_CREATE3_DEPLOYER_ADDRESS)" ] && [ "$(OPS_CHAIN_ID_)" != 324 ]; then echo "OPS_CREATE3_DEPLOYER_ADDRESS is not set!"; exit 1; fi; \ + if [ -z "$(MAINNET_RPC_URL)" ] && [ "$(OPS_NETWORK_)" = "hardhat" ]; then echo "MAINNET_RPC_URL is not set!"; exit 1; fi; \ + if [ -z "$(OPS_KYC_TOKEN_OWNER_ADDRESS)" ]; then echo "OPS_KYC_TOKEN_OWNER_ADDRESS is not set!"; exit 1; fi; \ + if [ -z "$(OPS_KYC_TOKEN_SALT)" ]; then echo "OPS_KYC_TOKEN_SALT is not set!"; exit 1; fi; \ + $(MAKE) process-access-token-owner process-access-token-salt process-create3-deployer; \ + } + +# Process constant functions for new addresses +process-access-token-owner: + @$(MAKE) OPS_GEN_VAL='$(OPS_KYC_TOKEN_OWNER_ADDRESS)' OPS_GEN_FILE=$(FILE_ACCESS_TOKEN_OWNER) upsert-constant + +process-access-token-salt: + @$(MAKE) OPS_GEN_VAL='$(OPS_KYC_TOKEN_SALT)' OPS_GEN_FILE=$(FILE_ACCESS_TOKEN_SALT) upsert-constant + +process-create3-deployer: + @{ \ + if [ -n "$(OPS_CREATE3_DEPLOYER_ADDRESS)" ]; then \ + $(MAKE) OPS_GEN_VAL='$(OPS_CREATE3_DEPLOYER_ADDRESS)' OPS_GEN_FILE=$(FILE_CREATE3_DEPLOYER) upsert-constant; \ + fi \ + } + +upsert-constant: + @{ \ + if [ -z "$(OPS_GEN_VAL)" ]; then \ + echo "variable for file $(OPS_GEN_FILE) is not set!"; \ + exit 1; \ + fi; \ + if grep -q "$(OPS_CHAIN_ID_)" $(OPS_GEN_FILE); then \ + sed -i '' 's|$(OPS_CHAIN_ID_): .*|$(OPS_CHAIN_ID_): $(OPS_GEN_VAL),|' $(OPS_GEN_FILE); \ + sed -i '' 's/"/'\''/g' $(OPS_GEN_FILE); \ + else \ + tmpfile=$$(mktemp); \ + awk '1;/module.exports = {/{print " $(OPS_CHAIN_ID_): $(subst ",\",$(OPS_GEN_VAL)),"}' $(OPS_GEN_FILE) > $$tmpfile && sed -i '' 's/"/'\''/g' $$tmpfile && mv $$tmpfile $(OPS_GEN_FILE); \ + fi \ + } + +deploy-skip-all: + @{ \ + for secret in $(FILE_DEPLOY); do \ + $(MAKE) OPS_CURRENT_DEP_FILE=$$secret deploy-skip; \ + done \ + } + +deploy-skip: + @sed -i '' 's/module.exports.skip.*/module.exports.skip = async () => true;/g' $(OPS_CURRENT_DEP_FILE) + +deploy-noskip: + @sed -i '' 's/module.exports.skip.*/module.exports.skip = async () => false;/g' $(OPS_CURRENT_DEP_FILE) + +launch-hh-node: + @{ \ + if [ -z "$(NODE_RPC)" ]; then \ + echo "NODE_RPC is not set!"; \ + exit 1; \ + fi; \ + echo "Launching Hardhat node with RPC: $(NODE_RPC)"; \ + npx hardhat node --fork $(NODE_RPC) --vvvv --full-trace; \ + } + +install: install-utils install-dependencies + +install-utils: + brew install yarn wget + +install-dependencies: + yarn + +clean: + @rm -Rf $(CURRENT_DIR)/deployments/$(OPS_NETWORK_)/* + + +# Get deployed contract addresses from deployment files +get: + @{ \ + if [ -z "$(PARAMETER)" ]; then \ + echo "Error: PARAMETER is not set. Usage: make get PARAMETER=OPS_AGGREGATION_EXECUTOR_SIMPLE_ADDRESS"; \ + exit 1; \ + fi; \ + if [ -z "$(OPS_NETWORK_)" ]; then \ + echo "Error: OPS_NETWORK_ is not set"; \ + exit 1; \ + fi; \ + CONTRACT_FILE=""; \ + case "$(PARAMETER)" in \ + "OPS_KYC_TOKEN_ADDRESS") CONTRACT_FILE="KycNFT.json" ;; \ + *) echo "Error: Unknown parameter $(PARAMETER)"; exit 1 ;; \ + esac; \ + DEPLOYMENT_FILE="$(CURRENT_DIR)/deployments/$(OPS_NETWORK_)/$$CONTRACT_FILE"; \ + if [ ! -f "$$DEPLOYMENT_FILE" ]; then \ + echo "Error: Deployment file $$DEPLOYMENT_FILE not found"; \ + exit 1; \ + fi; \ + ADDRESS=$$(cat "$$DEPLOYMENT_FILE" | grep '"address"' | head -1 | sed 's/.*"address": *"\([^"]*\)".*/\1/'); \ + echo "$$ADDRESS"; \ + } + +help: + @echo "Available targets:" + @echo " deploy-access-token Deploy access token contracts" + @echo " deploy-access-token-impl Deploy access token implementation" + @echo " validate-access-token Validate required environment variables" + @echo " process-access-token-owner Update access token owner constant" + @echo " process-access-token-salt Update access token salt constant" + @echo " process-create3-deployer Update create3 deployer constant" + @echo " upsert-constant Upsert constant value in JS file" + @echo " deploy-skip-all Mark all deploy files as skipped" + @echo " deploy-skip Mark current deploy file as skipped" + @echo " deploy-noskip Mark current deploy file as not skipped" + @echo " launch-hh-node Launch Hardhat node with forked RPC" + @echo " install Install utils and dependencies" + @echo " install-utils Install required utilities" + @echo " install-dependencies Install yarn dependencies" + @echo " clean Remove deployment files" + @echo " get PARAMETER=... Get deployed contract address" + @echo " help Show this help message" + + +.PHONY: help deploy-access-token deploy-access-token-impl validate-access-token process-access-token-owner process-access-token-salt process-create3-deployer upsert-constant deploy-skip-all deploy-skip deploy-noskip launch-hh-node install install-utils install-dependencies clean get diff --git a/deploy/constants/access-token-owner.js b/deploy/constants/access-token-owner.js new file mode 100644 index 00000000..f1ded63f --- /dev/null +++ b/deploy/constants/access-token-owner.js @@ -0,0 +1,5 @@ +module.exports = { + 31337: '0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF', +}; + +module.exports.skip = async () => true; diff --git a/deploy/constants/access-token-salt.js b/deploy/constants/access-token-salt.js new file mode 100644 index 00000000..20eae5aa --- /dev/null +++ b/deploy/constants/access-token-salt.js @@ -0,0 +1,5 @@ +module.exports = { + 31337: '0xfd0450e10366502b67f46a6037db5b90d1cad2d4a744b961f7986bf35f4d35d7', +}; + +module.exports.skip = async () => true; diff --git a/deploy/constants/create3-deployer.js b/deploy/constants/create3-deployer.js new file mode 100644 index 00000000..151fccd2 --- /dev/null +++ b/deploy/constants/create3-deployer.js @@ -0,0 +1,19 @@ +module.exports = { + 31337: '0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65', + 1: '0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65', // Mainnet + 56: '0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65', // BSC + 137: '0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65', // Matic + 42161: '0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65', // Arbitrum + 10: '0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65', // Optimistic + 43114: '0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65', // Avalanche + 100: '0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65', // xDAI + 250: '0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65', // FTM + 1313161554: '0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65', // Aurora + 8217: '0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65', // Klaytn + 8453: '0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65', // Base + 59144: '0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65', // Linea + 146: '0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65', // Sonic + 130: '0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65', // Unichain +}; + +module.exports.skip = async () => true; diff --git a/deploy/constants/index.js b/deploy/constants/index.js new file mode 100644 index 00000000..e9f12812 --- /dev/null +++ b/deploy/constants/index.js @@ -0,0 +1,11 @@ +const ACCESS_TOKEN_SALT = require('./access-token-salt'); +const ACCESS_TOKEN_OWNER = require('./access-token-owner'); +const CREATE3_DEPLOYERS = require('./create3-deployer'); + +module.exports = { + ACCESS_TOKEN_SALT, + ACCESS_TOKEN_OWNER, + CREATE3_DEPLOYERS, +}; + +module.exports.skip = async () => true; diff --git a/deploy/deploy-kyc-nft.js b/deploy/deploy-kyc-nft.js index 57eb5a09..4ea61d6a 100644 --- a/deploy/deploy-kyc-nft.js +++ b/deploy/deploy-kyc-nft.js @@ -1,20 +1,31 @@ -const { getChainId, network } = require('hardhat'); +const hre = require('hardhat'); const { deployAndGetContractWithCreate3, deployAndGetContract } = require('@1inch/solidity-utils'); +const constants = require('./constants'); -const constructorArgs = [ - 'Resolver Access Token', // name - 'RES', // symbol - '1', // version - '0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF', // owner -]; -const create3Deployer = '0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65'; -const salt = '0xfd0450e10366502b67f46a6037db5b90d1cad2d4a744b961f7986bf35f4d35d7'; +const AT_NAME = 'Resolver Access Token'; +const AT_SYMBOL = 'RES'; +const AT_VERSION = '1'; module.exports = async ({ getNamedAccounts, deployments }) => { - console.log('running deploy script: kyc-nft'); - console.log('network id ', await getChainId()); + const networkName = hre.network.name; + console.log(`running ${networkName} deploy script: kyc-nft`); + const chainId = await hre.getChainId(); + console.log('network id ', chainId); + + if (chainId !== hre.config.networks[networkName].chainId.toString()) { + console.log(`network chain id: ${hre.config.networks[networkName].chainId}, your chain id ${chainId}`); + console.log('skipping wrong chain id deployment'); + return; + } + + const constructorArgs = [ + AT_NAME, + AT_SYMBOL, + AT_VERSION, + constants.ACCESS_TOKEN_OWNER[chainId], + ]; - if (network.name.indexOf('zksync') !== -1) { + if (networkName.indexOf('zksync') !== -1) { // Deploy on zkSync-like networks without create3 const { deployer } = await getNamedAccounts(); await deployAndGetContract({ @@ -28,12 +39,12 @@ module.exports = async ({ getNamedAccounts, deployments }) => { await deployAndGetContractWithCreate3({ contractName: 'KycNFT', constructorArgs, - create3Deployer, - salt, + create3Deployer: constants.CREATE3_DEPLOYERS[chainId], + salt: constants.ACCESS_TOKEN_SALT[chainId], deployments, - skipVerify: network.name === 'klaytn', + skipVerify: networkName === 'klaytn', }); } }; -module.exports.skip = async () => true; +module.exports.skip = async () => false; From ad3cf26e71ac64622e12ec9ddc83bccbee695d32 Mon Sep 17 00:00:00 2001 From: Sunnesoft Date: Sat, 13 Sep 2025 09:30:25 +0200 Subject: [PATCH 2/6] fixed skip all --- Makefile | 2 +- deploy/deploy-kyc-nft.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 76993ce6..f18751e4 100644 --- a/Makefile +++ b/Makefile @@ -67,7 +67,7 @@ upsert-constant: deploy-skip-all: @{ \ - for secret in $(FILE_DEPLOY); do \ + for secret in $(FILE_DEPLOY_KYC_NFT); do \ $(MAKE) OPS_CURRENT_DEP_FILE=$$secret deploy-skip; \ done \ } diff --git a/deploy/deploy-kyc-nft.js b/deploy/deploy-kyc-nft.js index 4ea61d6a..065cd658 100644 --- a/deploy/deploy-kyc-nft.js +++ b/deploy/deploy-kyc-nft.js @@ -47,4 +47,4 @@ module.exports = async ({ getNamedAccounts, deployments }) => { } }; -module.exports.skip = async () => false; +module.exports.skip = async () => true; From 7d558e9df783bf1ba8a07fc3b75e041742904d5a Mon Sep 17 00:00:00 2001 From: Sunnesoft Date: Mon, 22 Sep 2025 17:03:32 +0200 Subject: [PATCH 3/6] added suffix to deployment name; fixed Makefile --- Makefile | 39 ++++++++++++++++++++------------------- deploy/deploy-kyc-nft.js | 8 ++++++-- hardhat.config.js | 3 +++ 3 files changed, 29 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index f18751e4..4a088029 100644 --- a/Makefile +++ b/Makefile @@ -4,16 +4,17 @@ ifeq ($(OPS_LAUNCH_MODE),auto) else -include .env endif +export -CURRENT_DIR=$(shell pwd) +OPS_NETWORK := $(subst ",,$(OPS_NETWORK)) +OPS_CHAIN_ID := $(subst ",,$(OPS_CHAIN_ID)) -OPS_NETWORK_=$(shell echo "$(OPS_NETWORK)" | tr -d '\"') -OPS_CHAIN_ID_=$(shell echo "$(OPS_CHAIN_ID)" | tr -d '\"') +CURRENT_DIR := $(shell pwd) -FILE_DEPLOY_KYC_NFT=$(CURRENT_DIR)/deploy/deploy-kyc-nft.js -FILE_CREATE3_DEPLOYER=$(CURRENT_DIR)/deploy/constants/create3-deployer.js -FILE_ACCESS_TOKEN_OWNER=$(CURRENT_DIR)/deploy/constants/access-token-owner.js -FILE_ACCESS_TOKEN_SALT=$(CURRENT_DIR)/deploy/constants/access-token-salt.js +FILE_DEPLOY_KYC_NFT := $(CURRENT_DIR)/deploy/deploy-kyc-nft.js +FILE_CREATE3_DEPLOYER := $(CURRENT_DIR)/deploy/constants/create3-deployer.js +FILE_ACCESS_TOKEN_OWNER := $(CURRENT_DIR)/deploy/constants/access-token-owner.js +FILE_ACCESS_TOKEN_SALT := $(CURRENT_DIR)/deploy/constants/access-token-salt.js # New access token deployment targets deploy-access-token: @@ -21,16 +22,16 @@ deploy-access-token: deploy-access-token-impl: @{ \ - yarn deploy $(OPS_NETWORK_) || exit 1; \ + yarn deploy $(OPS_NETWORK) || exit 1; \ } # Validation targets validate-access-token: @{ \ - if [ -z "$(OPS_NETWORK_)" ]; then echo "OPS_NETWORK is not set!"; exit 1; fi; \ - if [ -z "$(OPS_CHAIN_ID_)" ]; then echo "OPS_CHAIN_ID is not set!"; exit 1; fi; \ - if [ -z "$(OPS_CREATE3_DEPLOYER_ADDRESS)" ] && [ "$(OPS_CHAIN_ID_)" != 324 ]; then echo "OPS_CREATE3_DEPLOYER_ADDRESS is not set!"; exit 1; fi; \ - if [ -z "$(MAINNET_RPC_URL)" ] && [ "$(OPS_NETWORK_)" = "hardhat" ]; then echo "MAINNET_RPC_URL is not set!"; exit 1; fi; \ + if [ -z "$(OPS_NETWORK)" ]; then echo "OPS_NETWORK is not set!"; exit 1; fi; \ + if [ -z "$(OPS_CHAIN_ID)" ]; then echo "OPS_CHAIN_ID is not set!"; exit 1; fi; \ + if [ -z "$(OPS_CREATE3_DEPLOYER_ADDRESS)" ] && [ "$(OPS_CHAIN_ID)" != 324 ]; then echo "OPS_CREATE3_DEPLOYER_ADDRESS is not set!"; exit 1; fi; \ + if [ -z "$(MAINNET_RPC_URL)" ] && [ "$(OPS_NETWORK)" = "hardhat" ]; then echo "MAINNET_RPC_URL is not set!"; exit 1; fi; \ if [ -z "$(OPS_KYC_TOKEN_OWNER_ADDRESS)" ]; then echo "OPS_KYC_TOKEN_OWNER_ADDRESS is not set!"; exit 1; fi; \ if [ -z "$(OPS_KYC_TOKEN_SALT)" ]; then echo "OPS_KYC_TOKEN_SALT is not set!"; exit 1; fi; \ $(MAKE) process-access-token-owner process-access-token-salt process-create3-deployer; \ @@ -56,12 +57,12 @@ upsert-constant: echo "variable for file $(OPS_GEN_FILE) is not set!"; \ exit 1; \ fi; \ - if grep -q "$(OPS_CHAIN_ID_)" $(OPS_GEN_FILE); then \ - sed -i '' 's|$(OPS_CHAIN_ID_): .*|$(OPS_CHAIN_ID_): $(OPS_GEN_VAL),|' $(OPS_GEN_FILE); \ + if grep -q "$(OPS_CHAIN_ID)" $(OPS_GEN_FILE); then \ + sed -i '' 's|$(OPS_CHAIN_ID): .*|$(OPS_CHAIN_ID): $(OPS_GEN_VAL),|' $(OPS_GEN_FILE); \ sed -i '' 's/"/'\''/g' $(OPS_GEN_FILE); \ else \ tmpfile=$$(mktemp); \ - awk '1;/module.exports = {/{print " $(OPS_CHAIN_ID_): $(subst ",\",$(OPS_GEN_VAL)),"}' $(OPS_GEN_FILE) > $$tmpfile && sed -i '' 's/"/'\''/g' $$tmpfile && mv $$tmpfile $(OPS_GEN_FILE); \ + awk '1;/module.exports = {/{print " $(OPS_CHAIN_ID): $(subst ",\",$(OPS_GEN_VAL)),"}' $(OPS_GEN_FILE) > $$tmpfile && sed -i '' 's/"/'\''/g' $$tmpfile && mv $$tmpfile $(OPS_GEN_FILE); \ fi \ } @@ -97,7 +98,7 @@ install-dependencies: yarn clean: - @rm -Rf $(CURRENT_DIR)/deployments/$(OPS_NETWORK_)/* + @rm -Rf $(CURRENT_DIR)/deployments/$(OPS_NETWORK)/* # Get deployed contract addresses from deployment files @@ -107,8 +108,8 @@ get: echo "Error: PARAMETER is not set. Usage: make get PARAMETER=OPS_AGGREGATION_EXECUTOR_SIMPLE_ADDRESS"; \ exit 1; \ fi; \ - if [ -z "$(OPS_NETWORK_)" ]; then \ - echo "Error: OPS_NETWORK_ is not set"; \ + if [ -z "$(OPS_NETWORK)" ]; then \ + echo "Error: OPS_NETWORK is not set"; \ exit 1; \ fi; \ CONTRACT_FILE=""; \ @@ -116,7 +117,7 @@ get: "OPS_KYC_TOKEN_ADDRESS") CONTRACT_FILE="KycNFT.json" ;; \ *) echo "Error: Unknown parameter $(PARAMETER)"; exit 1 ;; \ esac; \ - DEPLOYMENT_FILE="$(CURRENT_DIR)/deployments/$(OPS_NETWORK_)/$$CONTRACT_FILE"; \ + DEPLOYMENT_FILE="$(CURRENT_DIR)/deployments/$(OPS_NETWORK)/$$CONTRACT_FILE"; \ if [ ! -f "$$DEPLOYMENT_FILE" ]; then \ echo "Error: Deployment file $$DEPLOYMENT_FILE not found"; \ exit 1; \ diff --git a/deploy/deploy-kyc-nft.js b/deploy/deploy-kyc-nft.js index 065cd658..9f93f5f4 100644 --- a/deploy/deploy-kyc-nft.js +++ b/deploy/deploy-kyc-nft.js @@ -6,13 +6,13 @@ const AT_NAME = 'Resolver Access Token'; const AT_SYMBOL = 'RES'; const AT_VERSION = '1'; -module.exports = async ({ getNamedAccounts, deployments }) => { +module.exports = async ({ getNamedAccounts, deployments, config }) => { const networkName = hre.network.name; console.log(`running ${networkName} deploy script: kyc-nft`); const chainId = await hre.getChainId(); console.log('network id ', chainId); - if (chainId !== hre.config.networks[networkName].chainId.toString()) { + if (chainId !== hre.config.networks[networkName].chainId?.toString()) { console.log(`network chain id: ${hre.config.networks[networkName].chainId}, your chain id ${chainId}`); console.log('skipping wrong chain id deployment'); return; @@ -25,11 +25,14 @@ module.exports = async ({ getNamedAccounts, deployments }) => { constants.ACCESS_TOKEN_OWNER[chainId], ]; + const deploymentName = config.deployOpts.kycTokenSuffix ? `KycNFT_${config.deployOpts.kycTokenSuffix}` : 'KycNFT'; + if (networkName.indexOf('zksync') !== -1) { // Deploy on zkSync-like networks without create3 const { deployer } = await getNamedAccounts(); await deployAndGetContract({ contractName: 'KycNFT', + deploymentName, constructorArgs, deployments, deployer, @@ -38,6 +41,7 @@ module.exports = async ({ getNamedAccounts, deployments }) => { // Deploy with create3 await deployAndGetContractWithCreate3({ contractName: 'KycNFT', + deploymentName, constructorArgs, create3Deployer: constants.CREATE3_DEPLOYERS[chainId], salt: constants.ACCESS_TOKEN_SALT[chainId], diff --git a/hardhat.config.js b/hardhat.config.js index 85802d96..ba94e9c0 100644 --- a/hardhat.config.js +++ b/hardhat.config.js @@ -80,4 +80,7 @@ module.exports = { pages: 'files', exclude: ['mocks'], }, + deployOpts: { + kycTokenSuffix: process.env.OPS_KYC_TOKEN_SUFFIX, + }, }; From ed0c1484733b827b039e15328540528d6e66f964 Mon Sep 17 00:00:00 2001 From: Sunnesoft Date: Mon, 22 Sep 2025 17:43:55 +0200 Subject: [PATCH 4/6] fixed suffix parsing --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 4a088029..3c2adf12 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,7 @@ export OPS_NETWORK := $(subst ",,$(OPS_NETWORK)) OPS_CHAIN_ID := $(subst ",,$(OPS_CHAIN_ID)) +OPS_KYC_TOKEN_SUFFIX := $(subst ",,$(OPS_KYC_TOKEN_SUFFIX)) CURRENT_DIR := $(shell pwd) From ba971e3f66d684523b7476166686f85dd75f5813 Mon Sep 17 00:00:00 2001 From: Sunnesoft Date: Fri, 26 Sep 2025 02:18:53 +0200 Subject: [PATCH 5/6] refactored constants; simplified makefile --- Makefile | 42 +++++++++++--------------- config/constants.js | 7 +++++ config/constants.json | 25 +++++++++++++++ deploy/constants/access-token-owner.js | 5 --- deploy/constants/access-token-salt.js | 5 --- deploy/constants/create3-deployer.js | 19 ------------ deploy/constants/index.js | 11 ------- deploy/deploy-kyc-nft.js | 2 +- 8 files changed, 50 insertions(+), 66 deletions(-) create mode 100644 config/constants.js create mode 100644 config/constants.json delete mode 100644 deploy/constants/access-token-owner.js delete mode 100644 deploy/constants/access-token-salt.js delete mode 100644 deploy/constants/create3-deployer.js delete mode 100644 deploy/constants/index.js diff --git a/Makefile b/Makefile index 3c2adf12..6414b74e 100644 --- a/Makefile +++ b/Makefile @@ -13,9 +13,7 @@ OPS_KYC_TOKEN_SUFFIX := $(subst ",,$(OPS_KYC_TOKEN_SUFFIX)) CURRENT_DIR := $(shell pwd) FILE_DEPLOY_KYC_NFT := $(CURRENT_DIR)/deploy/deploy-kyc-nft.js -FILE_CREATE3_DEPLOYER := $(CURRENT_DIR)/deploy/constants/create3-deployer.js -FILE_ACCESS_TOKEN_OWNER := $(CURRENT_DIR)/deploy/constants/access-token-owner.js -FILE_ACCESS_TOKEN_SALT := $(CURRENT_DIR)/deploy/constants/access-token-salt.js +FILE_CONSTANTS_JSON := $(CURRENT_DIR)/config/constants.json # New access token deployment targets deploy-access-token: @@ -40,31 +38,35 @@ validate-access-token: # Process constant functions for new addresses process-access-token-owner: - @$(MAKE) OPS_GEN_VAL='$(OPS_KYC_TOKEN_OWNER_ADDRESS)' OPS_GEN_FILE=$(FILE_ACCESS_TOKEN_OWNER) upsert-constant + @$(MAKE) OPS_GEN_KEY='accessTokenOwner' OPS_GEN_VAL='$(OPS_KYC_TOKEN_OWNER_ADDRESS)' upsert-constant process-access-token-salt: - @$(MAKE) OPS_GEN_VAL='$(OPS_KYC_TOKEN_SALT)' OPS_GEN_FILE=$(FILE_ACCESS_TOKEN_SALT) upsert-constant + @$(MAKE) OPS_GEN_KEY='accessTokenSalt' OPS_GEN_VAL='$(OPS_KYC_TOKEN_SALT)' upsert-constant process-create3-deployer: @{ \ if [ -n "$(OPS_CREATE3_DEPLOYER_ADDRESS)" ]; then \ - $(MAKE) OPS_GEN_VAL='$(OPS_CREATE3_DEPLOYER_ADDRESS)' OPS_GEN_FILE=$(FILE_CREATE3_DEPLOYER) upsert-constant; \ + $(MAKE) OPS_GEN_KEY='create3Deployers' OPS_GEN_VAL='$(OPS_CREATE3_DEPLOYER_ADDRESS)' upsert-constant; \ fi \ } upsert-constant: @{ \ if [ -z "$(OPS_GEN_VAL)" ]; then \ - echo "variable for file $(OPS_GEN_FILE) is not set!"; \ + echo "Variable for key $(OPS_GEN_KEY) is not set!"; \ exit 1; \ fi; \ - if grep -q "$(OPS_CHAIN_ID)" $(OPS_GEN_FILE); then \ - sed -i '' 's|$(OPS_CHAIN_ID): .*|$(OPS_CHAIN_ID): $(OPS_GEN_VAL),|' $(OPS_GEN_FILE); \ - sed -i '' 's/"/'\''/g' $(OPS_GEN_FILE); \ - else \ - tmpfile=$$(mktemp); \ - awk '1;/module.exports = {/{print " $(OPS_CHAIN_ID): $(subst ",\",$(OPS_GEN_VAL)),"}' $(OPS_GEN_FILE) > $$tmpfile && sed -i '' 's/"/'\''/g' $$tmpfile && mv $$tmpfile $(OPS_GEN_FILE); \ - fi \ + if [ -z "$(OPS_GEN_KEY)" ]; then \ + echo "OPS_GEN_KEY is not set!"; \ + exit 1; \ + fi; \ + if [ -z "$(OPS_CHAIN_ID)" ]; then \ + echo "OPS_CHAIN_ID is not set!"; \ + exit 1; \ + fi; \ + tmpfile=$$(mktemp); \ + jq '.$(OPS_GEN_KEY)."$(OPS_CHAIN_ID)" = $(OPS_GEN_VAL)' $(FILE_CONSTANTS_JSON) > $$tmpfile && mv $$tmpfile $(FILE_CONSTANTS_JSON); \ + echo "Updated $(OPS_GEN_KEY)[$(OPS_CHAIN_ID)] = $(OPS_GEN_VAL)"; \ } deploy-skip-all: @@ -80,20 +82,10 @@ deploy-skip: deploy-noskip: @sed -i '' 's/module.exports.skip.*/module.exports.skip = async () => false;/g' $(OPS_CURRENT_DEP_FILE) -launch-hh-node: - @{ \ - if [ -z "$(NODE_RPC)" ]; then \ - echo "NODE_RPC is not set!"; \ - exit 1; \ - fi; \ - echo "Launching Hardhat node with RPC: $(NODE_RPC)"; \ - npx hardhat node --fork $(NODE_RPC) --vvvv --full-trace; \ - } - install: install-utils install-dependencies install-utils: - brew install yarn wget + brew install yarn wget jq install-dependencies: yarn diff --git a/config/constants.js b/config/constants.js new file mode 100644 index 00000000..3e0b3cb8 --- /dev/null +++ b/config/constants.js @@ -0,0 +1,7 @@ +const constants = require('./constants.json'); + +module.exports = { + ACCESS_TOKEN_SALT: constants.accessTokenSalt || {}, + ACCESS_TOKEN_OWNER: constants.accessTokenOwner || {}, + CREATE3_DEPLOYERS: constants.create3Deployers || {}, +}; diff --git a/config/constants.json b/config/constants.json new file mode 100644 index 00000000..8d9705c7 --- /dev/null +++ b/config/constants.json @@ -0,0 +1,25 @@ +{ + "accessTokenSalt": { + "31337": "0xfd0450e10366502b67f46a6037db5b90d1cad2d4a744b961f7986bf35f4d35d7" + }, + "accessTokenOwner": { + "31337": "0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF" + }, + "create3Deployers": { + "31337": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "1": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "56": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "137": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "42161": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "10": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "43114": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "100": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "250": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "1313161554": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "8217": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "8453": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "59144": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "146": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "130": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65" + } +} diff --git a/deploy/constants/access-token-owner.js b/deploy/constants/access-token-owner.js deleted file mode 100644 index f1ded63f..00000000 --- a/deploy/constants/access-token-owner.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - 31337: '0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF', -}; - -module.exports.skip = async () => true; diff --git a/deploy/constants/access-token-salt.js b/deploy/constants/access-token-salt.js deleted file mode 100644 index 20eae5aa..00000000 --- a/deploy/constants/access-token-salt.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - 31337: '0xfd0450e10366502b67f46a6037db5b90d1cad2d4a744b961f7986bf35f4d35d7', -}; - -module.exports.skip = async () => true; diff --git a/deploy/constants/create3-deployer.js b/deploy/constants/create3-deployer.js deleted file mode 100644 index 151fccd2..00000000 --- a/deploy/constants/create3-deployer.js +++ /dev/null @@ -1,19 +0,0 @@ -module.exports = { - 31337: '0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65', - 1: '0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65', // Mainnet - 56: '0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65', // BSC - 137: '0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65', // Matic - 42161: '0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65', // Arbitrum - 10: '0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65', // Optimistic - 43114: '0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65', // Avalanche - 100: '0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65', // xDAI - 250: '0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65', // FTM - 1313161554: '0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65', // Aurora - 8217: '0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65', // Klaytn - 8453: '0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65', // Base - 59144: '0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65', // Linea - 146: '0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65', // Sonic - 130: '0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65', // Unichain -}; - -module.exports.skip = async () => true; diff --git a/deploy/constants/index.js b/deploy/constants/index.js deleted file mode 100644 index e9f12812..00000000 --- a/deploy/constants/index.js +++ /dev/null @@ -1,11 +0,0 @@ -const ACCESS_TOKEN_SALT = require('./access-token-salt'); -const ACCESS_TOKEN_OWNER = require('./access-token-owner'); -const CREATE3_DEPLOYERS = require('./create3-deployer'); - -module.exports = { - ACCESS_TOKEN_SALT, - ACCESS_TOKEN_OWNER, - CREATE3_DEPLOYERS, -}; - -module.exports.skip = async () => true; diff --git a/deploy/deploy-kyc-nft.js b/deploy/deploy-kyc-nft.js index 9f93f5f4..ef68e7a7 100644 --- a/deploy/deploy-kyc-nft.js +++ b/deploy/deploy-kyc-nft.js @@ -1,6 +1,6 @@ const hre = require('hardhat'); const { deployAndGetContractWithCreate3, deployAndGetContract } = require('@1inch/solidity-utils'); -const constants = require('./constants'); +const constants = require('../config/constants'); const AT_NAME = 'Resolver Access Token'; const AT_SYMBOL = 'RES'; From 7e8232cd94e9a50a98928a82d77bfaf2e649cf4d Mon Sep 17 00:00:00 2001 From: Sunnesoft Date: Fri, 26 Sep 2025 13:02:37 +0200 Subject: [PATCH 6/6] chore: deploy aggregation-router-and-lop to localhost --- config/constants.json | 4 +- deployments/localhost/.chainId | 1 + deployments/localhost/KycNFT.json | 795 ++++++++++++++++++++++++++++++ package.json | 2 +- yarn.lock | 7 +- 5 files changed, 801 insertions(+), 8 deletions(-) create mode 100644 deployments/localhost/.chainId create mode 100644 deployments/localhost/KycNFT.json diff --git a/config/constants.json b/config/constants.json index 8d9705c7..33c8fbd5 100644 --- a/config/constants.json +++ b/config/constants.json @@ -3,10 +3,10 @@ "31337": "0xfd0450e10366502b67f46a6037db5b90d1cad2d4a744b961f7986bf35f4d35d7" }, "accessTokenOwner": { - "31337": "0x56E44874F624EbDE6efCc783eFD685f0FBDC6dcF" + "31337": "0xAA74E80De15758Fe983Cb6102176ef2cE195ECfE" }, "create3Deployers": { - "31337": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", + "31337": "0xaD54e5f728c167E51FBc53745055F7105Fe8B503", "1": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", "56": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", "137": "0xD935a2bb926019E0ed6fb31fbD5b1Bbb7c05bf65", diff --git a/deployments/localhost/.chainId b/deployments/localhost/.chainId new file mode 100644 index 00000000..027791f4 --- /dev/null +++ b/deployments/localhost/.chainId @@ -0,0 +1 @@ +31337 \ No newline at end of file diff --git a/deployments/localhost/KycNFT.json b/deployments/localhost/KycNFT.json new file mode 100644 index 00000000..190b73e1 --- /dev/null +++ b/deployments/localhost/KycNFT.json @@ -0,0 +1,795 @@ +{ + "address": "0xC8fB6679196C21744877033eb5Af7138Eb1CC77E", + "abi": [ + { + "inputs": [ + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "symbol", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "stateMutability": "nonpayable", + "type": "constructor" + }, + { + "inputs": [], + "name": "BadSignature", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721IncorrectOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721InsufficientApproval", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "approver", + "type": "address" + } + ], + "name": "ERC721InvalidApprover", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "operator", + "type": "address" + } + ], + "name": "ERC721InvalidOperator", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "ERC721InvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "receiver", + "type": "address" + } + ], + "name": "ERC721InvalidReceiver", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "sender", + "type": "address" + } + ], + "name": "ERC721InvalidSender", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ERC721NonexistentToken", + "type": "error" + }, + { + "inputs": [], + "name": "InvalidShortString", + "type": "error" + }, + { + "inputs": [], + "name": "OnlyOneNFTPerAddress", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "type": "address" + } + ], + "name": "OwnableInvalidOwner", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "OwnableUnauthorizedAccount", + "type": "error" + }, + { + "inputs": [], + "name": "SignatureExpired", + "type": "error" + }, + { + "inputs": [ + { + "internalType": "string", + "name": "str", + "type": "string" + } + ], + "name": "StringTooLong", + "type": "error" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "approved", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "internalType": "address", + "name": "owner", + "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": [], + "name": "EIP712DomainChanged", + "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": "from", + "type": "address" + }, + { + "indexed": true, + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "indexed": true, + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + }, + { + "inputs": [], + "name": "MINT_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "TRANSFER_FROM_TYPEHASH", + "outputs": [ + { + "internalType": "bytes32", + "name": "", + "type": "bytes32" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [], + "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": "tokenId", + "type": "uint256" + } + ], + "name": "burn", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "eip712Domain", + "outputs": [ + { + "internalType": "bytes1", + "name": "fields", + "type": "bytes1" + }, + { + "internalType": "string", + "name": "name", + "type": "string" + }, + { + "internalType": "string", + "name": "version", + "type": "string" + }, + { + "internalType": "uint256", + "name": "chainId", + "type": "uint256" + }, + { + "internalType": "address", + "name": "verifyingContract", + "type": "address" + }, + { + "internalType": "bytes32", + "name": "salt", + "type": "bytes32" + }, + { + "internalType": "uint256[]", + "name": "extensions", + "type": "uint256[]" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "getApproved", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "owner", + "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": "tokenId", + "type": "uint256" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + }, + { + "internalType": "uint256", + "name": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "mint", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [], + "name": "name", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "name": "nonces", + "outputs": [ + { + "internalType": "uint256", + "name": "", + "type": "uint256" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [], + "name": "owner", + "outputs": [ + { + "internalType": "address", + "name": "", + "type": "address" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "ownerOf", + "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": "tokenId", + "type": "uint256" + } + ], + "name": "safeTransferFrom", + "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": "bytes", + "name": "data", + "type": "bytes" + } + ], + "name": "safeTransferFrom", + "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": "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": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "tokenURI", + "outputs": [ + { + "internalType": "string", + "name": "", + "type": "string" + } + ], + "stateMutability": "view", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "from", + "type": "address" + }, + { + "internalType": "address", + "name": "to", + "type": "address" + }, + { + "internalType": "uint256", + "name": "tokenId", + "type": "uint256" + } + ], + "name": "transferFrom", + "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": "deadline", + "type": "uint256" + }, + { + "internalType": "bytes", + "name": "signature", + "type": "bytes" + } + ], + "name": "transferFrom", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + }, + { + "inputs": [ + { + "internalType": "address", + "name": "newOwner", + "type": "address" + } + ], + "name": "transferOwnership", + "outputs": [], + "stateMutability": "nonpayable", + "type": "function" + } + ], + "transactionHash": "0x91170a214a9a694baad1189eeb9124f8d16fba2371a596a61f231211d4e71b79", + "receipt": { + "to": "0xaD54e5f728c167E51FBc53745055F7105Fe8B503", + "from": "0xAA74E80De15758Fe983Cb6102176ef2cE195ECfE", + "contractAddress": null, + "transactionIndex": 0, + "gasUsed": "1986745", + "logsBloom": "0x00000000000000000000002000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000020000000000000000000810000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000001000001000000000000", + "blockHash": "0x33ce2ee63243adc8cf1b5e4a2b887521317bc175285990f3bc33d000ffa7291f", + "transactionHash": "0x91170a214a9a694baad1189eeb9124f8d16fba2371a596a61f231211d4e71b79", + "logs": [ + { + "_type": "log", + "address": "0xC8fB6679196C21744877033eb5Af7138Eb1CC77E", + "blockHash": "0x33ce2ee63243adc8cf1b5e4a2b887521317bc175285990f3bc33d000ffa7291f", + "blockNumber": 23447135, + "data": "0x", + "index": 0, + "topics": [ + "0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0", + "0x0000000000000000000000000000000000000000000000000000000000000000", + "0x000000000000000000000000aa74e80de15758fe983cb6102176ef2ce195ecfe" + ], + "transactionHash": "0x91170a214a9a694baad1189eeb9124f8d16fba2371a596a61f231211d4e71b79", + "transactionIndex": 0 + } + ], + "blockNumber": 23447135, + "cumulativeGasUsed": "1986745", + "status": 1 + }, + "args": [ + "Resolver Access Token", + "RES", + "1", + "0xAA74E80De15758Fe983Cb6102176ef2cE195ECfE" + ], + "numDeployments": 1, + "bytecode": "0x6101606040908082523462000448576200284a80380380916200002382856200044c565b8339810190608081830312620004485780516001600160401b0392908381116200044857816200005591840162000493565b91602091828201518581116200044857816200007391840162000493565b908683015186811162000448576060916200009091850162000493565b9201516001600160a01b03808216918290036200044857811562000431575f548260018060a01b03198216175f55167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a383519085821162000281576001918254908382811c9216801562000426575b868310146200035057601f91828111620003de575b5080868382116001146200037b575f916200036f575b505f19600383901b1c191690841b1783555b81519187831162000281576002548481811c9116801562000364575b87821014620003505782811162000307575b5085918311600114620002a1579282939183925f9462000295575b50501b915f199060031b1c1916176002555b620001a583620004ee565b91610120928352620001b7826200068c565b93610140948552818151910120918260e05281815191012095610100968088524660a0528151928301937f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f85528284015260608301524660808301523060a083015260a0825260c08201958287109087111762000281578590525190206080523060c05261206f9384620007db853960805184611d52015260a05184611e1e015260c05184611d23015260e05184611da101525183611dc701525182610696015251816106c00152f35b634e487b7160e01b5f52604160045260245ffd5b015192505f8062000188565b90601f1983169160025f5283875f20935f5b8988838310620002ef5750505010620002d6575b505050811b016002556200019a565b01515f1960f88460031b161c191690555f8080620002c7565b868601518855909601959485019487935001620002b3565b60025f52865f208380860160051c82019289871062000346575b0160051c019085905b8281106200033a5750506200016d565b5f81550185906200032a565b9250819262000321565b634e487b7160e01b5f52602260045260245ffd5b90607f16906200015b565b90508701515f6200012d565b859250601f19821690835f52885f20915f5b8a8c838310620003c8575050508311620003af575b5050811b0183556200013f565b8901515f1960f88460031b161c191690555f80620003a2565b840151855589969094019392830192016200038d565b845f52865f208380840160051c8201928985106200041c575b0160051c019085905b8281106200041057505062000117565b5f815501859062000400565b92508192620003f7565b91607f169162000102565b8751631e4fbdf760e01b81525f6004820152602490fd5b5f80fd5b601f909101601f19168101906001600160401b038211908210176200028157604052565b5f5b838110620004825750505f910152565b818101518382015260200162000472565b81601f82011215620004485780516001600160401b038111620002815760405192620004ca601f8301601f1916602001856200044c565b818452602082840101116200044857620004eb916020808501910162000470565b90565b8051602090818110156200056b5750601f8251116200052957808251920151908083106200051b57501790565b825f19910360031b1b161790565b6044906200055d9260405193849263305a27a960e01b84528060048501528251928391826024870152868601910162000470565b601f01601f19168101030190fd5b906001600160401b0382116200028157600754926001938481811c9116801562000681575b838210146200035057601f81116200064a575b5081601f8411600114620005e257509282939183925f94620005d6575b50501b915f199060031b1c19161760075560ff90565b015192505f80620005c0565b919083601f19811660075f52845f20945f905b888383106200062f575050501062000616575b505050811b0160075560ff90565b01515f1960f88460031b161c191690555f808062000608565b858701518855909601959485019487935090810190620005f5565b60075f5284601f845f20920160051c820191601f860160051c015b82811062000675575050620005a3565b5f815501859062000665565b90607f169062000590565b805160209081811015620006b95750601f8251116200052957808251920151908083106200051b57501790565b906001600160401b0382116200028157600854926001938481811c91168015620007cf575b838210146200035057601f811162000798575b5081601f84116001146200073057509282939183925f9462000724575b50501b915f199060031b1c19161760085560ff90565b015192505f806200070e565b919083601f19811660085f52845f20945f905b888383106200077d575050501062000764575b505050811b0160085560ff90565b01515f1960f88460031b161c191690555f808062000756565b85870151885590960195948501948793509081019062000743565b60085f5284601f845f20920160051c820191601f860160051c015b828110620007c3575050620006f1565b5f8155018590620007b3565b90607f1690620006de56fe6080604090808252600480361015610015575f80fd5b5f3560e01c91826301ffc9a7146112ca5750816306fdde03146111fb578163081812fc14611196578163095ea7b314611040578163141a468c14610ffb57816323b872dd14610fdc57816340c10f1914610f9257816342842e0e14610f6a57816342966c6814610bbe578163605105f014610a755781636352211e14610a1c57816370a08231146109d2578163715018a614610938578163731133e9146107e65781638175db481461078e57816384b0196e1461065e5781638da5cb5b1461060d57816395d89b41146104f0578163a22cb465146103f3578163b88d4fde1461034f578163c87b56dd146102df578163e985e9c514610265578163f2fde38b14610183575063f76fc35e14610128575f80fd5b3461017f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f57602090517f5d886c76f2b9956f41dc5f7a0855f015c4d8d77370da5ce4bed466a8ea040b918152f35b5f80fd5b90503461017f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f576101bc611412565b906101c56118c2565b73ffffffffffffffffffffffffffffffffffffffff8092169283156102365750505f54827fffffffffffffffffffffffff00000000000000000000000000000000000000008216175f55167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b905f60249251917f1e4fbdf7000000000000000000000000000000000000000000000000000000008352820152fd5b823461017f57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f5760209061029f611412565b6102a7611435565b9073ffffffffffffffffffffffffffffffffffffffff8091165f5260068452825f2091165f52825260ff815f20541690519015158152f35b823461017f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f5761031c61034b9235611863565b505f8151610329816114e6565b52805190610336826114e6565b5f8252519182916020835260208301906113b6565b0390f35b823461017f5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f57610387611412565b61038f611435565b6064359367ffffffffffffffff851161017f573660238601121561017f578401356103c56103bc826115a8565b94519485611567565b808452366024828701011161017f576020815f9260246103f1980183880137850101526044359161168e565b005b823461017f57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f5761042a611412565b906024359182151580930361017f5773ffffffffffffffffffffffffffffffffffffffff169283156104c25750335f526006602052805f20835f52602052805f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541660ff8416179055519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b8360249251917f5b08ba18000000000000000000000000000000000000000000000000000000008352820152fd5b823461017f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f5780516002549091825f610531846115e2565b808352602094600190866001821691825f146105cd575050600114610572575b505061034b9291610563910385611567565b519282849384528301906113b6565b9085925060025f527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace915f925b8284106105b55750505082010181610563610551565b8054848a01860152889550879490930192810161059f565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168682015292151560051b850190920192508391506105639050610551565b823461017f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f5760209073ffffffffffffffffffffffffffffffffffffffff5f54169051908152f35b823461017f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f57610732906106ba7f0000000000000000000000000000000000000000000000000000000000000000611e44565b906106e47f0000000000000000000000000000000000000000000000000000000000000000611f7c565b61073f8251926106f3846114e6565b5f845260209281519687967f0f00000000000000000000000000000000000000000000000000000000000000885260e0602089015260e08801906113b6565b91868303908701526113b6565b4660608501523060808501525f60a085015283810360c0850152602080845192838152019301915f5b82811061077757505050500390f35b835185528695509381019392810192600101610768565b823461017f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f57602090517f066b01d1d9822d4419c12cf2d4b5ff3277e1dc616369ba3393eba0a192a3effd8152f35b823461017f5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f5761081e611412565b6024359160443560643567ffffffffffffffff811161017f5761084490369087016114b8565b8291924211610910576108d890865f5260096020526108cd855f205493865160208101917f5d886c76f2b9956f41dc5f7a0855f015c4d8d77370da5ce4bed466a8ea040b91835273ffffffffffffffffffffffffffffffffffffffff96878b168a84015260608301528a608083015260a082015260a081526108c58161154b565b519020611a4c565b93835f541694611a8d565b16036108e8576103f183836119ee565b8390517f5cd5d233000000000000000000000000000000000000000000000000000000008152fd5b8684517f0819bdcd000000000000000000000000000000000000000000000000000000008152fd5b3461017f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f5761096e6118c2565b5f73ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b823461017f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f57602090610a15610a10611412565b611633565b9051908152f35b823461017f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f5773ffffffffffffffffffffffffffffffffffffffff610a6d60209335611863565b915191168152f35b823461017f5760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f57610aad611412565b610ab5611435565b906044359260643560843567ffffffffffffffff811161017f57610adc90369088016114b8565b8291924211610b9657610b5d90875f5260096020526108cd855f205493865160208101917f066b01d1d9822d4419c12cf2d4b5ff3277e1dc616369ba3393eba0a192a3effd835273ffffffffffffffffffffffffffffffffffffffff96878c168a84015260608301528b608083015260a082015260a081526108c58161154b565b1603610b6e57506103f19350611912565b8490517f5cd5d233000000000000000000000000000000000000000000000000000000008152fd5b8784517f0819bdcd000000000000000000000000000000000000000000000000000000008152fd5b90503461017f576020807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f5781359073ffffffffffffffffffffffffffffffffffffffff90815f541633145f14610d6c57825f5260098152845f20918254927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff93848114610d40575f9286949260016003930190558484528183528884205416918215958615610cf4575b50848452528682207fffffffffffffffffffffffff000000000000000000000000000000000000000081541690557fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8280a4610cc757005b60249251917f7e273289000000000000000000000000000000000000000000000000000000008352820152fd5b610d2b865f52600560205260405f207fffffffffffffffffffffffff00000000000000000000000000000000000000008154169055565b8385528882528985209081540190555f610c6f565b6011877f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b825f95929394955260098152815f208054907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff91828114610f3e576001019055845f526003825283835f205416933315159081610e73575b5050906003915f959685610e27575b50508585525282207fffffffffffffffffffffffff000000000000000000000000000000000000000081541690557fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8280a4005b610e5e885f52600560205260405f207fffffffffffffffffffffffff00000000000000000000000000000000000000008154169055565b85875282528386209081540190555f80610dd3565b81610eef575b5015610e86575f80610dc4565b82868686610ebb5760249251917f7e273289000000000000000000000000000000000000000000000000000000008352820152fd5b60449251917f177e802f00000000000000000000000000000000000000000000000000000000835233908301526024820152fd5b33861491508115610f20575b8115610f09575b505f610e79565b9050855f52600583523390845f205416145f610f02565b9050845f5260068352835f20335f52835260ff845f20541690610efb565b6011887f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b823461017f576103f190610f7d36611458565b91925192610f8a846114e6565b5f845261168e565b823461017f577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f576103f1610fcb611412565b610fd36118c2565b602435906119ee565b3461017f576103f1610fed36611458565b91610ff66118c2565b611912565b823461017f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f57602091355f5260098252805f20549051908152f35b823461017f57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f57611077611412565b916024359061108582611863565b9033151580611176575b80611141575b6111115750819073ffffffffffffffffffffffffffffffffffffffff809516948591167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9255f80a45f5260056020525f20907fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790555f80f35b6024908451907fa9fbf51f0000000000000000000000000000000000000000000000000000000082523390820152fd5b5073ffffffffffffffffffffffffffffffffffffffff82165f526006602052835f20335f5260205260ff845f20541615611095565b503373ffffffffffffffffffffffffffffffffffffffff8316141561108f565b823461017f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f57602091356111d381611863565b505f526005825273ffffffffffffffffffffffffffffffffffffffff815f2054169051908152f35b823461017f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f578051905f908260019260015493611240856115e2565b90818452602095866001821691825f146105cd57505060011461126f57505061034b9291610563910385611567565b9085925060015f527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6915f925b8284106112b25750505082010181610563610551565b8054848a01860152889550879490930192810161129c565b903461017f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f5735907fffffffff00000000000000000000000000000000000000000000000000000000821680920361017f57817f80ac58cd000000000000000000000000000000000000000000000000000000006020931490811561138c575b8115611362575b5015158152f35b7f01ffc9a7000000000000000000000000000000000000000000000000000000009150148361135b565b7f5b5e139f0000000000000000000000000000000000000000000000000000000081149150611354565b91908251928382525f5b8481106113fe5750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f845f6020809697860101520116010190565b6020818301810151848301820152016113c0565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361017f57565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361017f57565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc606091011261017f5773ffffffffffffffffffffffffffffffffffffffff90600435828116810361017f5791602435908116810361017f579060443590565b9181601f8401121561017f5782359167ffffffffffffffff831161017f576020838186019501011161017f57565b6020810190811067ffffffffffffffff82111761150257604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040810190811067ffffffffffffffff82111761150257604052565b60c0810190811067ffffffffffffffff82111761150257604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761150257604052565b67ffffffffffffffff811161150257601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b90600182811c92168015611629575b60208310146115fc57565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b91607f16916115f1565b73ffffffffffffffffffffffffffffffffffffffff16801561165e575f52600460205260405f205490565b60246040517f89c62b640000000000000000000000000000000000000000000000000000000081525f6004820152fd5b91926116986118c2565b6116a3848385611912565b813b6116b0575b50505050565b9061172294929173ffffffffffffffffffffffffffffffffffffffff80921694604051927f150b7a0200000000000000000000000000000000000000000000000000000000948585523360048601521660248401526044830152608060648301528180602097889360848301906113b6565b03815f885af15f918161180b575b506117a5575050503d5f1461179e573d611749816115a8565b906117576040519283611567565b81523d5f8483013e5b8051928361179957602483604051907f64a0ae920000000000000000000000000000000000000000000000000000000082526004820152fd5b019050fd5b6060611760565b7fffffffff000000000000000000000000000000000000000000000000000000009192945016036117da57505f8080806116aa565b602490604051907f64a0ae920000000000000000000000000000000000000000000000000000000082526004820152fd5b9091508581813d831161185c575b6118238183611567565b8101031261017f57517fffffffff000000000000000000000000000000000000000000000000000000008116810361017f57905f611730565b503d611819565b805f52600360205273ffffffffffffffffffffffffffffffffffffffff60405f205416908115611891575090565b602490604051907f7e2732890000000000000000000000000000000000000000000000000000000082526004820152fd5b73ffffffffffffffffffffffffffffffffffffffff5f541633036118e257565b60246040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152fd5b9073ffffffffffffffffffffffffffffffffffffffff90818116156119be5761193c848392611b5b565b16918261197457602484604051907f7e2732890000000000000000000000000000000000000000000000000000000082526004820152fd5b169182820361198257505050565b60649350604051927f64283d7b000000000000000000000000000000000000000000000000000000008452600484015260248301526044820152fd5b60246040517f64a0ae920000000000000000000000000000000000000000000000000000000081525f6004820152fd5b73ffffffffffffffffffffffffffffffffffffffff91828216156119be57611a1591611b5b565b16611a1c57565b60246040517f73c6ac6e0000000000000000000000000000000000000000000000000000000081525f6004820152fd5b604290611a57611d0c565b90604051917f19010000000000000000000000000000000000000000000000000000000000008352600283015260228201522090565b6040515f94939092908360418214611b425750604014611afd57505f9150815b611ab5575050565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a1606083015110611ae4575050565b6020929350816080915f935282805260015afa505f5190565b7f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8160208086940135918260ff1c601b01828601526040850137166060820152611aad565b9160408092508101355f1a602084015281830137611aad565b9073ffffffffffffffffffffffffffffffffffffffff918281169081151580918192611cfa575b50611cd057825f52600960205260405f20938454947fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff95868114611ca3576001019055835f52600360205260405f2054169384611c54575b50611c3c575b815f52600360205260405f20817fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f80a490565b805f52600460205260405f2060018154019055611be0565b611c8b845f52600560205260405f207fffffffffffffffffffffffff00000000000000000000000000000000000000008154169055565b845f52600460205260405f209081540190555f611bda565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b60046040517f6cb75e3f000000000000000000000000000000000000000000000000000000008152fd5b611d049150611633565b15155f611b82565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016301480611e1b575b15611d74577f000000000000000000000000000000000000000000000000000000000000000090565b60405160208101907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f82527f000000000000000000000000000000000000000000000000000000000000000060408201527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260a0815260c0810181811067ffffffffffffffff8211176115025760405251902090565b507f00000000000000000000000000000000000000000000000000000000000000004614611d4b565b60ff8114611e9a5760ff811690601f8211611e705760405191611e668361152f565b8252602082015290565b60046040517fb3512b0c000000000000000000000000000000000000000000000000000000008152fd5b50604051600754815f611eac836115e2565b80835292602090600190818116908115611f395750600114611eda575b5050611ed792500382611567565b90565b91509260075f527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688935f925b828410611f215750611ed79450505081016020015f80611ec9565b85548785018301529485019486945092810192611f06565b905060209350611ed79592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b8201015f80611ec9565b60ff8114611f9e5760ff811690601f8211611e705760405191611e668361152f565b50604051600854815f611fb0836115e2565b80835292602090600190818116908115611f395750600114611fda575050611ed792500382611567565b91509260085f527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee3935f925b8284106120215750611ed79450505081016020015f80611ec9565b8554878501830152948501948694509281019261200656fea26469706673582212206c8f64a3c7a1e8239fa09b4b74196c78235899d6217a5b6368544f50a6500ada64736f6c63430008170033", + "deployedBytecode": "0x6080604090808252600480361015610015575f80fd5b5f3560e01c91826301ffc9a7146112ca5750816306fdde03146111fb578163081812fc14611196578163095ea7b314611040578163141a468c14610ffb57816323b872dd14610fdc57816340c10f1914610f9257816342842e0e14610f6a57816342966c6814610bbe578163605105f014610a755781636352211e14610a1c57816370a08231146109d2578163715018a614610938578163731133e9146107e65781638175db481461078e57816384b0196e1461065e5781638da5cb5b1461060d57816395d89b41146104f0578163a22cb465146103f3578163b88d4fde1461034f578163c87b56dd146102df578163e985e9c514610265578163f2fde38b14610183575063f76fc35e14610128575f80fd5b3461017f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f57602090517f5d886c76f2b9956f41dc5f7a0855f015c4d8d77370da5ce4bed466a8ea040b918152f35b5f80fd5b90503461017f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f576101bc611412565b906101c56118c2565b73ffffffffffffffffffffffffffffffffffffffff8092169283156102365750505f54827fffffffffffffffffffffffff00000000000000000000000000000000000000008216175f55167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a3005b905f60249251917f1e4fbdf7000000000000000000000000000000000000000000000000000000008352820152fd5b823461017f57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f5760209061029f611412565b6102a7611435565b9073ffffffffffffffffffffffffffffffffffffffff8091165f5260068452825f2091165f52825260ff815f20541690519015158152f35b823461017f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f5761031c61034b9235611863565b505f8151610329816114e6565b52805190610336826114e6565b5f8252519182916020835260208301906113b6565b0390f35b823461017f5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f57610387611412565b61038f611435565b6064359367ffffffffffffffff851161017f573660238601121561017f578401356103c56103bc826115a8565b94519485611567565b808452366024828701011161017f576020815f9260246103f1980183880137850101526044359161168e565b005b823461017f57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f5761042a611412565b906024359182151580930361017f5773ffffffffffffffffffffffffffffffffffffffff169283156104c25750335f526006602052805f20835f52602052805f207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541660ff8416179055519081527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3160203392a3005b8360249251917f5b08ba18000000000000000000000000000000000000000000000000000000008352820152fd5b823461017f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f5780516002549091825f610531846115e2565b808352602094600190866001821691825f146105cd575050600114610572575b505061034b9291610563910385611567565b519282849384528301906113b6565b9085925060025f527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace915f925b8284106105b55750505082010181610563610551565b8054848a01860152889550879490930192810161059f565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00168682015292151560051b850190920192508391506105639050610551565b823461017f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f5760209073ffffffffffffffffffffffffffffffffffffffff5f54169051908152f35b823461017f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f57610732906106ba7f0000000000000000000000000000000000000000000000000000000000000000611e44565b906106e47f0000000000000000000000000000000000000000000000000000000000000000611f7c565b61073f8251926106f3846114e6565b5f845260209281519687967f0f00000000000000000000000000000000000000000000000000000000000000885260e0602089015260e08801906113b6565b91868303908701526113b6565b4660608501523060808501525f60a085015283810360c0850152602080845192838152019301915f5b82811061077757505050500390f35b835185528695509381019392810192600101610768565b823461017f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f57602090517f066b01d1d9822d4419c12cf2d4b5ff3277e1dc616369ba3393eba0a192a3effd8152f35b823461017f5760807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f5761081e611412565b6024359160443560643567ffffffffffffffff811161017f5761084490369087016114b8565b8291924211610910576108d890865f5260096020526108cd855f205493865160208101917f5d886c76f2b9956f41dc5f7a0855f015c4d8d77370da5ce4bed466a8ea040b91835273ffffffffffffffffffffffffffffffffffffffff96878b168a84015260608301528a608083015260a082015260a081526108c58161154b565b519020611a4c565b93835f541694611a8d565b16036108e8576103f183836119ee565b8390517f5cd5d233000000000000000000000000000000000000000000000000000000008152fd5b8684517f0819bdcd000000000000000000000000000000000000000000000000000000008152fd5b3461017f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f5761096e6118c2565b5f73ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b823461017f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f57602090610a15610a10611412565b611633565b9051908152f35b823461017f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f5773ffffffffffffffffffffffffffffffffffffffff610a6d60209335611863565b915191168152f35b823461017f5760a07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f57610aad611412565b610ab5611435565b906044359260643560843567ffffffffffffffff811161017f57610adc90369088016114b8565b8291924211610b9657610b5d90875f5260096020526108cd855f205493865160208101917f066b01d1d9822d4419c12cf2d4b5ff3277e1dc616369ba3393eba0a192a3effd835273ffffffffffffffffffffffffffffffffffffffff96878c168a84015260608301528b608083015260a082015260a081526108c58161154b565b1603610b6e57506103f19350611912565b8490517f5cd5d233000000000000000000000000000000000000000000000000000000008152fd5b8784517f0819bdcd000000000000000000000000000000000000000000000000000000008152fd5b90503461017f576020807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f5781359073ffffffffffffffffffffffffffffffffffffffff90815f541633145f14610d6c57825f5260098152845f20918254927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff93848114610d40575f9286949260016003930190558484528183528884205416918215958615610cf4575b50848452528682207fffffffffffffffffffffffff000000000000000000000000000000000000000081541690557fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8280a4610cc757005b60249251917f7e273289000000000000000000000000000000000000000000000000000000008352820152fd5b610d2b865f52600560205260405f207fffffffffffffffffffffffff00000000000000000000000000000000000000008154169055565b8385528882528985209081540190555f610c6f565b6011877f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b825f95929394955260098152815f208054907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff91828114610f3e576001019055845f526003825283835f205416933315159081610e73575b5050906003915f959685610e27575b50508585525282207fffffffffffffffffffffffff000000000000000000000000000000000000000081541690557fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8280a4005b610e5e885f52600560205260405f207fffffffffffffffffffffffff00000000000000000000000000000000000000008154169055565b85875282528386209081540190555f80610dd3565b81610eef575b5015610e86575f80610dc4565b82868686610ebb5760249251917f7e273289000000000000000000000000000000000000000000000000000000008352820152fd5b60449251917f177e802f00000000000000000000000000000000000000000000000000000000835233908301526024820152fd5b33861491508115610f20575b8115610f09575b505f610e79565b9050855f52600583523390845f205416145f610f02565b9050845f5260068352835f20335f52835260ff845f20541690610efb565b6011887f4e487b71000000000000000000000000000000000000000000000000000000005f525260245ffd5b823461017f576103f190610f7d36611458565b91925192610f8a846114e6565b5f845261168e565b823461017f577ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f576103f1610fcb611412565b610fd36118c2565b602435906119ee565b3461017f576103f1610fed36611458565b91610ff66118c2565b611912565b823461017f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f57602091355f5260098252805f20549051908152f35b823461017f57807ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f57611077611412565b916024359061108582611863565b9033151580611176575b80611141575b6111115750819073ffffffffffffffffffffffffffffffffffffffff809516948591167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9255f80a45f5260056020525f20907fffffffffffffffffffffffff00000000000000000000000000000000000000008254161790555f80f35b6024908451907fa9fbf51f0000000000000000000000000000000000000000000000000000000082523390820152fd5b5073ffffffffffffffffffffffffffffffffffffffff82165f526006602052835f20335f5260205260ff845f20541615611095565b503373ffffffffffffffffffffffffffffffffffffffff8316141561108f565b823461017f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f57602091356111d381611863565b505f526005825273ffffffffffffffffffffffffffffffffffffffff815f2054169051908152f35b823461017f575f7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f578051905f908260019260015493611240856115e2565b90818452602095866001821691825f146105cd57505060011461126f57505061034b9291610563910385611567565b9085925060015f527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf6915f925b8284106112b25750505082010181610563610551565b8054848a01860152889550879490930192810161129c565b903461017f5760207ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc36011261017f5735907fffffffff00000000000000000000000000000000000000000000000000000000821680920361017f57817f80ac58cd000000000000000000000000000000000000000000000000000000006020931490811561138c575b8115611362575b5015158152f35b7f01ffc9a7000000000000000000000000000000000000000000000000000000009150148361135b565b7f5b5e139f0000000000000000000000000000000000000000000000000000000081149150611354565b91908251928382525f5b8481106113fe5750507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f845f6020809697860101520116010190565b6020818301810151848301820152016113c0565b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361017f57565b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361017f57565b7ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc606091011261017f5773ffffffffffffffffffffffffffffffffffffffff90600435828116810361017f5791602435908116810361017f579060443590565b9181601f8401121561017f5782359167ffffffffffffffff831161017f576020838186019501011161017f57565b6020810190811067ffffffffffffffff82111761150257604052565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b6040810190811067ffffffffffffffff82111761150257604052565b60c0810190811067ffffffffffffffff82111761150257604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761150257604052565b67ffffffffffffffff811161150257601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b90600182811c92168015611629575b60208310146115fc57565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b91607f16916115f1565b73ffffffffffffffffffffffffffffffffffffffff16801561165e575f52600460205260405f205490565b60246040517f89c62b640000000000000000000000000000000000000000000000000000000081525f6004820152fd5b91926116986118c2565b6116a3848385611912565b813b6116b0575b50505050565b9061172294929173ffffffffffffffffffffffffffffffffffffffff80921694604051927f150b7a0200000000000000000000000000000000000000000000000000000000948585523360048601521660248401526044830152608060648301528180602097889360848301906113b6565b03815f885af15f918161180b575b506117a5575050503d5f1461179e573d611749816115a8565b906117576040519283611567565b81523d5f8483013e5b8051928361179957602483604051907f64a0ae920000000000000000000000000000000000000000000000000000000082526004820152fd5b019050fd5b6060611760565b7fffffffff000000000000000000000000000000000000000000000000000000009192945016036117da57505f8080806116aa565b602490604051907f64a0ae920000000000000000000000000000000000000000000000000000000082526004820152fd5b9091508581813d831161185c575b6118238183611567565b8101031261017f57517fffffffff000000000000000000000000000000000000000000000000000000008116810361017f57905f611730565b503d611819565b805f52600360205273ffffffffffffffffffffffffffffffffffffffff60405f205416908115611891575090565b602490604051907f7e2732890000000000000000000000000000000000000000000000000000000082526004820152fd5b73ffffffffffffffffffffffffffffffffffffffff5f541633036118e257565b60246040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152fd5b9073ffffffffffffffffffffffffffffffffffffffff90818116156119be5761193c848392611b5b565b16918261197457602484604051907f7e2732890000000000000000000000000000000000000000000000000000000082526004820152fd5b169182820361198257505050565b60649350604051927f64283d7b000000000000000000000000000000000000000000000000000000008452600484015260248301526044820152fd5b60246040517f64a0ae920000000000000000000000000000000000000000000000000000000081525f6004820152fd5b73ffffffffffffffffffffffffffffffffffffffff91828216156119be57611a1591611b5b565b16611a1c57565b60246040517f73c6ac6e0000000000000000000000000000000000000000000000000000000081525f6004820152fd5b604290611a57611d0c565b90604051917f19010000000000000000000000000000000000000000000000000000000000008352600283015260228201522090565b6040515f94939092908360418214611b425750604014611afd57505f9150815b611ab5575050565b7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a1606083015110611ae4575050565b6020929350816080915f935282805260015afa505f5190565b7f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8160208086940135918260ff1c601b01828601526040850137166060820152611aad565b9160408092508101355f1a602084015281830137611aad565b9073ffffffffffffffffffffffffffffffffffffffff918281169081151580918192611cfa575b50611cd057825f52600960205260405f20938454947fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff95868114611ca3576001019055835f52600360205260405f2054169384611c54575b50611c3c575b815f52600360205260405f20817fffffffffffffffffffffffff0000000000000000000000000000000000000000825416179055827fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef5f80a490565b805f52600460205260405f2060018154019055611be0565b611c8b845f52600560205260405f207fffffffffffffffffffffffff00000000000000000000000000000000000000008154169055565b845f52600460205260405f209081540190555f611bda565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b60046040517f6cb75e3f000000000000000000000000000000000000000000000000000000008152fd5b611d049150611633565b15155f611b82565b73ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016301480611e1b575b15611d74577f000000000000000000000000000000000000000000000000000000000000000090565b60405160208101907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f82527f000000000000000000000000000000000000000000000000000000000000000060408201527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260a0815260c0810181811067ffffffffffffffff8211176115025760405251902090565b507f00000000000000000000000000000000000000000000000000000000000000004614611d4b565b60ff8114611e9a5760ff811690601f8211611e705760405191611e668361152f565b8252602082015290565b60046040517fb3512b0c000000000000000000000000000000000000000000000000000000008152fd5b50604051600754815f611eac836115e2565b80835292602090600190818116908115611f395750600114611eda575b5050611ed792500382611567565b90565b91509260075f527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c688935f925b828410611f215750611ed79450505081016020015f80611ec9565b85548785018301529485019486945092810192611f06565b905060209350611ed79592507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0091501682840152151560051b8201015f80611ec9565b60ff8114611f9e5760ff811690601f8211611e705760405191611e668361152f565b50604051600854815f611fb0836115e2565b80835292602090600190818116908115611f395750600114611fda575050611ed792500382611567565b91509260085f527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee3935f925b8284106120215750611ed79450505081016020015f80611ec9565b8554878501830152948501948694509281019261200656fea26469706673582212206c8f64a3c7a1e8239fa09b4b74196c78235899d6217a5b6368544f50a6500ada64736f6c63430008170033" +} \ No newline at end of file diff --git a/package.json b/package.json index 42c84a15..7ffaec7f 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "dependencies": { "@1inch/delegating": "1.1.0", "@1inch/limit-order-protocol-contract": "4.3.2", - "@1inch/solidity-utils": "6.6.0", + "@1inch/solidity-utils": "file:../solidity-utils", "@1inch/st1inch": "2.2.0", "@openzeppelin/contracts": "5.1.0" }, diff --git a/yarn.lock b/yarn.lock index 995a11f3..e8ff7734 100644 --- a/yarn.lock +++ b/yarn.lock @@ -69,10 +69,8 @@ mocha-chai-jest-snapshot "1.1.6" node-fetch "2.7.0" -"@1inch/solidity-utils@6.6.0": - version "6.6.0" - resolved "https://registry.yarnpkg.com/@1inch/solidity-utils/-/solidity-utils-6.6.0.tgz#2b805c250996b637e8bfe0a66a8107bd10447157" - integrity sha512-BZTN/oE6ttqPXH/nI1iYO2lPZZSinQibUvXDZGYRzXooncN+n6VELPCCIzoUqV+CoYb6ULYHk+DDlCKFQ/1peA== +"@1inch/solidity-utils@file:../solidity-utils": + version "6.9.0" dependencies: "@metamask/eth-sig-util" "8.0.0" "@nomicfoundation/hardhat-ethers" "3.0.8" @@ -84,7 +82,6 @@ dotenv "16.4.5" ethereumjs-util "7.1.5" ethers "6.13.4" - hardhat "2.23.0" hardhat-deploy "0.14.0" mocha-chai-jest-snapshot "1.1.6" node-fetch "2.7.0"