Skip to content

Commit 49d150a

Browse files
authored
Accumulator Updater Program (#712)
* feat(accumulator_updater): initial skeleton for accumulator_udpater program Initial layout for accumulator updater program. Includes mock-cpi-caller which is meant to represent pyth oracle(or any future allowed program) that will call the accumulator updater program. All implementation details are open for discussion/subject to change * test(accumulator_updater): add additional checks in tests and minor clean up * chore(accumulator_updater): misc clean-up * refactor(accumulator_updater): added comments & to-dos and minor refactoring to address PR comments
1 parent 94f38fd commit 49d150a

File tree

19 files changed

+5172
-0
lines changed

19 files changed

+5172
-0
lines changed

.pre-commit-config.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,23 @@ repos:
5858
entry: cargo +nightly clippy --manifest-path ./target_chains/cosmwasm/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings
5959
pass_filenames: false
6060
files: target_chains/cosmwasm
61+
# Hooks for price-service/server-rust
6162
- id: cargo-fmt-price-service
6263
name: Cargo format for Rust Price Service
6364
language: "rust"
6465
entry: cargo +nightly fmt --manifest-path ./price_service/server-rust/Cargo.toml --all -- --config-path rustfmt.toml
6566
pass_filenames: false
6667
files: price_service/server-rust
68+
# Hooks for accumulator updater contract
69+
- id: cargo-fmt-accumulator-updater
70+
name: Cargo format for accumulator updater contract
71+
language: "rust"
72+
entry: cargo +nightly fmt --manifest-path ./accumulator_updater/Cargo.toml --all -- --config-path rustfmt.toml
73+
pass_filenames: false
74+
files: accumulator_updater
75+
- id: cargo-clippy-accumulator-updater
76+
name: Cargo clippy for accumulator-updater contract
77+
language: "rust"
78+
entry: cargo +nightly clippy --manifest-path ./accumulator_updater/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings
79+
pass_filenames: false
80+
files: accumulator_updater

accumulator_updater/.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
.anchor
3+
.DS_Store
4+
target
5+
**/*.rs.bk
6+
node_modules
7+
test-ledger

accumulator_updater/.prettierignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
.anchor
3+
.DS_Store
4+
target
5+
node_modules
6+
dist
7+
build
8+
test-ledger

accumulator_updater/Anchor.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[features]
2+
seeds = true
3+
skip-lint = false
4+
[programs.localnet]
5+
accumulator_updater = "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS"
6+
mock_cpi_caller = "Dg5PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS"
7+
8+
[registry]
9+
url = "https://api.apr.dev"
10+
11+
[provider]
12+
cluster = "Localnet"
13+
wallet = "~/.config/solana/id.json"
14+
15+
[scripts]
16+
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"

0 commit comments

Comments
 (0)