@@ -2179,8 +2179,113 @@ interface Vm {
21792179 #[ cheatcode( group = Environment ) ]
21802180 function isContext( ForgeContext context) external view returns ( bool result) ;
21812181
2182- // ======== Scripts ========
2182+ // ======== Forks ========
2183+
2184+ /// Returns an array with the name of all the configured fork chains.
2185+ ///
2186+ /// Note that the configured fork chains are subsections of the `[fork]` section of 'foundry.toml'.
2187+ #[ cheatcode( group = Forking ) ]
2188+ function forkChains( ) external view returns ( string[ ] memory) ;
2189+
2190+ /// Returns an array with the ids of all the configured fork chains.
2191+ ///
2192+ /// Note that the configured fork chains are subsections of the `[fork]` section of 'foundry.toml'.
2193+ #[ cheatcode( group = Forking ) ]
2194+ function forkChainIds( ) external view returns ( uint256[ ] memory) ;
2195+
2196+ /// Returns the chain name of the currently selected fork.
2197+ #[ cheatcode( group = Forking ) ]
2198+ function forkChain( ) external view returns ( string memory) ;
21832199
2200+ /// Returns the chain id of the currently selected fork.
2201+ #[ cheatcode( group = Forking ) ]
2202+ function forkChainId( ) external view returns ( uint256) ;
2203+
2204+ /// Returns the rpc url of the currently selected fork.
2205+ ///
2206+ /// By default, the rpc url of each fork is derived from the `[rpc_endpoints]`, unless
2207+ /// the rpc config is specifically informed in the fork config for that specific chain.
2208+ #[ cheatcode( group = Forking ) ]
2209+ function forkRpcUrl( ) external view returns ( string memory) ;
2210+
2211+ /// Returns the rpc url of the corresponding chain id.
2212+ ///
2213+ /// By default, the rpc url of each fork is derived from the `[rpc_endpoints]`, unless
2214+ /// the rpc config is specifically informed in the fork config for that specific chain.
2215+ #[ cheatcode( group = Forking ) ]
2216+ function forkChainRpcUrl( uint256 id) external view returns ( string memory) ;
2217+
2218+ /// Gets the value for the key `key` from the currently active fork and parses it as `bool`.
2219+ /// Reverts if the key was not found or the value could not be parsed.
2220+ #[ cheatcode( group = Forking ) ]
2221+ function forkBool( string memory key) external view returns ( bool ) ;
2222+
2223+ /// Gets the value for the key `key` from the fork config for chain `chain` and parses it as `bool`.
2224+ /// Reverts if the key was not found or the value could not be parsed.
2225+ #[ cheatcode( group = Forking ) ]
2226+ function forkChainBool( uint256 chain, string memory key) external view returns ( bool ) ;
2227+
2228+ /// Gets the value for the key `key` from the currently active fork and parses it as `int256`.
2229+ /// Reverts if the key was not found or the value could not be parsed.
2230+ #[ cheatcode( group = Forking ) ]
2231+ function forkInt( string memory key) external view returns ( int256) ;
2232+
2233+ /// Gets the value for the key `key` from the fork config for chain `chain` and parses it as `int256`.
2234+ /// Reverts if the key was not found or the value could not be parsed.
2235+ #[ cheatcode( group = Forking ) ]
2236+ function forkChainInt( uint256 chain, string memory key) external view returns ( int256) ;
2237+
2238+ /// Gets the value for the key `key` from the currently active fork and parses it as `uint256`.
2239+ /// Reverts if the key was not found or the value could not be parsed.
2240+ #[ cheatcode( group = Forking ) ]
2241+ function forkUint( string memory key) external view returns ( uint256) ;
2242+
2243+ /// Gets the value for the key `key` from the fork config for chain `chain` and parses it as `uint256`.
2244+ /// Reverts if the key was not found or the value could not be parsed.
2245+ #[ cheatcode( group = Forking ) ]
2246+ function forkChainUint( uint256 chain, string memory key) external view returns ( uint256) ;
2247+
2248+ /// Gets the value for the key `key` from the currently active fork and parses it as `address`.
2249+ /// Reverts if the key was not found or the value could not be parsed.
2250+ #[ cheatcode( group = Forking ) ]
2251+ function forkAddress( string memory key) external view returns ( address) ;
2252+
2253+ /// Gets the value for the key `key` from the fork config for chain `chain` and parses it as `address`.
2254+ /// Reverts if the key was not found or the value could not be parsed.
2255+ #[ cheatcode( group = Forking ) ]
2256+ function forkChainAddress( uint256 chain, string memory key) external view returns ( address) ;
2257+
2258+ /// Gets the value for the key `key` from the currently active fork and parses it as `bytes32`.
2259+ /// Reverts if the key was not found or the value could not be parsed.
2260+ #[ cheatcode( group = Forking ) ]
2261+ function forkBytes32( string memory key) external view returns ( bytes32) ;
2262+
2263+ /// Gets the value for the key `key` from the fork config for chain `chain` and parses it as `bytes32`.
2264+ /// Reverts if the key was not found or the value could not be parsed.
2265+ #[ cheatcode( group = Forking ) ]
2266+ function forkChainBytes32( uint256 chain, string memory key) external view returns ( bytes32) ;
2267+
2268+ /// Gets the value for the key `key` from the currently active fork and parses it as `string`.
2269+ /// Reverts if the key was not found or the value could not be parsed.
2270+ #[ cheatcode( group = Forking ) ]
2271+ function forkString( string memory key) external view returns ( string memory) ;
2272+
2273+ /// Gets the value for the key `key` from the fork config for chain `chain` and parses it as `string`.
2274+ /// Reverts if the key was not found or the value could not be parsed.
2275+ #[ cheatcode( group = Forking ) ]
2276+ function forkChainString( uint256 chain, string memory key) external view returns ( string memory) ;
2277+
2278+ /// Gets the value for the key `key` from the currently active fork and parses it as `bytes`.
2279+ /// Reverts if the key was not found or the value could not be parsed.
2280+ #[ cheatcode( group = Forking ) ]
2281+ function forkBytes( string memory key) external view returns ( bytes memory) ;
2282+
2283+ /// Gets the value for the key `key` from the fork config for chain `chain` and parses it as `bytes`.
2284+ /// Reverts if the key was not found or the value could not be parsed.
2285+ #[ cheatcode( group = Forking ) ]
2286+ function forkChainBytes( uint256 chain, string memory key) external view returns ( bytes memory) ;
2287+
2288+ // ======== Scripts ========
21842289 // -------- Broadcasting Transactions --------
21852290
21862291 /// Has the next call (at this call depth only) create transactions that can later be signed and sent onchain.
0 commit comments