Skip to content

Commit

Permalink
Create WalletAccessControl.sol
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Jul 20, 2024
1 parent 9f2fdfe commit d7ed757
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions genesis-smart-contracts/WalletAccessControl.sol
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// genesis-smart-contracts/WalletAccessControl.sol
pragma solidity ^0.8.0;

contract WalletAccessControl {
mapping (address => bool) public walletAccess;

function enableWallet(address wallet) public onlyOwner {
walletAccess[wallet] = true;
}

function disableWallet(address wallet) public onlyOwner {
walletAccess[wallet] = false;
}

function batchEnableWallets(address[] memory wallets) public onlyOwner {
for (uint256 i = 0; i < wallets.length; i++) {
walletAccess[wallets[i]] = true;
}
}

function batchDisableWallets(address[] memory wallets) public onlyOwner {
for (uint256 i = 0; i < wallets.length; i++) {
walletAccess[wallets[i]] = false;
}
}
}

0 comments on commit d7ed757

Please sign in to comment.