@xaidenlabs/uso 1.1.21 → 1.1.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/anchor_program/lib.rs +21 -0
- package/anchor_project/Anchor.toml +12 -0
- package/anchor_project/package-lock.json +2003 -0
- package/anchor_project/package.json +12 -0
- package/anchor_project/programs/uso_verifier/Cargo.toml +19 -0
- package/anchor_project/programs/uso_verifier/src/lib.rs +21 -0
- package/anchor_project/tsconfig.json +17 -0
- package/bin/index.js +1 -1
- package/package.json +1 -1
- package/src/platforms/windows.js +37 -20
- package/templates/default/package-lock.json +2035 -0
- package/templates/default/target/types/my_project.ts +45 -0
- package/templates/default/tests/my-project.ts +0 -17
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
use anchor_lang::prelude::*;
|
|
2
|
+
|
|
3
|
+
declare_id!("Your_Program_ID_Here"); // Solpg will generate this for you
|
|
4
|
+
|
|
5
|
+
#[program]
|
|
6
|
+
pub mod uso_verifier {
|
|
7
|
+
use super::*;
|
|
8
|
+
|
|
9
|
+
pub fn verify_setup(ctx: Context<Verify>) -> Result<()> {
|
|
10
|
+
let user = &ctx.accounts.user;
|
|
11
|
+
msg!("Success! Dev {} has a working Solana environment.", user.key());
|
|
12
|
+
Ok(())
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
#[derive(Accounts)]
|
|
17
|
+
pub struct Verify<'info> {
|
|
18
|
+
#[account(mut)]
|
|
19
|
+
pub user: Signer<'info>,
|
|
20
|
+
pub system_program: Program<'info, System>,
|
|
21
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
[programs.localnet]
|
|
2
|
+
uso_verifier = "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS"
|
|
3
|
+
|
|
4
|
+
[registry]
|
|
5
|
+
url = "https://api.apr.dev"
|
|
6
|
+
|
|
7
|
+
[provider]
|
|
8
|
+
cluster = "Localnet"
|
|
9
|
+
wallet = "~/.config/solana/id.json"
|
|
10
|
+
|
|
11
|
+
[scripts]
|
|
12
|
+
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
|