async function whitelist (deployer, permissionsManager, address) {
  const permissionSSCInfo = deployer.getApp('permissions.py', clearStateProgram);

  /*
   * - Only permissions manager can add accounts to whitelist. Which is set to alice(during deploy).
   * - If address is already whitelisted then tx is accepted (with no change)
   * - Pass the address you wish to whitelist in Txn.accounts[1] to add to whitelist
   */
  const whiteListParams = {
    type: types.TransactionType.CallApp,
    sign: types.SignType.SecretKey,
    fromAccount: permissionsManager, // permissions manager account (fails otherwise)
    appID: permissionSSCInfo.appID,
    payFlags: { totalFee: 1000 },
    appArgs: ['str:add_whitelist'],
    accounts: [address] // pass address to add to whitelisted addresses
  };
  console.log(`* Adding [${address}] to whitelisted accounts *`);
  await executeTransaction(deployer, whiteListParams);
}
/**
 * If permissions manager is a multisig address, then user should have a signed tx file, decoded tx fetched
 * from that file, append his own signature & send it to network.
 *  - Use `algob.executeSignedTxnFromFile` to execute tx from file (if using multisig account)
 *  - In below function we assume creator is a single account (alice)
 * @param deployer algobDeployer
 * @param manager permissions manager account: p_m is stored in controller smart contract. Tx is rejected if
 * manager account address is not correct
 * @param address account address to whitelist
 */
If permissions manager is a multisig address, then user should have a signed tx file, decoded tx fetched
from that file, append his own signature & send it to network.
- Use `algob.executeSignedTxnFromFile` to execute tx from file (if using multisig account)
- In below function we assume creator is a single account (alice)
@param deployer algobDeployer
@param manager permissions manager account: p_m is stored in controller smart contract. Tx is rejected if
manager account address is not correct
@param address account address to whitelist
If permissions manager is a multisig address then user should have a signed tx file decoded tx fetched from that file append his own signature & send it to network . - Use ` algob . executeSignedTxnFromFile ` to execute tx from file ( if using multisig account ) - In below function we assume creator is a single account ( alice ) @param deployer algobDeployer @param manager permissions manager account : p_m is stored in controller smart contract . Tx is rejected if manager account address is not correct @param address account address to whitelist
async function whitelist (deployer, permissionsManager, address) {
  const permissionSSCInfo = deployer.getApp('permissions.py', clearStateProgram);
  const whiteListParams = {
    type: types.TransactionType.CallApp,
    sign: types.SignType.SecretKey,
    fromAccount: permissionsManager, 
    appID: permissionSSCInfo.appID,
    payFlags: { totalFee: 1000 },
    appArgs: ['str:add_whitelist'],
    accounts: [address] 
  };
  console.log(`* Adding [${address}] to whitelisted accounts *`);
  await executeTransaction(deployer, whiteListParams);
}
async function whitelist ( deployer , permissionsManager , address ) { const permissionSSCInfo = deployer . getApp ( 'permissions.py' , clearStateProgram ) ; const whiteListParams = { type : types . TransactionType . CallApp , sign : types . SignType . SecretKey , fromAccount : permissionsManager , appID : permissionSSCInfo . appID , payFlags : { totalFee : 1000 } , appArgs : [ 'str:add_whitelist' ] , accounts : [ address ] } ; console . log ( ` ${ address } ` ) ; await executeTransaction ( deployer , whiteListParams ) ; }
If permissions manager is a multisig address, then user should have a signed tx file, decoded tx fetched
 from that file, append his own signature & send it to network.
If permissions manager is a multisig address then user should have a signed tx file decoded tx fetched from that file append his own signature & send it to network .
/*
   * - Only permissions manager can add accounts to whitelist. Which is set to alice(during deploy).
   * - If address is already whitelisted then tx is accepted (with no change)
   * - Pass the address you wish to whitelist in Txn.accounts[1] to add to whitelist
   */ // permissions manager account (fails otherwise) // pass address to add to whitelisted addresses