Skip to content

Commit

Permalink
build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
heyAyushh committed Aug 20, 2024
1 parent 26b5163 commit 1da7a16
Show file tree
Hide file tree
Showing 9 changed files with 160 additions and 24 deletions.
7 changes: 7 additions & 0 deletions .github/.ghaignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,10 @@ compression/cutils/anchor
compression/cnft-vault/anchor
# builds but need to test on localhost
compression/cnft-burn/anchor

# test failing
# https://github.com/solana-developers/helpers/issues/40
tokens/escrow/anchor

# not live
tokens/token-2022/group/anchor
2 changes: 1 addition & 1 deletion basics/favorites/anchor/Anchor.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ cluster = "Localnet"
wallet = "~/.config/solana/id.json"

[scripts]
test = "pnpm ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
test = "pnpm ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.test.ts"
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const web3 = anchor.web3;
const IDL = require('../target/idl/favorites.json');
const PROGRAM_ID = new PublicKey(IDL.address);

describe('Favorites', async () => {
describe('Favorites Bankrun', async () => {
// Use the cluster and the keypair from Anchor.toml
// Load programs into anchor-bankrun
const context = await startAnchor('', [{ name: 'favorites', programId: PROGRAM_ID }], []);
Expand All @@ -29,13 +29,11 @@ describe('Favorites', async () => {
const favoriteHobbies = ['skiing', 'skydiving', 'biking'];

// We don't need to airdrop if we're using the local cluster
// because the local cluster gives us 85 billion dollars worth of SOL
before(async () => {
const balance = await provider.connection.getBalance(user.publicKey);
const balanceInSOL = balance / web3.LAMPORTS_PER_SOL;
const formattedBalance = new Intl.NumberFormat().format(balanceInSOL);
console.log(`Balance: ${formattedBalance} SOL`);
});
// because the local cluster gives us 1,000,000 SOL
const balance = await context.banksClient.getBalance(user.publicKey);
const balanceInSOL = balance / BigInt(web3.LAMPORTS_PER_SOL);
const formattedBalance = new Intl.NumberFormat().format(balanceInSOL);
console.log(`Balance: ${formattedBalance} SOL`);

it('Writes our favorites to the blockchain', async () => {
await program.methods
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tokens/escrow/anchor/Anchor.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ cluster = "Localnet"
wallet = "~/.config/solana/id.json"

[scripts]
test = "pnpm ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
test = "pnpm ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.test.ts"
155 changes: 143 additions & 12 deletions tokens/escrow/anchor/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
2 changes: 1 addition & 1 deletion tokens/token-2022/group/anchor/programs/group/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ idl-build = ["anchor-lang/idl-build", "anchor-spl/idl-build"]
[dependencies]
anchor-lang = "0.30.0"
anchor-spl = "0.30.0"
spl-token-group-interface = "=0.2.3"
spl-token-group-interface = "=0.2.5"
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ session-keys = { version = "2.0.3", features = ["no-entrypoint"] }
solana-program = "1.18.17"
spl-token-2022 = { version="2.0.1", features = [ "no-entrypoint" ] }
spl-token = { version = "4.0.1", features = [ "no-entrypoint" ] }
spl-token-metadata-interface = { version = "0.2.1"}
spl-token-metadata-interface = { version = "=0.3.5"}

0 comments on commit 1da7a16

Please sign in to comment.