@metadaoproject/futarchy 0.6.0-alpha.4 → 0.6.0-alpha.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,7 @@ import { ComputeBudgetProgram, PublicKey, SystemProgram, Transaction, } from "@s
3
3
  // import { Autocrat, IDL as AutocratIDL } from "./types/autocrat.js";
4
4
  import { IDL as FutarchyIDL } from "./types/futarchy.js";
5
5
  import BN from "bn.js";
6
- import { AUTOCRAT_PROGRAM_ID, CONDITIONAL_VAULT_PROGRAM_ID, MAINNET_USDC, PERMISSIONLESS_ACCOUNT, SQUADS_PROGRAM_CONFIG, SQUADS_PROGRAM_CONFIG_TREASURY, SQUADS_PROGRAM_ID, } from "./constants.js";
6
+ import { FUTARCHY_PROGRAM_ID, CONDITIONAL_VAULT_PROGRAM_ID, MAINNET_USDC, PERMISSIONLESS_ACCOUNT, SQUADS_PROGRAM_CONFIG, SQUADS_PROGRAM_CONFIG_TREASURY, SQUADS_PROGRAM_ID, } from "./constants.js";
7
7
  import { InstructionUtils, getConditionalTokenMintAddr, getDaoAddr, getEventAuthorityAddr, getProposalAddr, getProposalAddrV2, getQuestionAddr, getVaultAddr, } from "./utils/index.js";
8
8
  import { ConditionalVaultClient } from "./ConditionalVaultClient.js";
9
9
  import { createAssociatedTokenAccountIdempotentInstruction, getAssociatedTokenAddressSync, TOKEN_PROGRAM_ID, ASSOCIATED_TOKEN_PROGRAM_ID, } from "@solana/spl-token";
@@ -27,7 +27,7 @@ export class FutarchyClient {
27
27
  static createClient(createAutocratClientParams) {
28
28
  let { provider, autocratProgramId, conditionalVaultProgramId } = createAutocratClientParams;
29
29
  const luts = [];
30
- return new FutarchyClient(provider, autocratProgramId || AUTOCRAT_PROGRAM_ID, conditionalVaultProgramId || CONDITIONAL_VAULT_PROGRAM_ID, luts);
30
+ return new FutarchyClient(provider, autocratProgramId || FUTARCHY_PROGRAM_ID, conditionalVaultProgramId || CONDITIONAL_VAULT_PROGRAM_ID, luts);
31
31
  }
32
32
  getProgramId() {
33
33
  return this.autocrat.programId;
@@ -1,5 +1,5 @@
1
1
  import { Keypair, PublicKey } from "@solana/web3.js";
2
- export declare const AUTOCRAT_PROGRAM_ID: PublicKey;
2
+ export declare const FUTARCHY_PROGRAM_ID: PublicKey;
3
3
  export declare const AMM_PROGRAM_ID: PublicKey;
4
4
  export declare const CONDITIONAL_VAULT_PROGRAM_ID: PublicKey;
5
5
  export declare const LAUNCHPAD_PROGRAM_ID: PublicKey;
@@ -1,7 +1,7 @@
1
1
  import { Keypair, PublicKey } from "@solana/web3.js";
2
2
  import * as anchor from "@coral-xyz/anchor";
3
3
  import { BN } from "bn.js";
4
- export const AUTOCRAT_PROGRAM_ID = new PublicKey("GYX6b1pvoy329fHHH6Btb6qzwxc4WGp3J9WeAT3dWCb9");
4
+ export const FUTARCHY_PROGRAM_ID = new PublicKey("FUTARELBfJfQ8RDGhg1wdhddq1odMAJUePHFuBYfUxKq");
5
5
  export const AMM_PROGRAM_ID = new PublicKey("AMMJdEiCCa8mdugg6JPF7gFirmmxisTfDJoSNSUi5zDJ");
6
6
  export const CONDITIONAL_VAULT_PROGRAM_ID = new PublicKey("VLTX1ishMBbcX3rdBWGssxawAo1Q2X2qxYFYqiGodVg");
7
7
  export const LAUNCHPAD_PROGRAM_ID = new PublicKey("mooNhciQJi1LqHDmse2JPic2NqG2PXCanbE3ZYzP3qA");
@@ -2,7 +2,7 @@ import { PublicKey } from "@solana/web3.js";
2
2
  import { utils } from "@coral-xyz/anchor";
3
3
  import BN from "bn.js";
4
4
  import { MPL_TOKEN_METADATA_PROGRAM_ID, SHARED_LIQUIDITY_MANAGER_PROGRAM_ID, } from "../constants.js";
5
- import { LAUNCHPAD_PROGRAM_ID, AUTOCRAT_PROGRAM_ID } from "../constants.js";
5
+ import { LAUNCHPAD_PROGRAM_ID, FUTARCHY_PROGRAM_ID } from "../constants.js";
6
6
  export const getEventAuthorityAddr = (programId) => {
7
7
  return PublicKey.findProgramAddressSync([Buffer.from("__event_authority")], programId);
8
8
  };
@@ -50,7 +50,7 @@ export const getMetadataAddr = (mint) => {
50
50
  mint.toBuffer(),
51
51
  ], MPL_TOKEN_METADATA_PROGRAM_ID);
52
52
  };
53
- export const getDaoAddr = ({ nonce, daoCreator, programId = AUTOCRAT_PROGRAM_ID, }) => {
53
+ export const getDaoAddr = ({ nonce, daoCreator, programId = FUTARCHY_PROGRAM_ID, }) => {
54
54
  return PublicKey.findProgramAddressSync([
55
55
  Buffer.from("dao"),
56
56
  daoCreator.toBuffer(),
@@ -63,7 +63,7 @@ export const getDaoAddr = ({ nonce, daoCreator, programId = AUTOCRAT_PROGRAM_ID,
63
63
  export const getProposalAddr = (programId, squadsProposal) => {
64
64
  return PublicKey.findProgramAddressSync([utils.bytes.utf8.encode("proposal"), squadsProposal.toBuffer()], programId);
65
65
  };
66
- export const getProposalAddrV2 = ({ programId = AUTOCRAT_PROGRAM_ID, squadsProposal, }) => {
66
+ export const getProposalAddrV2 = ({ programId = FUTARCHY_PROGRAM_ID, squadsProposal, }) => {
67
67
  return getProposalAddr(programId, squadsProposal);
68
68
  };
69
69
  export function getLaunchAddr(programId = LAUNCHPAD_PROGRAM_ID, tokenMint) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metadaoproject/futarchy",
3
- "version": "0.6.0-alpha.4",
3
+ "version": "0.6.0-alpha.6",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",