We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
@archseer suggested this part could possibly be refactored to save some gas.
Consider this snippet from contracts/ocr2/src/contract.rs:
contracts/ocr2/src/contract.rs
// validate new config require!(f != 0, InvalidInput); require!(signers_len <= MAX_ORACLES, TooManySigners); require!(transmitters.len() == signers.len(), InvalidInput); require!(3 * (usize::from(f)) < signers_len, InvalidInput); require!(onchain_config.is_empty(), InvalidInput); require!(!offchain_config.is_empty(), InvalidInput); let (_total, mut response) = pay_oracles(&mut deps, &config, response)?; // TODO: pay_oracles already loads all the transmitters, avoid calling TRANSMITTERS.keys // Clear out oracles let keys: Vec<_> = TRANSMITTERS .keys(deps.storage, None, None, Order::Ascending) .collect(); for key in keys { TRANSMITTERS.remove(deps.storage, &to_addr(key)); } let keys: Vec<_> = SIGNERS .keys(deps.storage, None, None, Order::Ascending) .collect(); for key in keys { SIGNERS.remove(deps.storage, &key); }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
@archseer suggested this part could possibly be refactored to save some gas.
Consider this snippet from
contracts/ocr2/src/contract.rs
:The text was updated successfully, but these errors were encountered: