Skip to content
Open
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
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,17 @@ Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk


/test-ledger
/node_moules/
/public/build/
.env
.DS_Store
.anchor/
/.vscode


# Logs
logs
*.log
Expand Down
14 changes: 14 additions & 0 deletions Anchor.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[features]
seeds = false
[programs.localnet]
programs = "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS"

[registry]
url = "https://anchor.projectserum.com"

[provider]
cluster = "localnet"
wallet = "/root/.config/solana/id.json"

[scripts]
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
10 changes: 10 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[workspace]
members = [
"programs/*",
]


[profile.release.build-override]
opt-level = 3
incremental = false
codegen-units = 1
17 changes: 17 additions & 0 deletions migrations/deploy.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
GNU nano 4.8 deploy.ts
// Migrations are an early feature. Currently, they're nothing more than this
// single deploy script that's invoked from the CLI, injecting a provider
// configured from the workspace's Anchor.toml.

const anchor = require("@project-serum/anchor");

module.exports = async function (provider) {
// Configure client to use the provider.
anchor.setProvider(provider);

// Add your deploy script here.
};




10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "create-dapp-solana-nextjs",
"name": "MAXZ",
"version": "1.0.0",
"private": true,
"scripts": {
Expand All @@ -9,6 +9,7 @@
"lint": "next lint"
},
"dependencies": {
"@project-serum/anchor": "^0.22.0",
"@heroicons/react": "^1.0.5",
"@nfteyez/sol-rayz-react": "^0.8.2",
"@project-serum/anchor": "^0.19.1-beta.1",
Expand Down Expand Up @@ -41,6 +42,11 @@
"eslint-config-next": "12.0.3",
"postcss": "^8.3.11",
"tailwindcss": "^2.2.19",
"typescript": "4.4.4"
"typescript": "4.4.4",
"chai": "^4.3.4",
"mocha": "^9.0.3",
"ts-mocha": "^8.0.0",
"@types/mocha": "^9.0.0",
"typescript": "^4.3.5"
}
}
8 changes: 8 additions & 0 deletions programs/maxz/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "maxz"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
2 changes: 2 additions & 0 deletions programs/maxz/Xargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[target.bpfel-unknown-unknown.dependencies.std]
features = []
1 change: 1 addition & 0 deletions programs/maxz/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// SPDX-License-Identifier: AGPL-3.0-or-later
17 changes: 17 additions & 0 deletions tests/programs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import * as anchor from "@project-serum/anchor";
import { Program } from "@project-serum/anchor";
import { Programs } from "../target/types/programs";

describe("programs", () => {
// Configure the client to use the local cluster.
anchor.setProvider(anchor.Provider.env());

const program = anchor.workspace.Programs as Program<Programs>;

it("Is initialized!", async () => {
// Add your test here.
const tx = await program.rpc.initialize({});
console.log("Your transaction signature", tx);
});
});

9 changes: 8 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true
"incremental": true,
"types": ["mocha", "chai"],
"typeRoots": ["./node_modules/@types"],
"lib": ["es2015"],
"module": "commonjs",
"target": "es6",
"esModuleInterop": true

},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
Expand Down
Loading