From 1e1472de5fbd1b07238d007d0b4a2efe00342511 Mon Sep 17 00:00:00 2001 From: "soumalya.p" <54816468+soumalya340@users.noreply.github.com> Date: Fri, 22 Sep 2023 20:27:23 +0530 Subject: [PATCH] Hardhat: Revoke Role && Grant Role Added --- contracts/accessmaster/AccessMaster.sol | 8 +++++-- package.json | 2 +- scripts/contractAddress.js | 20 ---------------- scripts/grantRole.json | 4 ---- scripts/launch/README.md | 5 ++-- scripts/launch/launch.js | 8 +++++-- scripts/launch/launch.json | 1 + scripts/{grantRole.js => revokeRole.js} | 23 +++++++++++++++++-- scripts/revokeRole.json | 4 ++++ scripts/txhash.json | 3 --- test/01-signatureseries.test.ts | 2 +- test/02-fusionseries.test.ts | 2 +- test/03-instagen.test.ts | 2 +- test/04-eternumpass.test.ts | 2 +- test/05-offerstation.test.ts | 2 +- test/07-eternalsoul.test.ts | 2 +- .../factories/AccessMaster__factory.ts | 19 +++++++++++---- 17 files changed, 63 insertions(+), 46 deletions(-) delete mode 100644 scripts/contractAddress.js delete mode 100644 scripts/grantRole.json rename scripts/{grantRole.js => revokeRole.js} (64%) create mode 100644 scripts/revokeRole.json delete mode 100644 scripts/txhash.json diff --git a/contracts/accessmaster/AccessMaster.sol b/contracts/accessmaster/AccessMaster.sol index 406f624..dddbb30 100644 --- a/contracts/accessmaster/AccessMaster.sol +++ b/contracts/accessmaster/AccessMaster.sol @@ -19,7 +19,7 @@ contract AccessMaster is AccessControlEnumerable { keccak256("FLOW_OPERATOR_ROLE"); bytes32 public constant FLOW_CREATOR_ROLE = keccak256("FLOW_CREATOR_ROLE"); - constructor() { + constructor(address storefrontAdmin) { _setupRole(FLOW_ADMIN_ROLE, _msgSender()); _setRoleAdmin(FLOW_ADMIN_ROLE, FLOW_ADMIN_ROLE); @@ -28,7 +28,11 @@ contract AccessMaster is AccessControlEnumerable { // add Admin to operator and Creator grantRole(FLOW_OPERATOR_ROLE, _msgSender()); - grantRole(FLOW_CREATOR_ROLE, _msgSender()); + + // assigning storefront publisher Wallet the Admin role + grantRole(FLOW_ADMIN_ROLE, storefrontAdmin); + grantRole(FLOW_OPERATOR_ROLE, storefrontAdmin); + grantRole(FLOW_CREATOR_ROLE, storefrontAdmin); } function updateName( diff --git a/package.json b/package.json index 489a868..512a6c7 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ "launchFilCalibration" : "hardhat run scripts/launch/launch.js --network filecoinCalibaration", "launchLineaGoerli" : "hardhat run scripts/launch/launch.js --network lineaGoerli", "contractAddress" : "hardhat run scripts/contractAddress.js", - "grantRole" : "hardhat run scripts/grantRole.js" + "revokeRole" : "hardhat run scripts/revokeRole.js" }, "devDependencies": { diff --git a/scripts/contractAddress.js b/scripts/contractAddress.js deleted file mode 100644 index e5e7406..0000000 --- a/scripts/contractAddress.js +++ /dev/null @@ -1,20 +0,0 @@ -const { ethers } = require("hardhat") -const fs = require("fs") - -async function main() { - const scripts = `scripts/txhash.json` - const data = fs.readFileSync(scripts, "utf8") - const jsonContent = JSON.parse(data) - txHash = jsonContent.txhash - const provider = ethers.provider - const tx = await provider.getTransaction(txHash) - console.log(tx.to) -} - -// main -main() - .then(() => process.exit(0)) - .catch((error) => { - console.error(error) - process.exit(1) - }) diff --git a/scripts/grantRole.json b/scripts/grantRole.json deleted file mode 100644 index a64eb72..0000000 --- a/scripts/grantRole.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "contractAddr" : "0x1eE61c78288E87218743BeB2220A580b1b827E60", - "walletAddr" : "0x59Ecbeb479C45de2AB9996129499A5afd437454d" -} \ No newline at end of file diff --git a/scripts/launch/README.md b/scripts/launch/README.md index c010f79..2d4d550 100644 --- a/scripts/launch/README.md +++ b/scripts/launch/README.md @@ -16,6 +16,7 @@ The JSON file should have the following format: { "contractName" : "AccessMaster", "constructorParams":{ + "param1" : "0x83AD8ddAdb013fbA80DE0d802FD4fB1a949AD79f" // storefrontAdmin wallet } } ``` @@ -28,7 +29,7 @@ The JSON file should have the following format: "constructorParams":{ "param1": 30, // PlaformFee "param2" : "NFT BAZAAR", // TradeHub Name - "param3" : "0xEFf4209584cc2cE0409a5FA06175002537b055DC" // AccessMaster Address + "param3" : "0xEFf4209584cc2cE0409a5FA06175002537b055DC" // AccessMaster Address } } ``` @@ -54,7 +55,7 @@ The JSON file should have the following format: { "contractName" : "SignatureSeries", "constructorParams":{ - "param1" : "NFT Baazar", // Name + "param1" : "NFT Baazar", // Name "param2" : "NFB",// Symbol "param3" : "0x1B8683e1885B3ee93524cD58BC10Cf3Ed6af4298", // TradeHub Address "param4" : "0xEFf4209584cc2cE0409a5FA06175002537b055DC"// AccessMaster Address diff --git a/scripts/launch/launch.js b/scripts/launch/launch.js index 851a520..346b7fb 100644 --- a/scripts/launch/launch.js +++ b/scripts/launch/launch.js @@ -10,10 +10,14 @@ let blockNumber let Verified = false async function AccessMasterDeploy() { + const constructorParam = jsonContent.constructorParams + const AccessMasterFactory = await hre.ethers.getContractFactory( "AccessMaster" ) - const AccessMaster = await AccessMasterFactory.deploy() + const AccessMaster = await AccessMasterFactory.deploy( + constructorParam.param1 + ) await AccessMaster.deployed() console.log(`AccessMaster Deployed to : ${AccessMaster.address}`) //console.log(AccessMaster) @@ -23,7 +27,7 @@ async function AccessMasterDeploy() { ///VERIFY if (hre.network.name != "hardhat") { await AccessMaster.deployTransaction.wait(6) - await verify(AccessMaster.address, []) + await verify(AccessMaster.address, [constructorParam.param1]) } } diff --git a/scripts/launch/launch.json b/scripts/launch/launch.json index 53d613f..26f653b 100644 --- a/scripts/launch/launch.json +++ b/scripts/launch/launch.json @@ -1,5 +1,6 @@ { "contractName" : "AccessMaster", "constructorParams":{ + "param1" : "0x59Ecbeb479C45de2AB9996129499A5afd437454d" } } \ No newline at end of file diff --git a/scripts/grantRole.js b/scripts/revokeRole.js similarity index 64% rename from scripts/grantRole.js rename to scripts/revokeRole.js index 7137c1a..acbeadd 100644 --- a/scripts/grantRole.js +++ b/scripts/revokeRole.js @@ -5,7 +5,7 @@ const { json } = require("node:stream/consumers") async function main() { const accounts = await ethers.getSigners() - const scripts = `scripts/grantRole.json` + const scripts = `scripts/revokeRole.json` const data = fs.readFileSync(scripts, "utf8") const jsonContent = JSON.parse(data) @@ -15,6 +15,7 @@ async function main() { /// fetching the abi const contractArtifact = await artifacts.readArtifact("AccessMaster") + /// TO revoke Admin Role const FLOW_ADMIN_ROLE = "0x8f882e9b3b0c043c8507802fbb9a0ed808c8f0587361ab18424493e6841512a8" @@ -24,7 +25,7 @@ async function main() { accounts[0] ) - const transactionResponse = await contract.grantRole( + const transactionResponse = await contract.revokeRole( FLOW_ADMIN_ROLE, walletAddress ) @@ -39,6 +40,24 @@ async function main() { const isAdmin = await contract.isAdmin(walletAddress) console.log(`Is the Wallet Address ${walletAddress} is Admin : ${isAdmin}`) + + // To revoke Operator Role + const FLOW_CREATOR_ROLE = + "0xb75d0c3e4b0e01fa592ef743acc55a0b7765ffd271595abd71aa99cbf3518c07" + + const transactionResponse1 = await contract.revokeRole( + FLOW_CREATOR_ROLE, + walletAddress + ) + + const transactionReceipt1 = await transactionResponse1.wait() + + if (transactionReceipt1.status === 1) { + console.log("Transaction successful") + console.log(`The operator role is also revoked for ${contractAddress}`) + } else { + console.log("Transaction failed") + } } // main diff --git a/scripts/revokeRole.json b/scripts/revokeRole.json new file mode 100644 index 0000000..e2bf06d --- /dev/null +++ b/scripts/revokeRole.json @@ -0,0 +1,4 @@ +{ + "contractAddr" : "0xdaE2ACcC94b90587d83f5FBF3044D3954ce3d674", + "walletAddr" : "0x83AD8ddAdb013fbA80DE0d802FD4fB1a949AD79f" +} \ No newline at end of file diff --git a/scripts/txhash.json b/scripts/txhash.json deleted file mode 100644 index 9064f33..0000000 --- a/scripts/txhash.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "txhash" : "0x272e444722efd544c2357560b12dd7bc42aa160a07ec4fa6dc1ca6bfaaad3299" -} \ No newline at end of file diff --git a/test/01-signatureseries.test.ts b/test/01-signatureseries.test.ts index 3db2d0a..a587d03 100644 --- a/test/01-signatureseries.test.ts +++ b/test/01-signatureseries.test.ts @@ -24,7 +24,7 @@ describe("TradeHub && SignatureSeries Contract", () => { before(async () => { const AccessMasterFactory = await ethers.getContractFactory("AccessMaster") - accessmaster = await AccessMasterFactory.deploy() + accessmaster = await AccessMasterFactory.deploy(owner.address) let TradeHubFactory = await ethers.getContractFactory("TradeHub") diff --git a/test/02-fusionseries.test.ts b/test/02-fusionseries.test.ts index 4fdfe78..1608032 100644 --- a/test/02-fusionseries.test.ts +++ b/test/02-fusionseries.test.ts @@ -25,7 +25,7 @@ describe("TradeHub && FusionSeries contract", () => { before(async () => { const AccessMasterFactory = await ethers.getContractFactory("AccessMaster") - accessmaster = await AccessMasterFactory.deploy() + accessmaster = await AccessMasterFactory.deploy(owner.address) let TradeHubFactory = await ethers.getContractFactory("TradeHub") tradehub = await TradeHubFactory.deploy(300,"MyMarketplace", accessmaster.address) diff --git a/test/03-instagen.test.ts b/test/03-instagen.test.ts index 6720c0e..1c78fea 100644 --- a/test/03-instagen.test.ts +++ b/test/03-instagen.test.ts @@ -28,7 +28,7 @@ describe("TradeHub and InstaGen contracts", () => { Saleprice = ethers.utils.parseEther("0.01") const AccessMasterFactory = await ethers.getContractFactory("AccessMaster") - accessmaster = await AccessMasterFactory.deploy() + accessmaster = await AccessMasterFactory.deploy(owner.address) let TradeHubFactory = await ethers.getContractFactory("TradeHub") diff --git a/test/04-eternumpass.test.ts b/test/04-eternumpass.test.ts index 611c7f8..965b38a 100644 --- a/test/04-eternumpass.test.ts +++ b/test/04-eternumpass.test.ts @@ -26,7 +26,7 @@ describe("Eternumpass Contract", () => { before(async () => { const AccessMasterFactory = await ethers.getContractFactory("AccessMaster") - accessmaster = await AccessMasterFactory.deploy() + accessmaster = await AccessMasterFactory.deploy(owner.address) const EternumPassFactory = await ethers.getContractFactory("EternumPass") eternumpass = await EternumPassFactory.deploy(metadata.name, metadata.symbol,baseURI,publicSalePrice,30,subscriptionPerMonth,500,accessmaster.address,"0x1B8683e1885B3ee93524cD58BC10Cf3Ed6af4298"); }) diff --git a/test/05-offerstation.test.ts b/test/05-offerstation.test.ts index a9cf384..f0c876e 100644 --- a/test/05-offerstation.test.ts +++ b/test/05-offerstation.test.ts @@ -25,7 +25,7 @@ describe("FlowOfferStation contract", () => { } before(async () => { let AccessMasterFactory = await ethers.getContractFactory("AccessMaster") - accessMaster = await AccessMasterFactory.deploy(); + accessMaster = await AccessMasterFactory.deploy(owner.address); let offerStationFactory = await ethers.getContractFactory("MyriadFlowOfferStation") offerstation = await offerStationFactory.deploy(300 , false , accessMaster.address) diff --git a/test/07-eternalsoul.test.ts b/test/07-eternalsoul.test.ts index f1ca823..aec3b43 100644 --- a/test/07-eternalsoul.test.ts +++ b/test/07-eternalsoul.test.ts @@ -20,7 +20,7 @@ describe("Eternal Soul Contract", () => { before(async () => { const AccessMasterFactory = await ethers.getContractFactory("AccessMaster") - accessmaster = await AccessMasterFactory.deploy() + accessmaster = await AccessMasterFactory.deploy(owner.address) const EternalSoulFactory = await ethers.getContractFactory("EternalSoul") eternalsoul = await EternalSoulFactory.deploy(metadata.name, metadata.symbol,"www.xyz.com" ,accessmaster.address) diff --git a/typechain-types/factories/AccessMaster__factory.ts b/typechain-types/factories/AccessMaster__factory.ts index b91ab9f..c918b91 100644 --- a/typechain-types/factories/AccessMaster__factory.ts +++ b/typechain-types/factories/AccessMaster__factory.ts @@ -7,7 +7,13 @@ import type { AccessMaster, AccessMasterInterface } from "../AccessMaster"; const _abi = [ { - inputs: [], + inputs: [ + { + internalType: "address", + name: "storefrontAdmin", + type: "address", + }, + ], stateMutability: "nonpayable", type: "constructor", }, @@ -422,7 +428,7 @@ const _abi = [ ]; const _bytecode = - "0x60c0604052600f60809081526e26bc9020b1b1b2b9b9a6b0b9ba32b960891b60a0526002906200003090826200062c565b50604080518082019091526002815261414d60f01b60208201526003906200005990826200062c565b506004805460ff191660011790553480156200007457600080fd5b5062000090600080516020620017f0833981519152336200013b565b620000ab600080516020620017f0833981519152806200014b565b620000d560008051602062001810833981519152600080516020620017f08339815191526200014b565b620000ff600080516020620017d0833981519152600080516020620018108339815191526200014b565b6200011a600080516020620018108339815191523362000196565b62000135600080516020620017d08339815191523362000196565b62000842565b620001478282620001c4565b5050565b600082815260208190526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b600082815260208190526040902060010154620001b38162000202565b620001bf8383620001c4565b505050565b620001db82826200021160201b620005cd1760201c565b6000828152600160209081526040909120620001bf91839062000651620002b1821b17901c565b6200020e8133620002d1565b50565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000147576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556200026d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000620002c8836001600160a01b0384166200036a565b90505b92915050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000147576200031081620003bc60201b620006661760201c565b6200032683602062000678620003cf821b17811c565b604051602001620003399291906200071e565b60408051601f198184030181529082905262461bcd60e51b8252620003619160040162000797565b60405180910390fd5b6000818152600183016020526040812054620003b357508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620002cb565b506000620002cb565b6060620002cb6001600160a01b03831660145b60606000620003e0836002620007e2565b620003ed906002620007fc565b6001600160401b0381111562000407576200040762000588565b6040519080825280601f01601f19166020018201604052801562000432576020820181803683370190505b509050600360fc1b8160008151811062000450576200045062000812565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811062000482576200048262000812565b60200101906001600160f81b031916908160001a9053506000620004a8846002620007e2565b620004b5906001620007fc565b90505b600181111562000537576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110620004ed57620004ed62000812565b1a60f81b82828151811062000506576200050662000812565b60200101906001600160f81b031916908160001a90535060049490941c936200052f8162000828565b9050620004b8565b508315620002c85760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640162000361565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620005b357607f821691505b602082108103620005d457634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620001bf57600081815260208120601f850160051c81016020861015620006035750805b601f850160051c820191505b8181101562000624578281556001016200060f565b505050505050565b81516001600160401b0381111562000648576200064862000588565b62000660816200065984546200059e565b84620005da565b602080601f8311600181146200069857600084156200067f5750858301515b600019600386901b1c1916600185901b17855562000624565b600085815260208120601f198616915b82811015620006c957888601518255948401946001909101908401620006a8565b5085821015620006e85787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60005b8381101562000715578181015183820152602001620006fb565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835162000758816017850160208801620006f8565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516200078b816028840160208801620006f8565b01602801949350505050565b6020815260008251806020840152620007b8816040850160208701620006f8565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417620002cb57620002cb620007cc565b80820180821115620002cb57620002cb620007cc565b634e487b7160e01b600052603260045260246000fd5b6000816200083a576200083a620007cc565b506000190190565b610f7e80620008526000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c80637b75083c116100ad5780639ea5722b116100715780639ea5722b146102b4578063a217fddf146102db578063ca15c873146102e3578063d547741f146102f6578063efd460651461030957600080fd5b80637b75083c1461024657806384da92a71461025b5780639010d07c1461026e57806391d148541461029957806395d89b41146102ac57600080fd5b806336568abe116100f457806336568abe146101c7578063537f5312146101da57806354fd4d50146101ed578063611ed8cb1461020c5780636d70f7ae1461023357600080fd5b806301ffc9a71461013157806306fdde0314610159578063248a9ca31461016e57806324d7806c1461019f5780632f2ff15d146101b2575b600080fd5b61014461013f366004610aef565b61031c565b60405190151581526020015b60405180910390f35b610161610347565b6040516101509190610b3d565b61019161017c366004610b70565b60009081526020819052604090206001015490565b604051908152602001610150565b6101446101ad366004610ba5565b6103d5565b6101c56101c0366004610bc0565b6103ef565b005b6101c56101d5366004610bc0565b610419565b6101c56101e8366004610c02565b61049c565b6004546101fa9060ff1681565b60405160ff9091168152602001610150565b6101917f9e62e2fe49176359be731211a93beb8a4b41d6d0345b62f64c4f4e7b56ba503281565b610144610241366004610ba5565b6104c0565b610191600080516020610f2983398151915281565b6101c5610269366004610c02565b6104ec565b61028161027c366004610cb3565b610510565b6040516001600160a01b039091168152602001610150565b6101446102a7366004610bc0565b61052f565b610161610558565b6101917fb75d0c3e4b0e01fa592ef743acc55a0b7765ffd271595abd71aa99cbf3518c0781565b610191600081565b6101916102f1366004610b70565b610565565b6101c5610304366004610bc0565b61057c565b610144610317366004610ba5565b6105a1565b60006001600160e01b03198216635a05180f60e01b1480610341575061034182610814565b92915050565b6002805461035490610cd5565b80601f016020809104026020016040519081016040528092919081815260200182805461038090610cd5565b80156103cd5780601f106103a2576101008083540402835291602001916103cd565b820191906000526020600020905b8154815290600101906020018083116103b057829003601f168201915b505050505081565b6000610341600080516020610f298339815191528361052f565b60008281526020819052604090206001015461040a81610849565b6104148383610856565b505050565b6001600160a01b038116331461048e5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6104988282610878565b5050565b600080516020610f298339815191526104b481610849565b60036104148382610d5d565b60006103417f9e62e2fe49176359be731211a93beb8a4b41d6d0345b62f64c4f4e7b56ba50328361052f565b600080516020610f2983398151915261050481610849565b60026104148382610d5d565b6000828152600160205260408120610528908361089a565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6003805461035490610cd5565b6000818152600160205260408120610341906108a6565b60008281526020819052604090206001015461059781610849565b6104148383610878565b60006103417fb75d0c3e4b0e01fa592ef743acc55a0b7765ffd271595abd71aa99cbf3518c078361052f565b6105d7828261052f565b610498576000828152602081815260408083206001600160a01b03851684529091529020805460ff1916600117905561060d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610528836001600160a01b0384166108b0565b60606103416001600160a01b03831660145b60606000610687836002610e33565b610692906002610e4a565b67ffffffffffffffff8111156106aa576106aa610bec565b6040519080825280601f01601f1916602001820160405280156106d4576020820181803683370190505b509050600360fc1b816000815181106106ef576106ef610e5d565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061071e5761071e610e5d565b60200101906001600160f81b031916908160001a9053506000610742846002610e33565b61074d906001610e4a565b90505b60018111156107c5576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061078157610781610e5d565b1a60f81b82828151811061079757610797610e5d565b60200101906001600160f81b031916908160001a90535060049490941c936107be81610e73565b9050610750565b5083156105285760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610485565b60006001600160e01b03198216637965db0b60e01b148061034157506301ffc9a760e01b6001600160e01b0319831614610341565b61085381336108ff565b50565b61086082826105cd565b60008281526001602052604090206104149082610651565b6108828282610958565b600082815260016020526040902061041490826109bd565b600061052883836109d2565b6000610341825490565b60008181526001830160205260408120546108f757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610341565b506000610341565b610909828261052f565b6104985761091681610666565b610921836020610678565b604051602001610932929190610e8a565b60408051601f198184030181529082905262461bcd60e51b825261048591600401610b3d565b610962828261052f565b15610498576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610528836001600160a01b0384166109fc565b60008260000182815481106109e9576109e9610e5d565b9060005260206000200154905092915050565b60008181526001830160205260408120548015610ae5576000610a20600183610eff565b8554909150600090610a3490600190610eff565b9050818114610a99576000866000018281548110610a5457610a54610e5d565b9060005260206000200154905080876000018481548110610a7757610a77610e5d565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610aaa57610aaa610f12565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610341565b6000915050610341565b600060208284031215610b0157600080fd5b81356001600160e01b03198116811461052857600080fd5b60005b83811015610b34578181015183820152602001610b1c565b50506000910152565b6020815260008251806020840152610b5c816040850160208701610b19565b601f01601f19169190910160400192915050565b600060208284031215610b8257600080fd5b5035919050565b80356001600160a01b0381168114610ba057600080fd5b919050565b600060208284031215610bb757600080fd5b61052882610b89565b60008060408385031215610bd357600080fd5b82359150610be360208401610b89565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600060208284031215610c1457600080fd5b813567ffffffffffffffff80821115610c2c57600080fd5b818401915084601f830112610c4057600080fd5b813581811115610c5257610c52610bec565b604051601f8201601f19908116603f01168101908382118183101715610c7a57610c7a610bec565b81604052828152876020848701011115610c9357600080fd5b826020860160208301376000928101602001929092525095945050505050565b60008060408385031215610cc657600080fd5b50508035926020909101359150565b600181811c90821680610ce957607f821691505b602082108103610d0957634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561041457600081815260208120601f850160051c81016020861015610d365750805b601f850160051c820191505b81811015610d5557828155600101610d42565b505050505050565b815167ffffffffffffffff811115610d7757610d77610bec565b610d8b81610d858454610cd5565b84610d0f565b602080601f831160018114610dc05760008415610da85750858301515b600019600386901b1c1916600185901b178555610d55565b600085815260208120601f198616915b82811015610def57888601518255948401946001909101908401610dd0565b5085821015610e0d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761034157610341610e1d565b8082018082111561034157610341610e1d565b634e487b7160e01b600052603260045260246000fd5b600081610e8257610e82610e1d565b506000190190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351610ec2816017850160208801610b19565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351610ef3816028840160208801610b19565b01602801949350505050565b8181038181111561034157610341610e1d565b634e487b7160e01b600052603160045260246000fdfe8f882e9b3b0c043c8507802fbb9a0ed808c8f0587361ab18424493e6841512a8a26469706673582212205e28dbb0c2b031cf7d07845bbc34cba76daa6a1f7fa0e96f11ec3d38da8f95a664736f6c63430008110033b75d0c3e4b0e01fa592ef743acc55a0b7765ffd271595abd71aa99cbf3518c078f882e9b3b0c043c8507802fbb9a0ed808c8f0587361ab18424493e6841512a89e62e2fe49176359be731211a93beb8a4b41d6d0345b62f64c4f4e7b56ba5032"; + "0x60c0604052600f60809081526e26bc9020b1b1b2b9b9a6b0b9ba32b960891b60a05260029062000030908262000685565b50604080518082019091526002815261414d60f01b602082015260039062000059908262000685565b506004805460ff191660011790553480156200007457600080fd5b50604051620018b4380380620018b4833981016040819052620000979162000751565b620000b2600080516020620018748339815191523362000194565b620000cd6000805160206200187483398151915280620001a4565b620000f76000805160206200189483398151915260008051602062001874833981519152620001a4565b620001216000805160206200185483398151915260008051602062001894833981519152620001a4565b6200013c6000805160206200189483398151915233620001ef565b620001576000805160206200187483398151915282620001ef565b620001726000805160206200189483398151915282620001ef565b6200018d6000805160206200185483398151915282620001ef565b50620008c6565b620001a082826200021d565b5050565b600082815260208190526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b6000828152602081905260409020600101546200020c816200025b565b6200021883836200021d565b505050565b6200023482826200026a60201b620005cd1760201c565b600082815260016020908152604090912062000218918390620006516200030a821b17901c565b6200026781336200032a565b50565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16620001a0576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620002c63390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b600062000321836001600160a01b038416620003c3565b90505b92915050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16620001a05762000369816200041560201b620006661760201c565b6200037f8360206200067862000428821b17811c565b60405160200162000392929190620007a2565b60408051601f198184030181529082905262461bcd60e51b8252620003ba916004016200081b565b60405180910390fd5b60008181526001830160205260408120546200040c5750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000324565b50600062000324565b6060620003246001600160a01b03831660145b606060006200043983600262000866565b6200044690600262000880565b6001600160401b03811115620004605762000460620005e1565b6040519080825280601f01601f1916602001820160405280156200048b576020820181803683370190505b509050600360fc1b81600081518110620004a957620004a962000896565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110620004db57620004db62000896565b60200101906001600160f81b031916908160001a90535060006200050184600262000866565b6200050e90600162000880565b90505b600181111562000590576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811062000546576200054662000896565b1a60f81b8282815181106200055f576200055f62000896565b60200101906001600160f81b031916908160001a90535060049490941c936200058881620008ac565b905062000511565b508315620003215760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401620003ba565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200060c57607f821691505b6020821081036200062d57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021857600081815260208120601f850160051c810160208610156200065c5750805b601f850160051c820191505b818110156200067d5782815560010162000668565b505050505050565b81516001600160401b03811115620006a157620006a1620005e1565b620006b981620006b28454620005f7565b8462000633565b602080601f831160018114620006f15760008415620006d85750858301515b600019600386901b1c1916600185901b1785556200067d565b600085815260208120601f198616915b82811015620007225788860151825594840194600190910190840162000701565b5085821015620007415787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000602082840312156200076457600080fd5b81516001600160a01b03811681146200032157600080fd5b60005b83811015620007995781810151838201526020016200077f565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351620007dc8160178501602088016200077c565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516200080f8160288401602088016200077c565b01602801949350505050565b60208152600082518060208401526200083c8160408501602087016200077c565b601f01601f19169190910160400192915050565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141762000324576200032462000850565b8082018082111562000324576200032462000850565b634e487b7160e01b600052603260045260246000fd5b600081620008be57620008be62000850565b506000190190565b610f7e80620008d66000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c80637b75083c116100ad5780639ea5722b116100715780639ea5722b146102b4578063a217fddf146102db578063ca15c873146102e3578063d547741f146102f6578063efd460651461030957600080fd5b80637b75083c1461024657806384da92a71461025b5780639010d07c1461026e57806391d148541461029957806395d89b41146102ac57600080fd5b806336568abe116100f457806336568abe146101c7578063537f5312146101da57806354fd4d50146101ed578063611ed8cb1461020c5780636d70f7ae1461023357600080fd5b806301ffc9a71461013157806306fdde0314610159578063248a9ca31461016e57806324d7806c1461019f5780632f2ff15d146101b2575b600080fd5b61014461013f366004610aef565b61031c565b60405190151581526020015b60405180910390f35b610161610347565b6040516101509190610b3d565b61019161017c366004610b70565b60009081526020819052604090206001015490565b604051908152602001610150565b6101446101ad366004610ba5565b6103d5565b6101c56101c0366004610bc0565b6103ef565b005b6101c56101d5366004610bc0565b610419565b6101c56101e8366004610c02565b61049c565b6004546101fa9060ff1681565b60405160ff9091168152602001610150565b6101917f9e62e2fe49176359be731211a93beb8a4b41d6d0345b62f64c4f4e7b56ba503281565b610144610241366004610ba5565b6104c0565b610191600080516020610f2983398151915281565b6101c5610269366004610c02565b6104ec565b61028161027c366004610cb3565b610510565b6040516001600160a01b039091168152602001610150565b6101446102a7366004610bc0565b61052f565b610161610558565b6101917fb75d0c3e4b0e01fa592ef743acc55a0b7765ffd271595abd71aa99cbf3518c0781565b610191600081565b6101916102f1366004610b70565b610565565b6101c5610304366004610bc0565b61057c565b610144610317366004610ba5565b6105a1565b60006001600160e01b03198216635a05180f60e01b1480610341575061034182610814565b92915050565b6002805461035490610cd5565b80601f016020809104026020016040519081016040528092919081815260200182805461038090610cd5565b80156103cd5780601f106103a2576101008083540402835291602001916103cd565b820191906000526020600020905b8154815290600101906020018083116103b057829003601f168201915b505050505081565b6000610341600080516020610f298339815191528361052f565b60008281526020819052604090206001015461040a81610849565b6104148383610856565b505050565b6001600160a01b038116331461048e5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6104988282610878565b5050565b600080516020610f298339815191526104b481610849565b60036104148382610d5d565b60006103417f9e62e2fe49176359be731211a93beb8a4b41d6d0345b62f64c4f4e7b56ba50328361052f565b600080516020610f2983398151915261050481610849565b60026104148382610d5d565b6000828152600160205260408120610528908361089a565b9392505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b6003805461035490610cd5565b6000818152600160205260408120610341906108a6565b60008281526020819052604090206001015461059781610849565b6104148383610878565b60006103417fb75d0c3e4b0e01fa592ef743acc55a0b7765ffd271595abd71aa99cbf3518c078361052f565b6105d7828261052f565b610498576000828152602081815260408083206001600160a01b03851684529091529020805460ff1916600117905561060d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000610528836001600160a01b0384166108b0565b60606103416001600160a01b03831660145b60606000610687836002610e33565b610692906002610e4a565b67ffffffffffffffff8111156106aa576106aa610bec565b6040519080825280601f01601f1916602001820160405280156106d4576020820181803683370190505b509050600360fc1b816000815181106106ef576106ef610e5d565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061071e5761071e610e5d565b60200101906001600160f81b031916908160001a9053506000610742846002610e33565b61074d906001610e4a565b90505b60018111156107c5576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061078157610781610e5d565b1a60f81b82828151811061079757610797610e5d565b60200101906001600160f81b031916908160001a90535060049490941c936107be81610e73565b9050610750565b5083156105285760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610485565b60006001600160e01b03198216637965db0b60e01b148061034157506301ffc9a760e01b6001600160e01b0319831614610341565b61085381336108ff565b50565b61086082826105cd565b60008281526001602052604090206104149082610651565b6108828282610958565b600082815260016020526040902061041490826109bd565b600061052883836109d2565b6000610341825490565b60008181526001830160205260408120546108f757508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610341565b506000610341565b610909828261052f565b6104985761091681610666565b610921836020610678565b604051602001610932929190610e8a565b60408051601f198184030181529082905262461bcd60e51b825261048591600401610b3d565b610962828261052f565b15610498576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000610528836001600160a01b0384166109fc565b60008260000182815481106109e9576109e9610e5d565b9060005260206000200154905092915050565b60008181526001830160205260408120548015610ae5576000610a20600183610eff565b8554909150600090610a3490600190610eff565b9050818114610a99576000866000018281548110610a5457610a54610e5d565b9060005260206000200154905080876000018481548110610a7757610a77610e5d565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610aaa57610aaa610f12565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610341565b6000915050610341565b600060208284031215610b0157600080fd5b81356001600160e01b03198116811461052857600080fd5b60005b83811015610b34578181015183820152602001610b1c565b50506000910152565b6020815260008251806020840152610b5c816040850160208701610b19565b601f01601f19169190910160400192915050565b600060208284031215610b8257600080fd5b5035919050565b80356001600160a01b0381168114610ba057600080fd5b919050565b600060208284031215610bb757600080fd5b61052882610b89565b60008060408385031215610bd357600080fd5b82359150610be360208401610b89565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600060208284031215610c1457600080fd5b813567ffffffffffffffff80821115610c2c57600080fd5b818401915084601f830112610c4057600080fd5b813581811115610c5257610c52610bec565b604051601f8201601f19908116603f01168101908382118183101715610c7a57610c7a610bec565b81604052828152876020848701011115610c9357600080fd5b826020860160208301376000928101602001929092525095945050505050565b60008060408385031215610cc657600080fd5b50508035926020909101359150565b600181811c90821680610ce957607f821691505b602082108103610d0957634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561041457600081815260208120601f850160051c81016020861015610d365750805b601f850160051c820191505b81811015610d5557828155600101610d42565b505050505050565b815167ffffffffffffffff811115610d7757610d77610bec565b610d8b81610d858454610cd5565b84610d0f565b602080601f831160018114610dc05760008415610da85750858301515b600019600386901b1c1916600185901b178555610d55565b600085815260208120601f198616915b82811015610def57888601518255948401946001909101908401610dd0565b5085821015610e0d5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761034157610341610e1d565b8082018082111561034157610341610e1d565b634e487b7160e01b600052603260045260246000fd5b600081610e8257610e82610e1d565b506000190190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351610ec2816017850160208801610b19565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351610ef3816028840160208801610b19565b01602801949350505050565b8181038181111561034157610341610e1d565b634e487b7160e01b600052603160045260246000fdfe8f882e9b3b0c043c8507802fbb9a0ed808c8f0587361ab18424493e6841512a8a2646970667358221220dfffdb48a240bca4731f82baf72789ec028cbd1564110825cb5c591fdcc72c0464736f6c63430008110033b75d0c3e4b0e01fa592ef743acc55a0b7765ffd271595abd71aa99cbf3518c078f882e9b3b0c043c8507802fbb9a0ed808c8f0587361ab18424493e6841512a89e62e2fe49176359be731211a93beb8a4b41d6d0345b62f64c4f4e7b56ba5032"; type AccessMasterConstructorParams = | [signer?: Signer] @@ -443,14 +449,19 @@ export class AccessMaster__factory extends ContractFactory { } deploy( + storefrontAdmin: string, overrides?: Overrides & { from?: string | Promise } ): Promise { - return super.deploy(overrides || {}) as Promise; + return super.deploy( + storefrontAdmin, + overrides || {} + ) as Promise; } getDeployTransaction( + storefrontAdmin: string, overrides?: Overrides & { from?: string | Promise } ): TransactionRequest { - return super.getDeployTransaction(overrides || {}); + return super.getDeployTransaction(storefrontAdmin, overrides || {}); } attach(address: string): AccessMaster { return super.attach(address) as AccessMaster;