Skip to content

Commit

Permalink
Update file structure
Browse files Browse the repository at this point in the history
  • Loading branch information
eth-r committed Jul 19, 2023
1 parent 360ee5b commit af4483d
Show file tree
Hide file tree
Showing 14 changed files with 34 additions and 34 deletions.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
seeds = false
skip-lint = false
[programs.localnet]
solana_tbtc_anchor = "HksEtDgsXJV1BqcuhzbLRTmXp5gHgHJktieJCtQd3pG"
tbtc = "HksEtDgsXJV1BqcuhzbLRTmXp5gHgHJktieJCtQd3pG"

[registry]
url = "https://api.apr.dev"
Expand Down

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

File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "solana-tbtc-anchor"
name = "tbtc"
version = "0.1.0"
description = "Created with Anchor"
edition = "2021"

[lib]
crate-type = ["cdylib", "lib"]
name = "solana_tbtc_anchor"
name = "tbtc"

[features]
no-entrypoint = []
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use anchor_spl::{
declare_id!("HksEtDgsXJV1BqcuhzbLRTmXp5gHgHJktieJCtQd3pG");

#[program]
pub mod solana_tbtc_anchor {
pub mod tbtc {
use super::*;

pub fn initialize(ctx: Context<Initialize>) -> Result<()> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as anchor from "@coral-xyz/anchor";
import { Program, AnchorError } from "@coral-xyz/anchor";
import * as spl from "@solana/spl-token";
import * as web3 from '@solana/web3.js';
import { SolanaTbtcAnchor } from "../target/types/solana_tbtc_anchor";
import { Tbtc } from "../target/types/tbtc";
import { expect } from 'chai';

function maybeAuthorityAnd(
Expand All @@ -13,7 +13,7 @@ function maybeAuthorityAnd(
}

async function setup(
program: Program<SolanaTbtcAnchor>,
program: Program<Tbtc>,
tbtc,
authority
) {
Expand All @@ -31,7 +31,7 @@ async function setup(
}

async function checkState(
program: Program<SolanaTbtcAnchor>,
program: Program<Tbtc>,
tbtc,
expectedAuthority,
expectedMinters,
Expand All @@ -52,7 +52,7 @@ async function checkState(
}

async function checkPaused(
program: Program<SolanaTbtcAnchor>,
program: Program<Tbtc>,
tbtc,
paused: boolean
) {
Expand All @@ -61,7 +61,7 @@ async function checkPaused(
}

function getTokenPDA(
program: Program<SolanaTbtcAnchor>,
program: Program<Tbtc>,
tbtc,
): [anchor.web3.PublicKey, number] {
return web3.PublicKey.findProgramAddressSync(
Expand All @@ -74,7 +74,7 @@ function getTokenPDA(
}

function getMinterPDA(
program: Program<SolanaTbtcAnchor>,
program: Program<Tbtc>,
tbtc,
minter
): [anchor.web3.PublicKey, number] {
Expand All @@ -89,7 +89,7 @@ function getMinterPDA(
}

async function addMinter(
program: Program<SolanaTbtcAnchor>,
program: Program<Tbtc>,
tbtc,
authority,
minter,
Expand All @@ -111,7 +111,7 @@ async function addMinter(
}

async function checkMinter(
program: Program<SolanaTbtcAnchor>,
program: Program<Tbtc>,
tbtc,
minter
) {
Expand All @@ -123,7 +123,7 @@ async function checkMinter(
}

async function removeMinter(
program: Program<SolanaTbtcAnchor>,
program: Program<Tbtc>,
tbtc,
authority,
minter,
Expand All @@ -141,7 +141,7 @@ async function removeMinter(
}

function getGuardianPDA(
program: Program<SolanaTbtcAnchor>,
program: Program<Tbtc>,
tbtc,
guardian
): [anchor.web3.PublicKey, number] {
Expand All @@ -156,7 +156,7 @@ function getGuardianPDA(
}

async function addGuardian(
program: Program<SolanaTbtcAnchor>,
program: Program<Tbtc>,
tbtc,
authority,
guardian,
Expand All @@ -178,7 +178,7 @@ async function addGuardian(
}

async function checkGuardian(
program: Program<SolanaTbtcAnchor>,
program: Program<Tbtc>,
tbtc,
guardian
) {
Expand All @@ -190,7 +190,7 @@ async function checkGuardian(
}

async function removeGuardian(
program: Program<SolanaTbtcAnchor>,
program: Program<Tbtc>,
tbtc,
authority,
guardian,
Expand All @@ -208,7 +208,7 @@ async function removeGuardian(
}

async function pause(
program: Program<SolanaTbtcAnchor>,
program: Program<Tbtc>,
tbtc,
guardian
) {
Expand All @@ -225,7 +225,7 @@ async function pause(
}

async function unpause(
program: Program<SolanaTbtcAnchor>,
program: Program<Tbtc>,
tbtc,
authority
) {
Expand All @@ -240,7 +240,7 @@ async function unpause(
}

async function setupMint(
program: Program<SolanaTbtcAnchor>,
program: Program<Tbtc>,
tbtc,
authority,
recipient,
Expand All @@ -265,7 +265,7 @@ async function setupMint(
}

async function mint(
program: Program<SolanaTbtcAnchor>,
program: Program<Tbtc>,
tbtc,
minter,
minterInfoPDA,
Expand All @@ -292,11 +292,11 @@ async function mint(
.rpc();
}

describe("solana-tbtc-anchor", () => {
describe("tbtc", () => {
// Configure the client to use the local cluster.
anchor.setProvider(anchor.AnchorProvider.env());

const program = anchor.workspace.SolanaTbtcAnchor as Program<SolanaTbtcAnchor>;
const program = anchor.workspace.Tbtc as Program<Tbtc>;


const authority = (program.provider as anchor.AnchorProvider).wallet;
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"prettier-plugin-solidity": "^1.0.0-beta.14"
},
"workspaces": [
"./cross-chain/solana/*"
"./cross-chain/solana"
]
}
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2091,9 +2091,9 @@ __metadata:
languageName: node
linkType: hard

"solana-tbtc-anchor-924226@workspace:cross-chain/solana/solana-tbtc-anchor":
"solana-d8f61a@workspace:cross-chain/solana":
version: 0.0.0-use.local
resolution: "solana-tbtc-anchor-924226@workspace:cross-chain/solana/solana-tbtc-anchor"
resolution: "solana-d8f61a@workspace:cross-chain/solana"
dependencies:
"@coral-xyz/anchor": ^0.28.0
"@solana/spl-token": ^0.3.8
Expand Down

0 comments on commit af4483d

Please sign in to comment.