Skip to content

Commit

Permalink
Deploy more (#251)
Browse files Browse the repository at this point in the history
* Deploy more

* Devnet done

* Let's go
  • Loading branch information
guibescos authored Oct 24, 2023
1 parent 8af6a77 commit 6c4fa74
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 8 deletions.
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
File renamed without changes.
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

1 comment on commit 6c4fa74

@vercel
Copy link

@vercel vercel bot commented on 6c4fa74 Oct 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

staking-devnet – ./

staking-devnet-pyth-web.vercel.app
staking-devnet-git-main-pyth-web.vercel.app
governance-nu.vercel.app

Please sign in to comment.