소스 검색

Add blast gas claim

Jayant Krishnamurthy 1 년 전
부모
커밋
41abbc7d5c
2개의 변경된 파일12개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      contract_manager/store/contracts/EvmEntropyContracts.yaml
  2. 9 0
      target_chains/ethereum/contracts/contracts/entropy/Entropy.sol

+ 3 - 0
contract_manager/store/contracts/EvmEntropyContracts.yaml

@@ -70,3 +70,6 @@
 - chain: sei_evm_mainnet
   address: "0x98046Bd286715D3B0BC227Dd7a956b83D8978603"
   type: EvmEntropyContract
+- chain: blast_s2_testnet
+  address: "0x4D5F8fD2D76E2b00D14697c7B279Cc0e783EC731"
+  type: EvmEntropyContract

+ 9 - 0
target_chains/ethereum/contracts/contracts/entropy/Entropy.sol

@@ -10,6 +10,10 @@ import "@pythnetwork/entropy-sdk-solidity/IEntropyConsumer.sol";
 import "@openzeppelin/contracts/utils/math/SafeCast.sol";
 import "./EntropyState.sol";
 
+interface IBlast {
+    function configureClaimableGas() external;
+}
+
 // Entropy implements a secure 2-party random number generation procedure. The protocol
 // is an extension of a simple commit/reveal protocol. The original version has the following steps:
 //
@@ -76,6 +80,11 @@ import "./EntropyState.sol";
 // the user is always incentivized to reveal their random number, and that the protocol has an escape hatch for
 // cases where the user chooses not to reveal.
 abstract contract Entropy is IEntropy, EntropyState {
+    function configureClaimableGas() external {
+        IBlast(0x4300000000000000000000000000000000000002)
+            .configureClaimableGas();
+    }
+
     function _initialize(
         address admin,
         uint128 pythFeeInWei,