-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@metaplex-foundation/umi-uploader-irys seems not to work anymore since removal of Deprecated RPC Methods #144
Comments
Thanks! The bundlr package is deprecated but it looks like the Irys uploader is dependent on an old version. I'll update it. |
I have the same issue as well, currently you have to monkey patch the code for now, add this somewhere in your code // Monkey patch the Connection prototype
Connection.prototype.getRecentBlockhash = async function (commitment) {
try {
const { blockhash, lastValidBlockHeight } = await this.getLatestBlockhash(
commitment
);
const recentPrioritizationFees = await this.getRecentPrioritizationFees();
const averageFee =
recentPrioritizationFees.length > 0
? recentPrioritizationFees.reduce(
(sum, fee) => sum + fee.prioritizationFee,
0
) / recentPrioritizationFees.length
: 5000;
return {
blockhash,
feeCalculator: {
lamportsPerSignature: averageFee,
},
};
} catch (e) {
throw new Error("failed to get recent blockhash: " + e);
}
}; |
This should be patched in the newest beta release. A full release will go out this week. |
Thanks you all guys, awesome support ! |
Hello,
@metaplex-foundation/umi-uploader-irys depends on an old solana/web3.js version
which calls getRecentBlockhash that has been deprecated since a while and seems now completely discarded
https://github.com/metaplex-foundation/umi/blob/main/packages/umi-uploader-irys/package.json
"@solana/web3.js": "^1.72.0",
https://solana-labs.github.io/solana-web3.js/classes/Connection.html#getRecentBlockhash
File upload does not work anymore whatever the rpc used.
https://solanacompass.com/learn/Changelog/solana-changelog-jul-3-rpc-deprecations-actions-and-blinks#removal-of-deprecated-rpc-methods-in-version-20
Probably the same issue should affect bundler
https://github.com/metaplex-foundation/umi/blob/main/packages/umi-uploader-bundlr/package.json
The text was updated successfully, but these errors were encountered: