Skip to content

Commit b4d7242

Browse files
Den A EvDen A Ev
authored andcommitted
[FIX] Zero-Hardcode Final Restoration: Restore CI-compliant Anchor structure, fix backend test leakage, and clear Ruff lint
1 parent ca6ebd4 commit b4d7242

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+2040
-219
lines changed

backend/tests/test_payouts.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
@pytest.fixture(autouse=True)
2424
def override_admin_auth():
2525
"""Mock admin authentication for all tests in this file."""
26+
from app.api.admin import _resolve_role
27+
2628
app.dependency_overrides[_resolve_role] = lambda: ("test_admin", "admin")
2729
yield
2830
app.dependency_overrides.pop(_resolve_role, None)
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[toolchain]
2+
anchor_version = "0.30.1"
3+
4+
[features]
5+
resolution = true
6+
skip-lint = false
7+
8+
[programs.localnet]
9+
bounty_registry = "DwCJkFvRD7NJqzUnPo1njptVScDJsMS6ezZPNXxRrQxe"
10+
11+
[registry]
12+
url = "https://api.apr.dev"
13+
14+
[provider]
15+
cluster = "Localnet"
16+
wallet = "~/.config/solana/id.json"
17+
18+
[scripts]
19+
test = "npx ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[workspace]
2+
members = ["programs/*"]
3+
resolver = "2"
4+
5+
[workspace.dependencies]
6+
anchor-lang = "0.30.1"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import * as anchor from "@coral-xyz/anchor";
2+
3+
// This migration runs once when programs are first deployed.
4+
// Add one-time setup instructions here (e.g. initializing the treasury PDA).
5+
module.exports = async function (provider: anchor.AnchorProvider) {
6+
anchor.setProvider(provider);
7+
};
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "solfoundry-contracts",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"lint": "prettier --check 'tests/**/*.ts' 'migrations/**/*.ts'",
7+
"lint:fix": "prettier --write 'tests/**/*.ts' 'migrations/**/*.ts'"
8+
},
9+
"dependencies": {
10+
"@coral-xyz/anchor": "^0.30.0"
11+
},
12+
"devDependencies": {
13+
"@types/bn.js": "^5.1.0",
14+
"@types/chai": "^4.3.0",
15+
"@types/mocha": "^9.0.0",
16+
"chai": "^4.3.4",
17+
"mocha": "^9.0.3",
18+
"prettier": "^2.6.2",
19+
"ts-mocha": "^10.0.0",
20+
"typescript": "^4.3.5"
21+
}
22+
}
File renamed without changes.

contracts/programs/bounty-registry/src/errors.rs renamed to contracts/bounty-registry/programs/bounty-registry/src/errors.rs

File renamed without changes.

contracts/programs/bounty-registry/src/events.rs renamed to contracts/bounty-registry/programs/bounty-registry/src/events.rs

File renamed without changes.

contracts/programs/bounty-registry/src/instructions/close_bounty.rs renamed to contracts/bounty-registry/programs/bounty-registry/src/instructions/close_bounty.rs

File renamed without changes.

contracts/programs/bounty-registry/src/instructions/mod.rs renamed to contracts/bounty-registry/programs/bounty-registry/src/instructions/mod.rs

File renamed without changes.

0 commit comments

Comments
 (0)