Skip to content

Commit

Permalink
Set payer to the user wallet on dist oracle
Browse files Browse the repository at this point in the history
  • Loading branch information
ChewingGlass committed Nov 10, 2023
1 parent 7f0f865 commit 94a201d
Show file tree
Hide file tree
Showing 75 changed files with 454 additions and 160 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.6.1](https://github.com/helium/helium-program-library/compare/v0.6.0...v0.6.1) (2023-11-10)

**Note:** Version bump only for package helium-program-library





# [0.6.0](https://github.com/helium/helium-program-library/compare/v0.5.0...v0.6.0) (2023-11-10)

**Note:** Version bump only for package helium-program-library
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
"packages/*"
],
"useWorkspaces": true,
"version": "0.6.0"
"version": "0.6.1"
}
8 changes: 8 additions & 0 deletions packages/account-fetch-cache-hooks/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.6.1](https://github.com/helium/helium-program-libary/compare/v0.6.0...v0.6.1) (2023-11-10)

**Note:** Version bump only for package @helium/account-fetch-cache-hooks





# [0.6.0](https://github.com/helium/helium-program-libary/compare/v0.5.0...v0.6.0) (2023-11-10)

**Note:** Version bump only for package @helium/account-fetch-cache-hooks
Expand Down
4 changes: 2 additions & 2 deletions packages/account-fetch-cache-hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"registry": "https://registry.npmjs.org/"
},
"license": "Apache-2.0",
"version": "0.6.0",
"version": "0.6.1",
"description": "React hooks and context for account-fetch-cache",
"repository": {
"type": "git",
Expand All @@ -31,7 +31,7 @@
"prebuild": "npm run clean && npm run package"
},
"dependencies": {
"@helium/account-fetch-cache": "^0.6.0",
"@helium/account-fetch-cache": "^0.6.1",
"@solana/web3.js": "^1.78.4",
"react-async-hook": "^4.0.0"
},
Expand Down
8 changes: 8 additions & 0 deletions packages/account-fetch-cache/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.6.1](https://github.com/helium/helium-program-library/compare/v0.6.0...v0.6.1) (2023-11-10)

**Note:** Version bump only for package @helium/account-fetch-cache





# [0.6.0](https://github.com/helium/helium-program-library/compare/v0.5.0...v0.6.0) (2023-11-10)

**Note:** Version bump only for package @helium/account-fetch-cache
Expand Down
2 changes: 1 addition & 1 deletion packages/account-fetch-cache/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@helium/account-fetch-cache",
"version": "0.6.0",
"version": "0.6.1",
"description": "Solana account fetch cache to eliminate reduntant fetching, and batch fetches",
"publishConfig": {
"access": "public",
Expand Down
8 changes: 8 additions & 0 deletions packages/account-postgres-sink-service/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.6.1](https://github.com/helium/helium-program-libary/compare/v0.6.0...v0.6.1) (2023-11-10)

**Note:** Version bump only for package @helium/account-postgres-sink-service





# [0.6.0](https://github.com/helium/helium-program-libary/compare/v0.5.0...v0.6.0) (2023-11-10)

**Note:** Version bump only for package @helium/account-postgres-sink-service
Expand Down
4 changes: 2 additions & 2 deletions packages/account-postgres-sink-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"registry": "https://registry.npmjs.org/"
},
"license": "Apache-2.0",
"version": "0.6.0",
"version": "0.6.1",
"description": "Sync account data to postgres",
"repository": {
"type": "git",
Expand Down Expand Up @@ -34,7 +34,7 @@
"dependencies": {
"@coral-xyz/anchor": "^0.28.0",
"@fastify/cors": "^8.1.1",
"@helium/account-fetch-cache": "^0.6.0",
"@helium/account-fetch-cache": "^0.6.1",
"@metaplex-foundation/mpl-token-metadata": "^2.10.0",
"@solana/web3.js": "^1.78.4",
"aws-sdk": "^2.1344.0",
Expand Down
8 changes: 8 additions & 0 deletions packages/active-device-oracle/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.6.1](https://github.com/helium/helium-program-libary/compare/v0.6.0...v0.6.1) (2023-11-10)

**Note:** Version bump only for package @helium/active-device-oracle





# [0.6.0](https://github.com/helium/helium-program-libary/compare/v0.5.0...v0.6.0) (2023-11-10)

**Note:** Version bump only for package @helium/active-device-oracle
Expand Down
2 changes: 1 addition & 1 deletion packages/active-device-oracle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"registry": "https://registry.npmjs.org/"
},
"license": "Apache-2.0",
"version": "0.6.0",
"version": "0.6.1",
"description": "Oracle of helium active devices",
"repository": {
"type": "git",
Expand Down
8 changes: 8 additions & 0 deletions packages/anchor-resolvers/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.6.1](https://github.com/helium/helium-program-library/compare/v0.6.0...v0.6.1) (2023-11-10)

**Note:** Version bump only for package @helium/anchor-resolvers





# [0.6.0](https://github.com/helium/helium-program-library/compare/v0.5.0...v0.6.0) (2023-11-10)

**Note:** Version bump only for package @helium/anchor-resolvers
Expand Down
2 changes: 1 addition & 1 deletion packages/anchor-resolvers/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@helium/anchor-resolvers",
"version": "0.6.0",
"version": "0.6.1",
"description": "Wrappers around anchor custom resolvers to make composition easier",
"publishConfig": {
"access": "public",
Expand Down
8 changes: 8 additions & 0 deletions packages/circuit-breaker-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.6.1](https://github.com/helium/helium-program-libary/compare/v0.6.0...v0.6.1) (2023-11-10)

**Note:** Version bump only for package @helium/circuit-breaker-sdk





# [0.6.0](https://github.com/helium/helium-program-libary/compare/v0.5.0...v0.6.0) (2023-11-10)

**Note:** Version bump only for package @helium/circuit-breaker-sdk
Expand Down
6 changes: 3 additions & 3 deletions packages/circuit-breaker-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"registry": "https://registry.npmjs.org/"
},
"license": "Apache-2.0",
"version": "0.6.0",
"version": "0.6.1",
"description": "Interface to the circuit breaker smart contract",
"repository": {
"type": "git",
Expand All @@ -32,8 +32,8 @@
},
"dependencies": {
"@coral-xyz/anchor": "^0.28.0",
"@helium/anchor-resolvers": "^0.6.0",
"@helium/idls": "^0.6.0",
"@helium/anchor-resolvers": "^0.6.1",
"@helium/idls": "^0.6.1",
"bn.js": "^5.2.0",
"bs58": "^4.0.1"
},
Expand Down
8 changes: 8 additions & 0 deletions packages/crons/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.6.1](https://github.com/helium/helium-program-library/compare/v0.6.0...v0.6.1) (2023-11-10)

**Note:** Version bump only for package @helium/crons





# [0.6.0](https://github.com/helium/helium-program-library/compare/v0.5.0...v0.6.0) (2023-11-10)

**Note:** Version bump only for package @helium/crons
Expand Down
28 changes: 14 additions & 14 deletions packages/crons/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@helium/crons",
"version": "0.6.0",
"version": "0.6.1",
"description": "scripts to run on a schedule",
"private": true,
"publishConfig": {
Expand Down Expand Up @@ -32,22 +32,22 @@
},
"dependencies": {
"@coral-xyz/anchor": "^0.28.0",
"@helium/account-fetch-cache": "^0.6.0",
"@helium/distributor-oracle": "^0.6.0",
"@helium/fanout-sdk": "^0.6.0",
"@helium/helium-entity-manager-sdk": "^0.6.0",
"@helium/helium-sub-daos-sdk": "^0.6.0",
"@helium/idls": "^0.6.0",
"@helium/lazy-distributor-sdk": "^0.6.0",
"@helium/mobile-entity-manager-sdk": "^0.6.0",
"@helium/account-fetch-cache": "^0.6.1",
"@helium/distributor-oracle": "^0.6.1",
"@helium/fanout-sdk": "^0.6.1",
"@helium/helium-entity-manager-sdk": "^0.6.1",
"@helium/helium-sub-daos-sdk": "^0.6.1",
"@helium/idls": "^0.6.1",
"@helium/lazy-distributor-sdk": "^0.6.1",
"@helium/mobile-entity-manager-sdk": "^0.6.1",
"@helium/organization-sdk": "^0.0.8",
"@helium/price-oracle-sdk": "^0.6.0",
"@helium/price-oracle-sdk": "^0.6.1",
"@helium/proposal-sdk": "^0.0.8",
"@helium/rewards-oracle-sdk": "^0.6.0",
"@helium/spl-utils": "^0.6.0",
"@helium/rewards-oracle-sdk": "^0.6.1",
"@helium/spl-utils": "^0.6.1",
"@helium/state-controller-sdk": "^0.0.8",
"@helium/treasury-management-sdk": "^0.6.0",
"@helium/voter-stake-registry-sdk": "^0.6.0",
"@helium/treasury-management-sdk": "^0.6.1",
"@helium/voter-stake-registry-sdk": "^0.6.1",
"@solana/spl-token": "^0.3.8",
"@solana/web3.js": "^1.78.4",
"axios": "^1.3.6",
Expand Down
8 changes: 8 additions & 0 deletions packages/currency-utils/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.6.1](https://github.com/helium/helium-program-library/compare/v0.6.0...v0.6.1) (2023-11-10)

**Note:** Version bump only for package @helium/currency-utils





# [0.6.0](https://github.com/helium/helium-program-library/compare/v0.5.0...v0.6.0) (2023-11-10)

**Note:** Version bump only for package @helium/currency-utils
Expand Down
2 changes: 1 addition & 1 deletion packages/currency-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@helium/currency-utils",
"version": "0.6.0",
"version": "0.6.1",
"description": "Currency utilities",
"homepage": "https://github.com/helium/helium-program-library#readme",
"publishConfig": {
Expand Down
8 changes: 8 additions & 0 deletions packages/data-credits-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.6.1](https://github.com/helium/helium-program-libary/compare/v0.6.0...v0.6.1) (2023-11-10)

**Note:** Version bump only for package @helium/data-credits-sdk





# [0.6.0](https://github.com/helium/helium-program-libary/compare/v0.5.0...v0.6.0) (2023-11-10)

**Note:** Version bump only for package @helium/data-credits-sdk
Expand Down
10 changes: 5 additions & 5 deletions packages/data-credits-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"registry": "https://registry.npmjs.org/"
},
"license": "Apache-2.0",
"version": "0.6.0",
"version": "0.6.1",
"description": "Interface to the data-credits smart contract",
"repository": {
"type": "git",
Expand All @@ -32,10 +32,10 @@
},
"dependencies": {
"@coral-xyz/anchor": "^0.28.0",
"@helium/anchor-resolvers": "^0.6.0",
"@helium/circuit-breaker-sdk": "^0.6.0",
"@helium/helium-sub-daos-sdk": "^0.6.0",
"@helium/idls": "^0.6.0",
"@helium/anchor-resolvers": "^0.6.1",
"@helium/circuit-breaker-sdk": "^0.6.1",
"@helium/helium-sub-daos-sdk": "^0.6.1",
"@helium/idls": "^0.6.1",
"bn.js": "^5.2.0",
"bs58": "^4.0.1",
"crypto-js": "^4.1.1"
Expand Down
8 changes: 8 additions & 0 deletions packages/distributor-oracle/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.6.1](https://github.com/helium/helium-program-libary/compare/v0.6.0...v0.6.1) (2023-11-10)

**Note:** Version bump only for package @helium/distributor-oracle





# [0.6.0](https://github.com/helium/helium-program-libary/compare/v0.5.0...v0.6.0) (2023-11-10)

**Note:** Version bump only for package @helium/distributor-oracle
Expand Down
16 changes: 8 additions & 8 deletions packages/distributor-oracle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"registry": "https://registry.npmjs.org/"
},
"license": "Apache-2.0",
"version": "0.6.0",
"version": "0.6.1",
"description": "Oracle server for the lazy distributor",
"repository": {
"type": "git",
Expand Down Expand Up @@ -36,14 +36,14 @@
"dependencies": {
"@coral-xyz/anchor": "^0.28.0",
"@fastify/cors": "^8.1.1",
"@helium/account-fetch-cache": "^0.6.0",
"@helium/account-fetch-cache": "^0.6.1",
"@helium/address": "^4.10.2",
"@helium/helium-entity-manager-sdk": "^0.6.0",
"@helium/helium-sub-daos-sdk": "^0.6.0",
"@helium/idls": "^0.6.0",
"@helium/lazy-distributor-sdk": "^0.6.0",
"@helium/rewards-oracle-sdk": "^0.6.0",
"@helium/spl-utils": "^0.6.0",
"@helium/helium-entity-manager-sdk": "^0.6.1",
"@helium/helium-sub-daos-sdk": "^0.6.1",
"@helium/idls": "^0.6.1",
"@helium/lazy-distributor-sdk": "^0.6.1",
"@helium/rewards-oracle-sdk": "^0.6.1",
"@helium/spl-utils": "^0.6.1",
"@metaplex-foundation/mpl-bubblegum": "^0.7.0",
"@solana/spl-token": "^0.3.8",
"@types/sequelize": "^4.28.14",
Expand Down
6 changes: 2 additions & 4 deletions packages/distributor-oracle/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,7 @@ export async function formBulkTransactions({
lazyDistributor,
assetEndpoint,
owner: wallet,
// Make the oracle pay for the recipient to avoid newly migrated users not having enough sol to claim rewards
payer: lazyDistributorAcc.oracles[0].oracle,
payer: wallet,
getAssetFn: () => Promise.resolve(compressionAssetAccs![idx]), // cache result so we don't hit again
getAssetProofFn: assetProofsById ? () => Promise.resolve(assetProofsById[compressionAssetAccs![idx].id.toBase58()]) : undefined,
})
Expand Down Expand Up @@ -465,8 +464,7 @@ export async function formTransaction({
lazyDistributor,
assetEndpoint,
owner: wallet,
// Make the oracle pay for the recipient to avoid newly migrated users not having enough sol to claim rewards
payer: lazyDistributorAcc.oracles[0].oracle,
payer: wallet,
getAssetFn: () => Promise.resolve(assetAcc), // cache result so we don't hit again
getAssetProofFn,
})
Expand Down
8 changes: 8 additions & 0 deletions packages/entity-invalidator/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.6.1](https://github.com/helium/helium-program-libary/compare/v0.6.0...v0.6.1) (2023-11-10)

**Note:** Version bump only for package @helium/entity-invalidator





# [0.6.0](https://github.com/helium/helium-program-libary/compare/v0.5.0...v0.6.0) (2023-11-10)

**Note:** Version bump only for package @helium/entity-invalidator
Expand Down
Loading

0 comments on commit 94a201d

Please sign in to comment.