Class Web3jConfig
java.lang.Object
net.finmath.decryptionoracle.config.Web3jConfig
Web3j configuration.
Provides:
- a PRIMARY Web3j bean ("web3j") using the configured ethereum.rpcUrl (typically WS for subscriptions)
- an additional HTTP Web3j bean ("web3jHttp") used for cost-stable JSON-RPC calls (eth_call, eth_blockNumber, eth_getLogs)
If ethereum.httpRpcUrl is not set and ethereum.rpcUrl is a WS URL (ws:// or wss://),
the HTTP URL is derived by replacing:
wss:// -> https://
ws:// -> http://
- Author:
- Christian Fries
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Web3jConfig
public Web3jConfig()
-
-
Method Details
-
web3j
Primary Web3j bean. Use WS if rpcUrl starts with ws/wss, else HTTP. Note: This bean is marked @Primary to avoid ambiguity when web3jHttp is also present.- Throws:
Exception
-
web3jHttp
@Bean(name="web3jHttp", destroyMethod="shutdown") public org.web3j.protocol.Web3j web3jHttp()HTTP Web3j bean used for non-subscription JSON-RPC calls (preflight eth_call, eth_blockNumber, etc.)
-