| 259 | } |
| 260 | |
| 261 | Amount getExecuteFee() { |
| 262 | // Call the contract's executeFee() getter |
| 263 | nlohmann::json params = nlohmann::json::array(); |
| 264 | std::string params_json = params.dump(); |
| 265 | std::string data = abiEncode("executeFee", abi_json, params_json); |
| 266 | nlohmann::json call_object = {{"to", contract_address_}, {"data", data}}; |
| 267 | nlohmann::json params_call = {call_object, "latest"}; |
| 268 | auto response = sendJsonRpc("eth_call", params_call); |
| 269 | std::string result = response["result"]; |
| 270 | if (result.length() >= 66) { // 0x + 64 hex chars |
| 271 | // Parse uint256 from hex |
| 272 | return std::stoull(result.substr(2), nullptr, 16); |
| 273 | } |
| 274 | return 0; |
| 275 | } |
| 276 | |
| 277 | // Get chain ID from the RPC provider (cached) |
| 278 | uint64_t getChainId() const { |
nothing calls this directly
no test coverage detected