openhands
ab68e0cb68
fix: Dual package managers: both package-lock.json and yarn.lock tracked ( #343 )
...
Remove kraiken-lib/yarn.lock (npm is the sole package manager per CI and
build scripts), add packageManager field to kraiken-lib/package.json to
make the intent explicit, and add a single-package-manager CI step that
fails the build if yarn.lock reappears in kraiken-lib/.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 10:51:59 +00:00
openhands
f23f6b81a6
fix: kraiken-lib: fix broken tests + raise coverage to 95% ( #286 )
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-26 00:27:12 +00:00
openhands
26a9645b1f
fix: kraiken-lib: fix broken tests + raise coverage to 95% ( #286 )
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-26 00:10:45 +00:00
openhands
8c43d3890c
fix: Move BigInt formatting functions from helper.ts to kraiken-lib/format ( #246 )
...
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-24 23:00:58 +00:00
traddoo
beefe22f90
fix(web-app): position ID, issuance earned ( #96 )
...
Bug #1 : Position ID Transformation Issue (#95 )
Problem: Frontend applied incorrect byte conversion to position IDs, causing transactions to fail with "NoPermission"
errors.
Root Cause: formatId() function did little-endian byte conversion on already-correct numeric strings from GraphQL.
Fix: Direct conversion BigInt(obj.id) instead of formatId(obj.id as Hex) in usePositions.ts.
Result: Users can now successfully stake/unstake positions.
---
Bug #2 : Issuance Earned Calculation Error (#97 )
Problem: Frontend showed negative "Issuance Earned" values (e.g., -4,991 KRK) due to wrong mathematical formula.
Root Cause: Formula calculated position.totalSupplyInit - currentTotalSupply (always negative when supply increases).
Fix: Correct formula (currentTotalSupply - position.totalSupplyInit) × position.share in Vue components.
Result: Shows realistic positive earnings and enables proper economic monitoring.
Co-authored-by: steve <steve@harberg.dev>
Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/harb/pulls/96
Co-authored-by: traddoo <traddoo@noreply.codeberg.org>
Co-committed-by: traddoo <traddoo@noreply.codeberg.org>
2025-11-20 19:44:10 +01:00
johba
a555a2fdd1
refactor: migrate kraiken-lib to explicit subpath imports (BREAKING CHANGE) ( #89 )
...
Removes the barrel export pattern in favor of explicit subpath imports
for better tree-shaking and clearer dependencies.
## Breaking Changes
- Removed `src/helpers.ts` barrel export
- Removed `./helpers` from package.json exports
- Root `kraiken-lib` import now raises build errors
- Consumers MUST use explicit subpaths:
- `kraiken-lib/abis` - Contract ABIs
- `kraiken-lib/staking` - Staking helpers
- `kraiken-lib/snatch` - Snatch selection
- `kraiken-lib/ids` - Position ID utilities
- `kraiken-lib/subgraph` - Byte conversion utilities
- `kraiken-lib/taxRates` - Tax rate constants
- `kraiken-lib/version` - Version validation
## Changes
- kraiken-lib:
- Bumped version to 1.0.0 (breaking change)
- Updated src/index.ts to raise build errors
- Added backward-compatible ABI aliases (KraikenAbi, StakeAbi)
- Updated all test files to use .js extensions and new imports
- Updated documentation (README, AGENTS.md)
- Consumer updates:
- services/ponder: Updated ponder.config.ts to use kraiken-lib/abis
- web-app: Updated all imports to use subpaths
- composables/usePositions.ts: kraiken-lib/subgraph
- contracts/harb.ts: kraiken-lib/abis
- contracts/stake.ts: kraiken-lib/abis
## Migration Guide
```typescript
// OLD
import { getSnatchList } from 'kraiken-lib/helpers';
import { KraikenAbi } from 'kraiken-lib';
// NEW
import { getSnatchList } from 'kraiken-lib/snatch';
import { KraikenAbi } from 'kraiken-lib/abis';
```
Fixes #86
Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/harb/pulls/89
2025-11-20 18:54:53 +01:00
johba
6cbb1781ce
tax rate, version and compose ( #70 )
...
resolves #67
Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/70
2025-10-07 19:26:08 +02:00
johba
514be62cbb
txnbot - rewrite and lint ( #53 )
...
resolves #46
Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/53
2025-10-04 15:40:30 +02:00
johba
09c36f2c87
lint/lib ( #49 )
...
resolves #42
Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/49
2025-10-03 11:57:01 +02:00
johba
b4c829e4d6
fix/podman-postgres-integration ( #37 )
...
resolves #25
Co-authored-by: openhands <openhands@all-hands.dev>
Co-authored-by: johba <johba@harb.eth>
Reviewed-on: https://codeberg.org/johba/harb/pulls/37
2025-10-01 20:26:49 +02:00
openhands
327e2c1308
addresses issue 27
2025-10-01 14:43:55 +02:00
johba
76d84341de
feat: add ABI validation helpers for Ponder ( #29 )
...
resolves https://codeberg.org/johba/harb/issues/23
Co-authored-by: openhands <openhands@all-hands.dev>
Reviewed-on: https://codeberg.org/johba/harb/pulls/29
2025-09-30 20:02:43 +02:00
johba
25fc4a4c4d
more logic to lib
2025-09-23 16:57:49 +02:00
giteadmin
74143dfac7
Complete project rename from HARB/Harberg to KRAIKEN with KRK token symbol
...
- Renamed core contract from Harberg.sol to Kraiken.sol
- Updated token symbol from HARB to KRK
- Renamed TypeScript library from harb-lib to kraiken-lib
- Updated all contract imports and references across smart contracts
- Modified subgraph schema and source files for new naming
- Updated transaction bot dependencies and service references
- Fixed test files to use new contract and token names
- Updated documentation in CLAUDE.md and README.md
- Regenerated subgraph types and ABI files
- Added new deployment script (DeployScript2.sol)
All components compile successfully and tests pass.
Smart contracts: ✅ Compilation and tests pass
TypeScript library: ✅ Package renamed and configured
Subgraph: ✅ Code generation and build successful
Transaction bot: ✅ Dependencies updated
🤖 Generated with [Claude Code](https://claude.ai/code )
Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-11 13:47:42 +02:00