Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy more #251

Merged
merged 3 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions staking/app/deploy/1_create_realm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import {
import { Transaction, Connection } from "@solana/web3.js";
import { BN } from "bn.js";

import { AUTHORITY_KEYPAIR, PYTH_TOKEN, RPC_NODE } from "./devnet";
import { AUTHORITY_KEYPAIR, PYTH_TOKEN, RPC_NODE } from "./mainnet_beta";
import { STAKING_ADDRESS, GOVERNANCE_ADDRESS } from "../constants";
// Actual transaction hash :
// mainnet-beta : 3es1jwFLTwMBSSyVyRJ6kcJK9MmYgoJxBqBLVv6D8iKYJ1Jj2jQ9UA24ZDnJ1jqU3BVvLGMifgaGdhnhsturdtTF
// mainnet-beta (24/10/23): 2jsDyim2R1p7V1yhbfmL92USyVvTGrzS3u2Pqa6581dUpcZGgxuhu6EYVfRj4gtjsPyhquj3M7MCcECDPcZ84A1U
// devnet (10/12/23): ZoyuaKQbahuWcUkbvY4R5Cn8do8Ra1sjdKKHNQ3oVeorcn5xU7fz5uGKDAHAazD792LNytkeJz4cUu7eun8hrHr

async function main() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
import { Wallet, AnchorProvider, Program } from "@project-serum/anchor";
import { Connection } from "@solana/web3.js";
import { getTargetAccount } from "../../tests/utils/utils";
import { AUTHORITY_KEYPAIR, PYTH_TOKEN, RPC_NODE } from "./devnet";
import { AUTHORITY_KEYPAIR, PYTH_TOKEN, RPC_NODE } from "./mainnet_beta";
import { BN } from "bn.js";
import { STAKING_ADDRESS, REALM_ID, EPOCH_DURATION } from "../constants";
import {
STAKING_ADDRESS,
REALM_ID,
EPOCH_DURATION,
GOVERNANCE_ADDRESS,
} from "../constants";

// Actual transaction hash :
// mainnet-beta : KrWZD8gbH6Afg6suwHrmUi1xDo25rLDqqMAoAdunXmtUmuVk5HZgQvDqxFHC2uidL6TfXSmwKdQnkbnbZc8BZam
// devnet (24/10/23): 4LDMVLijZsD3SeDMqeUZZ9mAov1TwyRJs96yuKztd7Cmv2p9ASWuP9JQXpL9fnr3eQc3gtxJqyWDZY1D7gj2NY6j
// mainnet-beta (24/10/23): 3zNHezg9tW3uEEwU4ALQK6Ux3X7zYP4UKcbFhLHrPM4VkxNiQTTVbijdCtqVM2PFA4ZrAVc4LBKaKe8CDVGVkQJY

async function main() {
const client = new Connection(RPC_NODE);
Expand All @@ -20,11 +26,15 @@ async function main() {

const globalConfig = {
governanceAuthority: AUTHORITY_KEYPAIR.publicKey,
pythGovernanceRealm: REALM_ID,
pythTokenMint: PYTH_TOKEN,
pythGovernanceRealm: REALM_ID,
unlockingDuration: 1,
epochDuration: new BN(EPOCH_DURATION),
freeze: false,
pdaAuthority: AUTHORITY_KEYPAIR.publicKey,
governanceProgram: GOVERNANCE_ADDRESS(),
pythTokenListTime: null,
agreementHash: Array.from(Buffer.alloc(0)),
};
await program.methods.initConfig(globalConfig).rpc();

Expand Down
4 changes: 2 additions & 2 deletions staking/app/deploy/4_transfer_authorities_to_multisig.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {
PROGRAM_VERSION_V2,
PROGRAM_VERSION,
withSetRealmAuthority,
SetRealmAuthorityAction,
} from "@solana/spl-governance";
Expand Down Expand Up @@ -31,7 +31,7 @@ async function main() {
withSetRealmAuthority(
tx.instructions,
GOVERNANCE_ADDRESS(),
PROGRAM_VERSION_V2,
PROGRAM_VERSION,
REALM_ID,
AUTHORITY_KEYPAIR.publicKey,
MULTISIG_AUTHORITY,
Expand Down
Loading