Skip to content

Commit

Permalink
feat: re-funds pyth
Browse files Browse the repository at this point in the history
  • Loading branch information
gabin54 committed Oct 24, 2024
1 parent 748a3b3 commit 6e1d78a
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 13 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"typescript": "^5.4.5"
},
"dependencies": {
"@morpho-org/blue-rewards-core-sdk": "0.0.9",
"@morpho-org/blue-rewards-core-sdk": "0.0.13",
"@morpho-org/morpho-ts": "^1.4.5",
"viem": "^2.9.31"
},
Expand Down Expand Up @@ -93,4 +93,4 @@
"@semantic-release/github"
]
}
}
}
16 changes: 15 additions & 1 deletion src/airdrop-programs.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { parseUnits } from "viem";

import { Address, ChainId } from "@morpho-org/blue-rewards-core-sdk";

export type AirdropRewardProgramArgs = {
Expand All @@ -7,6 +9,7 @@ export type AirdropRewardProgramArgs = {
tokenAddress: Address;
chainId: ChainId;
cidV0: string;
totalRewards: bigint;
};

/**
Expand All @@ -19,7 +22,8 @@ export type AirdropRewardProgramArgs = {
* urdAddress: "0x330eefa8a787552dc5cad3c3ca644844b1e61ddb",
* tokenAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
* cidV0: "QmUSNh34dpKFbX7YMU4fd5JbfkVYzb4e45o3pSqqXvzkKw",
* chainId: ChainId.MAINNET
* chainId: ChainId.MAINNET,
* totalRewards: 50000n
* }
* ]
*/
Expand All @@ -31,5 +35,15 @@ export const airdropPrograms: AirdropRewardProgramArgs[] = [
tokenAddress: "0x9994E35Db50125E0DF82e4c2dde62496CE330999",
cidV0: "QmbfETB4KZG96tjfPZLJHb8Xn1bjNbfK9vyUcdgfsm33WG",
chainId: ChainId.MAINNET,
totalRewards: parseUnits("600000", 18),
},
{
claimDate: 1729771200n,
fundsSender: "0xF057afeEc22E220f47AD4220871364e9E828b2e9",
urdAddress: "0x330eefa8a787552dc5cad3c3ca644844b1e61ddb",
tokenAddress: "0xeFc0CED4B3D536103e76a1c4c74F0385C8F4Bdd3",
cidV0: "Qmbb3iTjUa28n7699HFGo8pHvSqCx1sqN1L7aDBAp7685n",
chainId: ChainId.MAINNET,
totalRewards: parseUnits("50000", 6),
},
];
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,6 @@ function toAirdropRewardProgram(args: AirdropRewardProgramArgs): AirdropRewardPr
distributor,
chainId: args.chainId,
cidV0: args.cidV0,
totalRewards: args.totalRewards,
});
}
93 changes: 83 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.10.0.tgz#d2a39395c587e092d77cbbc80acf956a54f38bf7"
integrity sha512-nA9XHtlAkYfJxY7bce8DcN7eKxWWCWkU+1GR9d+U6MbNpfwQp8TI7vqOsBsMcHoT4mBu2kypKoSKnghEzOOq5Q==

"@adraffy/ens-normalize@1.10.1":
version "1.10.1"
resolved "https://registry.yarnpkg.com/@adraffy/ens-normalize/-/ens-normalize-1.10.1.tgz#63430d04bd8c5e74f8d7d049338f1cd9d4f02069"
integrity sha512-96Z2IP3mYmF1Xg2cDm8f1gWGf/HUVedQ3FMifV4kG/PQ4yEP51xDtRAEfhVNt5f/uzpNkZHwWQuUcu6D6K+Ekw==

"@ampproject/remapping@^2.2.0":
version "2.3.0"
resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.3.0.tgz#ed441b6fa600072520ce18b43d2c8cc8caecc7f4"
Expand Down Expand Up @@ -594,6 +599,27 @@
"@jridgewell/resolve-uri" "^3.1.0"
"@jridgewell/sourcemap-codec" "^1.4.14"

"@morpho-org/blue-reward-programs@^1.4.48":
version "1.4.48"
resolved "https://registry.yarnpkg.com/@morpho-org/blue-reward-programs/-/blue-reward-programs-1.4.48.tgz#ec8a0ad23988ac5a8bcbfa7d310cad4205d73622"
integrity sha512-U3d1Zckp34Se4zNPVo4MCyoreZXC4JF+ws+m4lYyvlax+6kHMbsayFPO0de7FebC9jkw6dydPKXwjEAg9Jk5Hg==
dependencies:
"@morpho-org/blue-rewards-core-sdk" "0.0.9"
"@morpho-org/morpho-ts" "^1.4.5"
viem "^2.9.31"

"@morpho-org/blue-rewards-core-sdk@0.0.13":
version "0.0.13"
resolved "https://registry.yarnpkg.com/@morpho-org/blue-rewards-core-sdk/-/blue-rewards-core-sdk-0.0.13.tgz#1bf89c2a8e06755a9f9b140cd503ee862454df40"
integrity sha512-g/dVDEOZ4XF+oibCj5y37TIZNtZpppld8An+9MYpiGQuH/Wb5G9x8oT6kaNYz2K2R5l+agM4IP8oZPI4oYMZQw==
dependencies:
"@morpho-org/blue-reward-programs" "^1.4.48"
"@morpho-org/blue-sdk" "^1.12.4"
"@morpho-org/morpho-ts" "^1.4.4"
bs58 "^5.0.0"
ethers "^6.13.4"
viem "^2.9.31"

"@morpho-org/blue-rewards-core-sdk@0.0.9":
version "0.0.9"
resolved "https://registry.yarnpkg.com/@morpho-org/blue-rewards-core-sdk/-/blue-rewards-core-sdk-0.0.9.tgz#4613f434715bbec177b35925504d5870a6cdff72"
Expand All @@ -604,23 +630,30 @@
bs58 "^5.0.0"
viem "^2.9.31"

"@morpho-org/blue-sdk@^1.0.6":
version "1.5.7"
resolved "https://registry.yarnpkg.com/@morpho-org/blue-sdk/-/blue-sdk-1.5.7.tgz#9931d922a6d01bb2106b0550b9d66dd9221d08c2"
integrity sha512-46fscBApabmMAxHnqG09Npx1fmnd+ikeyN/1u6GZ64ecm2jITrM9wTNRg7pKcPfd3Q7b6qCACrNyYsBlAZhDNg==
"@morpho-org/blue-sdk@^1.0.6", "@morpho-org/blue-sdk@^1.12.4":
version "1.12.4"
resolved "https://registry.yarnpkg.com/@morpho-org/blue-sdk/-/blue-sdk-1.12.4.tgz#5aa934d098e9112dd88078b4d45738d224fc107d"
integrity sha512-/M28VXXqRldZxGU1zWt/5S/bp/4FopAqXZ7viYcBMz3P+leBdAQBrCdN7apVsO299BIjtKWmgdBFijYyiniovw==
dependencies:
keccak256 "^1.0.6"

"@morpho-org/morpho-ts@^1.4.4":
version "1.5.7"
resolved "https://registry.yarnpkg.com/@morpho-org/morpho-ts/-/morpho-ts-1.5.7.tgz#7a1c595e36e8523b19cb5ebcb2dbe0ecbf43a0e1"
integrity sha512-DmOE/wXyv8oC56LIF/cw7YT7OYpy7Vo/gKu+/pgG8jqvQh1AYb7GelBvoKF31d4jk0ERzlsowpIcKQoCtkQfLQ==
version "1.12.4"
resolved "https://registry.yarnpkg.com/@morpho-org/morpho-ts/-/morpho-ts-1.12.4.tgz#54afbc8c2317a5fa862bba25c7bacf644629d387"
integrity sha512-w4l0faq9c8lO65yzoAX9iZabLvrcCI4y6iC6aeK7KWjJahVIye0kP4VwLJ4a+x8ROZk0mAsOoL41v7Qh6hH95A==

"@morpho-org/morpho-ts@^1.4.5":
version "1.4.5"
resolved "https://registry.yarnpkg.com/@morpho-org/morpho-ts/-/morpho-ts-1.4.5.tgz#1bb3e266a033a38958746be9b3d380deca0470ec"
integrity sha512-w3YvHlpqETaAFRooyW4YIfq6t+WOy1+S7MBReashD64Bzr6iO1hSLmIJIVlRwNtiSCh7o9fpcSOHoknLi9laqg==

"@noble/curves@1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.2.0.tgz#92d7e12e4e49b23105a2555c6984d41733d65c35"
integrity sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==
dependencies:
"@noble/hashes" "1.3.2"

"@noble/curves@1.4.0":
version "1.4.0"
resolved "https://registry.yarnpkg.com/@noble/curves/-/curves-1.4.0.tgz#f05771ef64da724997f69ee1261b2417a49522d6"
Expand All @@ -635,6 +668,11 @@
dependencies:
"@noble/hashes" "1.4.0"

"@noble/hashes@1.3.2":
version "1.3.2"
resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.3.2.tgz#6f26dbc8fbc7205873ce3cee2f690eba0d421b39"
integrity sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==

"@noble/hashes@1.4.0", "@noble/hashes@~1.4.0":
version "1.4.0"
resolved "https://registry.yarnpkg.com/@noble/hashes/-/hashes-1.4.0.tgz#45814aa329f30e4fe0ba49426f49dfccdd066426"
Expand Down Expand Up @@ -787,6 +825,13 @@
dependencies:
undici-types "~5.26.4"

"@types/node@22.7.5":
version "22.7.5"
resolved "https://registry.yarnpkg.com/@types/node/-/node-22.7.5.tgz#cfde981727a7ab3611a481510b473ae54442b92b"
integrity sha512-jML7s2NAzMWc//QSJ1a3prpk78cOPchGvXJsC3C6R6PSMoooztvRVQEz89gmBTBY1SPMaqo5teB4uNHPdetShQ==
dependencies:
undici-types "~6.19.2"

"@types/stack-utils@^2.0.0":
version "2.0.3"
resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.3.tgz#6209321eb2c1712a7e7466422b8cb1fc0d9dd5d8"
Expand Down Expand Up @@ -821,6 +866,11 @@ acorn@^8.11.0, acorn@^8.4.1:
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.12.0.tgz#1627bfa2e058148036133b8d9b51a700663c294c"
integrity sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==

aes-js@4.0.0-beta.5:
version "4.0.0-beta.5"
resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-4.0.0-beta.5.tgz#8d2452c52adedebc3a3e28465d858c11ca315873"
integrity sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==

ansi-escapes@^4.2.1:
version "4.3.2"
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e"
Expand Down Expand Up @@ -1244,6 +1294,19 @@ esprima@^4.0.0:
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==

ethers@^6.13.4:
version "6.13.4"
resolved "https://registry.yarnpkg.com/ethers/-/ethers-6.13.4.tgz#bd3e1c3dc1e7dc8ce10f9ffb4ee40967a651b53c"
integrity sha512-21YtnZVg4/zKkCQPjrDj38B1r4nQvTZLopUGMLQ1ePU2zV/joCfDC3t3iKQjWRzjjjbzR+mdAIoikeBRNkdllA==
dependencies:
"@adraffy/ens-normalize" "1.10.1"
"@noble/curves" "1.2.0"
"@noble/hashes" "1.3.2"
"@types/node" "22.7.5"
aes-js "4.0.0-beta.5"
tslib "2.7.0"
ws "8.17.1"

execa@^5.0.0:
version "5.1.1"
resolved "https://registry.yarnpkg.com/execa/-/execa-5.1.1.tgz#f80ad9cbf4298f7bd1d4c9555c21e93741c411dd"
Expand Down Expand Up @@ -2025,9 +2088,9 @@ node-addon-api@^2.0.0:
integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==

node-gyp-build@^4.2.0:
version "4.8.1"
resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.8.1.tgz#976d3ad905e71b76086f4f0b0d3637fe79b6cda5"
integrity sha512-OSs33Z9yWr148JZcbZd5WiAXhh/n9z8TxQcdMhIOlpN9AhWpLfvVFO73+m77bBABQMaY9XSvIa+qk0jlI7Gcaw==
version "4.8.2"
resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.8.2.tgz#4f802b71c1ab2ca16af830e6c1ea7dd1ad9496fa"
integrity sha512-IRUxE4BVsHWXkV/SFOut4qTlagw2aM8T5/vnTsmrHJvVoKueJHRc/JaFND7QDDc61kLYUJ6qlZM3sqTSyx2dTw==

node-int64@^0.4.0:
version "0.4.0"
Expand Down Expand Up @@ -2418,6 +2481,11 @@ ts-node@^10.9.2:
v8-compile-cache-lib "^3.0.1"
yn "3.1.1"

tslib@2.7.0:
version "2.7.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.7.0.tgz#d9b40c5c40ab59e8738f297df3087bf1a2690c01"
integrity sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==

type-detect@4.0.8:
version "4.0.8"
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c"
Expand All @@ -2438,6 +2506,11 @@ undici-types@~5.26.4:
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==

undici-types@~6.19.2:
version "6.19.8"
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-6.19.8.tgz#35111c9d1437ab83a7cdc0abae2f26d88eda0a02"
integrity sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==

update-browserslist-db@^1.0.16:
version "1.0.16"
resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz#f6d489ed90fb2f07d67784eb3f53d7891f736356"
Expand Down

0 comments on commit 6e1d78a

Please sign in to comment.