-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Feature request - Fetch code_hash without the entire ABI #4222
Comments
Actually seeing as how getting only the hash is supported in cleos, I'm moving this ticket to |
Reopening as it seems the RPC doesn't have an option for code_hash only |
Did you see this: #566 Looks like get_abi was added about 2 weeks ago.. so that will help greatly. I was foced to fetch code and the ABI at the same time. I'll update to use get_abi on this ticket. It will not tell me if it was modified though so I will have to keep re-fetching.. |
Yeah I saw that one last night too, which is massively faster than get_code, but doesn't include the hash :( |
I suggest adding abi_hash: fc::sha256 abi_hash; Then add struct get_abi_params {
name account_name;
optional<abi_hash> abi_hash;
};
struct get_abi_results {
name account_name;
optional<abi_def> abi;
optional<abi_hash> abi_hash;
};
|
Can you get it once then store the result somewhere else? As code and abi are not frequently changed? |
For getting just the code hash, see this PR: |
Great .. I'll have it in eosjs for the next release. |
The |
Some ABIs are massive ( system for instance is 1.3mb ) and take a good 1-3 seconds to fetch.
If there was a way to fetch only the hash of the contract without the rest of the ABI it would allow signature providers a way to cache ABIs locally and only re-cache if the code hash changes.
eosjs
doesn't propagate the code abi to the signature provider so it has to be double fetched ( once for eosjs and once for the signature app ) to parse data and retrieve ricardian contracts which adds between 2 - 6 seconds per contract from the moment a user clicks a button to sign to the time the transaction parameters + ricardians can be displayed to them.The text was updated successfully, but these errors were encountered: