text: import { ethers } from "ethers";
  import sdk from "./1-initialize-sdk.js";
  
  // This is our governance contract.
  const voteModule = sdk.getVoteModule(
    "0x0377411e7D2618Bb440221fD1079D4690a8A37Cc",
  );
  
  // This is our ERC-20 contract.
  const tokenModule = sdk.getTokenModule(
    "0x3a70b9d669Fba0fd7631c533be99bDa08D50e8e6",
  );
  
  (async () => {
    try {
      await tokenModule.grantRole("minter", voteModule.address);
  
      console.log(
        "Successfully gave vote module permissions to act on token module"
      );
    } catch (error) {
      console.error(
        "failed to grant vote module permissions on token module",
        error
      );
      process.exit(1);
    }
  
    try {
      const ownedTokenBalance = await tokenModule.balanceOf(
        process.env.WALLET_ADDRESS
      );
  
      const ownedAmount = ethers.BigNumber.from(ownedTokenBalance.value);
      const percent90 = ownedAmount.div(100).mul(90);
  
      await tokenModule.transfer(
        voteModule.address,
        percent90
      );
  
      console.log("✅ Successfully transferred tokens to vote module");
    } catch (err) {
      console.error("failed to transfer tokens to vote module", err);
    }
  })();