diff --git a/.vscode/settings.json b/.vscode/settings.json index c64bbfa1..a1720b45 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,54 +1,54 @@ { "typescript.tsdk": "node_modules/typescript/lib", "files.exclude": { - "renovate.json": false, - "tsconfig.json": false, - "vercel.json": false, - "postcss.config.js": false, - "next-env.d.ts": false, - "CHANGELOG.md": false, - ".releaserc.json": false, - ".next": false, - ".github": false, - "node_modules": false, - ".eslintrc.json": false, - "package.json": false, - ".gitignore": false, - "next.config.mjs": false, - ".env.local": false, - ".env.local.template": false, - "README.md": false, - "LICENSE": false, - "hardhat.config.ts": false, - ".prettierrc.js": false, - "typechain-types": false, - "hardhat/artifacts": false, - "hardhat/cache": false, - ".graphclient": false, - ".graphclientrc.yml": false, - "wagmi.config.ts": false, - "tailwind.config.js": false, - "hardhat/abis": false, - "build": false, - "foundry.toml": false, - ".gitmodules": false, - "slither.config.json": false, - "slither.db.json": false, - "solc.json": false, - "contracts/foundry/cache": false, - "contracts/foundry/out": false, - "contracts/hardhat/artifacts": false, - "contracts/hardhat/cache": false, - "secrets.json": false, - ".env": false, - "report.md": false, - "postcss.config.cjs": false, - "hardhat.config.cts": false, - "bun.lockb": false, - ".prettierrc.cjs": false, - "env.mjs": false, - "docs/": false, - "scripts/": false + "renovate.json": true, + "tsconfig.json": true, + "vercel.json": true, + "postcss.config.js": true, + "next-env.d.ts": true, + "CHANGELOG.md": true, + ".releaserc.json": true, + ".next": true, + ".github": true, + "node_modules": true, + ".eslintrc.json": true, + "package.json": true, + ".gitignore": true, + "next.config.mjs": true, + ".env.local": true, + ".env.local.template": true, + "README.md": true, + "LICENSE": true, + "hardhat.config.ts": true, + ".prettierrc.js": true, + "typechain-types": true, + "hardhat/artifacts": true, + "hardhat/cache": true, + ".graphclient": true, + ".graphclientrc.yml": true, + "wagmi.config.ts": true, + "tailwind.config.js": true, + "hardhat/abis": true, + "build": true, + "foundry.toml": true, + ".gitmodules": true, + "slither.config.json": true, + "slither.db.json": true, + "solc.json": true, + "contracts/foundry/cache": true, + "contracts/foundry/out": true, + "contracts/hardhat/artifacts": true, + "contracts/hardhat/cache": true, + "secrets.json": true, + ".env": true, + "report.md": true, + "postcss.config.cjs": true, + "hardhat.config.cts": true, + "bun.lockb": true, + ".prettierrc.cjs": true, + "env.mjs": true, + "docs/": true, + "scripts/": true }, // Required because of a bug with pnpm and prettier plugins. // See: https://github.com/prettier-solidity/prettier-plugin-solidity#pnpm diff --git a/contracts/abis/GlobalBlacklist.json b/contracts/abis/GlobalBlacklist.json index 85053175..bd2b512c 100644 --- a/contracts/abis/GlobalBlacklist.json +++ b/contracts/abis/GlobalBlacklist.json @@ -36,6 +36,19 @@ "name": "BeaconUpgraded", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Blacklisted", + "type": "event" + }, { "anonymous": false, "inputs": [ @@ -68,6 +81,19 @@ "name": "OwnershipTransferred", "type": "event" }, + { + "anonymous": false, + "inputs": [ + { + "indexed": false, + "internalType": "address", + "name": "account", + "type": "address" + } + ], + "name": "Unblacklisted", + "type": "event" + }, { "anonymous": false, "inputs": [ diff --git a/contracts/src/GlobalBlacklist.sol b/contracts/src/GlobalBlacklist.sol index e7a777d6..e371456a 100644 --- a/contracts/src/GlobalBlacklist.sol +++ b/contracts/src/GlobalBlacklist.sol @@ -28,6 +28,12 @@ contract GlobalBlacklist is Initializable, UUPSUpgradeable, GlobalOwnableUpgrade */ mapping(address => bool) private _list; + /// @dev Emitted when `account` is blacklisted. + event Blacklisted(address account); + + /// @dev Emitted when `account` is unblacklisted. + event Unblacklisted(address account); + /** * @notice Prevents implementation contract from being initialized as recommended by * OpenZeppelin. @@ -63,6 +69,7 @@ contract GlobalBlacklist is Initializable, UUPSUpgradeable, GlobalOwnableUpgrade function blacklist(address account) external onlyOwner { require(account != address(0), "L20"); _list[account] = true; + emit Blacklisted(account); } /** @@ -71,6 +78,7 @@ contract GlobalBlacklist is Initializable, UUPSUpgradeable, GlobalOwnableUpgrade */ function unBlacklist(address account) external onlyOwner { _list[account] = false; + emit Unblacklisted(account); } /** diff --git a/src/generated.ts b/src/generated.ts index e0f78cf2..ffb8fdfa 100644 --- a/src/generated.ts +++ b/src/generated.ts @@ -241,6 +241,19 @@ export const globalBlacklistAbi = [ ], name: 'BeaconUpgraded', }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'account', + internalType: 'address', + type: 'address', + indexed: false, + }, + ], + name: 'Blacklisted', + }, { type: 'event', anonymous: false, @@ -268,6 +281,19 @@ export const globalBlacklistAbi = [ ], name: 'OwnershipTransferred', }, + { + type: 'event', + anonymous: false, + inputs: [ + { + name: 'account', + internalType: 'address', + type: 'address', + indexed: false, + }, + ], + name: 'Unblacklisted', + }, { type: 'event', anonymous: false, @@ -3008,6 +3034,23 @@ export const useWatchGlobalBlacklistBeaconUpgradedEvent = eventName: 'BeaconUpgraded', }) +/** + * Wraps __{@link useWatchContractEvent}__ with `abi` set to __{@link globalBlacklistAbi}__ and `eventName` set to `"Blacklisted"` + * + * - [__View Contract on X1 Testnet Ok Link__](https://www.oklink.com/x1-test/address/0xc44395eC149C6743A268A901a38e5b02dc87D10C) + * - + * - [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xcA55A2394876e7Cf52e99Ab36Fc9151a7d9CF350) + * - [__View Contract on Linea Goerli Testnet Etherscan__](https://goerli.lineascan.build/address/0x7fbE57dD4Ba76CACBFfBA821EE0B7faa240a11bf) + * - [__View Contract on Linea Mainnet Etherscan__](https://lineascan.build/address/0xcA55A2394876e7Cf52e99Ab36Fc9151a7d9CF350) + * - [__View Contract on Arbitrum Goerli Arbiscan__](https://goerli.arbiscan.io/address/0x1549647606A71B2a79b85AEb54631b8eA2a1939a) + */ +export const useWatchGlobalBlacklistBlacklistedEvent = + /*#__PURE__*/ createUseWatchContractEvent({ + abi: globalBlacklistAbi, + address: globalBlacklistAddress, + eventName: 'Blacklisted', + }) + /** * Wraps __{@link useWatchContractEvent}__ with `abi` set to __{@link globalBlacklistAbi}__ and `eventName` set to `"Initialized"` * @@ -3042,6 +3085,23 @@ export const useWatchGlobalBlacklistOwnershipTransferredEvent = eventName: 'OwnershipTransferred', }) +/** + * Wraps __{@link useWatchContractEvent}__ with `abi` set to __{@link globalBlacklistAbi}__ and `eventName` set to `"Unblacklisted"` + * + * - [__View Contract on X1 Testnet Ok Link__](https://www.oklink.com/x1-test/address/0xc44395eC149C6743A268A901a38e5b02dc87D10C) + * - + * - [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xcA55A2394876e7Cf52e99Ab36Fc9151a7d9CF350) + * - [__View Contract on Linea Goerli Testnet Etherscan__](https://goerli.lineascan.build/address/0x7fbE57dD4Ba76CACBFfBA821EE0B7faa240a11bf) + * - [__View Contract on Linea Mainnet Etherscan__](https://lineascan.build/address/0xcA55A2394876e7Cf52e99Ab36Fc9151a7d9CF350) + * - [__View Contract on Arbitrum Goerli Arbiscan__](https://goerli.arbiscan.io/address/0x1549647606A71B2a79b85AEb54631b8eA2a1939a) + */ +export const useWatchGlobalBlacklistUnblacklistedEvent = + /*#__PURE__*/ createUseWatchContractEvent({ + abi: globalBlacklistAbi, + address: globalBlacklistAddress, + eventName: 'Unblacklisted', + }) + /** * Wraps __{@link useWatchContractEvent}__ with `abi` set to __{@link globalBlacklistAbi}__ and `eventName` set to `"Upgraded"` * @@ -7080,6 +7140,23 @@ export const watchGlobalBlacklistBeaconUpgradedEvent = eventName: 'BeaconUpgraded', }) +/** + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link globalBlacklistAbi}__ and `eventName` set to `"Blacklisted"` + * + * - [__View Contract on X1 Testnet Ok Link__](https://www.oklink.com/x1-test/address/0xc44395eC149C6743A268A901a38e5b02dc87D10C) + * - + * - [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xcA55A2394876e7Cf52e99Ab36Fc9151a7d9CF350) + * - [__View Contract on Linea Goerli Testnet Etherscan__](https://goerli.lineascan.build/address/0x7fbE57dD4Ba76CACBFfBA821EE0B7faa240a11bf) + * - [__View Contract on Linea Mainnet Etherscan__](https://lineascan.build/address/0xcA55A2394876e7Cf52e99Ab36Fc9151a7d9CF350) + * - [__View Contract on Arbitrum Goerli Arbiscan__](https://goerli.arbiscan.io/address/0x1549647606A71B2a79b85AEb54631b8eA2a1939a) + */ +export const watchGlobalBlacklistBlacklistedEvent = + /*#__PURE__*/ createWatchContractEvent({ + abi: globalBlacklistAbi, + address: globalBlacklistAddress, + eventName: 'Blacklisted', + }) + /** * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link globalBlacklistAbi}__ and `eventName` set to `"Initialized"` * @@ -7114,6 +7191,23 @@ export const watchGlobalBlacklistOwnershipTransferredEvent = eventName: 'OwnershipTransferred', }) +/** + * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link globalBlacklistAbi}__ and `eventName` set to `"Unblacklisted"` + * + * - [__View Contract on X1 Testnet Ok Link__](https://www.oklink.com/x1-test/address/0xc44395eC149C6743A268A901a38e5b02dc87D10C) + * - + * - [__View Contract on Arbitrum One Arbiscan__](https://arbiscan.io/address/0xcA55A2394876e7Cf52e99Ab36Fc9151a7d9CF350) + * - [__View Contract on Linea Goerli Testnet Etherscan__](https://goerli.lineascan.build/address/0x7fbE57dD4Ba76CACBFfBA821EE0B7faa240a11bf) + * - [__View Contract on Linea Mainnet Etherscan__](https://lineascan.build/address/0xcA55A2394876e7Cf52e99Ab36Fc9151a7d9CF350) + * - [__View Contract on Arbitrum Goerli Arbiscan__](https://goerli.arbiscan.io/address/0x1549647606A71B2a79b85AEb54631b8eA2a1939a) + */ +export const watchGlobalBlacklistUnblacklistedEvent = + /*#__PURE__*/ createWatchContractEvent({ + abi: globalBlacklistAbi, + address: globalBlacklistAddress, + eventName: 'Unblacklisted', + }) + /** * Wraps __{@link watchContractEvent}__ with `abi` set to __{@link globalBlacklistAbi}__ and `eventName` set to `"Upgraded"` *