Skip to content

refactored chain configuration, added new chains, refactored gas parameters#11

Merged
CluEleSsUK merged 26 commits into
masterfrom
feat/add-chains
Jul 3, 2025
Merged

refactored chain configuration, added new chains, refactored gas parameters#11
CluEleSsUK merged 26 commits into
masterfrom
feat/add-chains

Conversation

@CluEleSsUK
Copy link
Copy Markdown
Contributor

@CluEleSsUK CluEleSsUK commented May 28, 2025

All checks now pass.

The integration tests for the chains that do not yet have off-chain an agent, have been commented out temporarily.

Function calculateRequestPriceNative has been added to help users estimate how much their request will cost based on the callbackGasLimit and the current chain gas price (used by the RPC provider by default when not specified). This function is also used in the requestBlocklock logic.

async calculateRequestPriceNative(callbackGasLimit: bigint): Promise<bigint> {
      const requestPrice = await this.blocklockSender.calculateRequestPriceNative(callbackGasLimit)
      return requestPrice;
  }

calculateRequestPriceNative returns a better estimate compared to calling BlocklockSender.estimateRequestPriceNative(uint32 _callbackGasLimit, uint256 _requestGasPriceWei)) and passing in a hardcoded network gas price which could be lower than the current network gas price and will give the user a lower estimate compared to calculateRequestPriceNative and in some cases could lead to a fee too low revert message from BlocklockSender. @CluEleSsUK

@najienka
Copy link
Copy Markdown
Contributor

@CluEleSsUK the blocklock agents and tests are all fixed.

@CluEleSsUK CluEleSsUK merged commit 9ee4cf0 into master Jul 3, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants