text: import { ethers } from "ethers";
  import sdk from "./1-initialize-sdk.js";
  
  const voteModule = sdk.getVoteModule("0xBa0921679D29294C017af8f1214E544d455E16f6");
  const tokenModule = sdk.getTokenModule("0xb0cBEA94C3C4eDf119af6CA601ce2FB9741681B7");
  
  (async () => {
    try {
      const amount = 420_000;
  
      await voteModule.propose("Should the DAO mint an additional " + amount + " tokens into the treasury?",
        [
          {
            nativeTokenValue: 0,
            transactionData: tokenModule.contract.interface.encodeFunctionData(
              "mint", [voteModule.address, ethers.utils.parseUnits(amount.toString(), 2)]
            ),
            toAddress: tokenModule.address,
          }
        ]
      )
      console.log("✅ Successfully created proposal to mint tokens");
    } catch (error) {
      console.error("failed to create first proposal", error);
      process.exit(1);
    }
  
    try {
      const amount = 6_900;
      // Create proposal to transfer ourselves 6,900 tokens for being awesome.
      await voteModule.propose(
        "Should the DAO transfer " +
        amount + " tokens from the treasury to " +
        process.env.WALLET_ADDRESS + "?",
        [
          {
            // Again, we're sending ourselves 0 ETH. Just sending our own token.
            nativeTokenValue: 0,
            transactionData: tokenModule.contract.interface.encodeFunctionData(
              // We're doing a transfer from the treasury to our wallet.
              "transfer",
              [
                process.env.WALLET_ADDRESS,
                ethers.utils.parseUnits(amount.toString(), 2),
              ]
            ),
  
            toAddress: tokenModule.address,
          },
        ]
      );
  
      console.log(
        "✅ Successfully created proposal to reward ourselves from the treasury"
      );
    } catch (error) {
      console.error("failed to create second proposal", error);
    }
  })()
  