Skip to content
Closed
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
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@
"rimraf": "^3.0.2",
"ts-jest": "^24.0.0",
"ts-node": "^9.0.0",
"typescript": "^4.1.3"
"typescript": "^4.1.3",
"node-gyp": "^10.0.1"
},
"resolutions": {
"react": "16.13.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/arweave-push/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"dependencies": {
"@google-cloud/storage": "^5.0.0",
"@solana/web3.js": "^1.22.0",
"@solana/web3.js": "^1",
"arweave": "1.10.13",
"busboy": "^0.3.0",
"coingecko-api": "1.0.10",
Expand Down
2 changes: 1 addition & 1 deletion packages/bridge-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@oyster/common": "0.0.2",
"@solana/spl-token": "0.1.3",
"@solana/spl-token-swap": "0.1.0",
"@solana/web3.js": "^1.22.0",
"@solana/web3.js": "^1",
"bignumber.js": "^9.0.1",
"bn.js": "^5.1.3",
"bs58": "^4.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/bridge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@solana/spl-token": "0.1.3",
"@solana/spl-token-registry": "^0.2.0",
"@solana/spl-token-swap": "0.1.0",
"@solana/web3.js": "^1.22.0",
"@solana/web3.js": "^1",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.5.0",
"@testing-library/user-event": "^7.2.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@solana/wallet-adapter-base": "^0.6.0",
"@solana/wallet-adapter-react": "^0.12.6",
"@solana/wallet-adapter-wallets": "^0.10.1",
"@solana/web3.js": "^1.22.0",
"@solana/web3.js": "^1",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.5.0",
"@testing-library/user-event": "^7.2.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/common/src/models/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ export function approve(
// if delegate is not passed ephemeral transfer authority is used
delegate?: PublicKey,
existingTransferAuthority?: Account,
tokenProgram: PublicKey = TOKEN_PROGRAM_ID,
): Account {
const tokenProgram = TOKEN_PROGRAM_ID;

const transferAuthority = existingTransferAuthority || new Account();
const delegateKey = delegate ?? transferAuthority.publicKey;
Expand Down
5 changes: 5 additions & 0 deletions packages/common/src/utils/ids.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ export let TOKEN_PROGRAM_ID = new PublicKey(
'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA',
);

export let TOKEN_2022_PROGRAM_ID = new PublicKey(
'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb',
);

export let LENDING_PROGRAM_ID = new PublicKey(
'LendZqTs7gn5CTSJU1jWKhKuVpjJGom45nnwPb2AMTi',
);
Expand Down Expand Up @@ -154,6 +158,7 @@ export const setProgramIds = (envName: string) => {
export const programIds = () => {
return {
token: TOKEN_PROGRAM_ID,
token_2022: TOKEN_2022_PROGRAM_ID,
swap: SWAP_PROGRAM_ID,
swap_legacy: SWAP_PROGRAM_LEGACY_IDS,
swapLayout: SWAP_PROGRAM_LAYOUT,
Expand Down
4 changes: 2 additions & 2 deletions packages/governance-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"url": "https://github.com/solana-labs/oyster/issues"
},
"dependencies": {
"@solana/web3.js": "^1.22.0",
"@solana/web3.js": "=1.98.0",
"bignumber.js": "^9.0.1",
"bn.js": "^5.1.3",
"borsh": "^0.3.1",
Expand All @@ -41,7 +41,7 @@
"esbuild-jest": "^0.5.0",
"jest": "^29.2.0",
"typescript": "^4.5.4",
"@solana/spl-token": "0.1.3",
"@solana/spl-token": "*",
"ts-jest": "29.0.3",
"@types/jest": "29.2.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export const withCreateMintGovernance = async (
payer: PublicKey,
governanceAuthority: PublicKey,
voterWeightRecord?: PublicKey,
tokenProgram: PublicKey = TOKEN_PROGRAM_ID,
) => {
const args = new CreateMintGovernanceArgs({
config,
Expand Down Expand Up @@ -73,7 +74,7 @@ export const withCreateMintGovernance = async (
isSigner: true,
},
{
pubkey: TOKEN_PROGRAM_ID, // 6
pubkey: tokenProgram, // 6
isWritable: false,
isSigner: false,
},
Expand Down
3 changes: 2 additions & 1 deletion packages/governance-sdk/src/governance/withCreateRealm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export async function withCreateRealm(
minCommunityWeightToCreateGovernance: BN,
communityTokenConfig?: GoverningTokenConfigAccountArgs | undefined,
councilTokenConfig?: GoverningTokenConfigAccountArgs | undefined,
tokenProgram: PublicKey = TOKEN_PROGRAM_ID,
) {
const configArgs = createRealmConfigArgs(
programVersion,
Expand Down Expand Up @@ -95,7 +96,7 @@ export async function withCreateRealm(
isWritable: false,
},
{
pubkey: TOKEN_PROGRAM_ID,
pubkey: tokenProgram,
isSigner: false,
isWritable: false,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export const withCreateTokenGovernance = async (
payer: PublicKey,
governanceAuthority: PublicKey,
voterWeightRecord?: PublicKey,
tokenProgram: PublicKey = TOKEN_PROGRAM_ID,
) => {
const args = new CreateTokenGovernanceArgs({
config,
Expand Down Expand Up @@ -77,7 +78,7 @@ export const withCreateTokenGovernance = async (
isSigner: true,
},
{
pubkey: TOKEN_PROGRAM_ID,
pubkey: tokenProgram,
isWritable: false,
isSigner: false,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const withDepositGoverningTokens = async (
payer: PublicKey,
amount: BN,
governingTokenOwnerIsSigner?: boolean,
tokenProgram: PublicKey = TOKEN_PROGRAM_ID,
) => {
const args = new DepositGoverningTokensArgs({ amount });
const data = Buffer.from(
Expand Down Expand Up @@ -97,7 +98,7 @@ export const withDepositGoverningTokens = async (
isSigner: false,
},
{
pubkey: TOKEN_PROGRAM_ID,
pubkey: tokenProgram,
isWritable: false,
isSigner: false,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const withRevokeGoverningTokens = async (
governingTokenMint: PublicKey,
revokeAuthority: PublicKey,
amount: BN,
tokenProgram: PublicKey = TOKEN_PROGRAM_ID,
) => {
const args = new RevokeGoverningTokensArgs({ amount });
const data = Buffer.from(
Expand Down Expand Up @@ -72,7 +73,7 @@ export const withRevokeGoverningTokens = async (
isWritable: false,
},
{
pubkey: TOKEN_PROGRAM_ID,
pubkey: tokenProgram,
isWritable: false,
isSigner: false,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const withWithdrawGoverningTokens = async (
governingTokenDestination: PublicKey,
governingTokenMint: PublicKey,
governingTokenOwner: PublicKey,
tokenProgram: PublicKey = TOKEN_PROGRAM_ID,
) => {
const args = new WithdrawGoverningTokensArgs();
const data = Buffer.from(
Expand Down Expand Up @@ -62,7 +63,7 @@ export const withWithdrawGoverningTokens = async (
isSigner: false,
},
{
pubkey: TOKEN_PROGRAM_ID,
pubkey: tokenProgram,
isWritable: false,
isSigner: false,
},
Expand Down
Loading