| 243 | } |
| 244 | |
| 245 | Amount getTransferFee() { |
| 246 | // Call the contract's transferFee() getter |
| 247 | nlohmann::json params = nlohmann::json::array(); |
| 248 | std::string params_json = params.dump(); |
| 249 | std::string data = abiEncode("transferFee", abi_json, params_json); |
| 250 | nlohmann::json call_object = {{"to", contract_address_}, {"data", data}}; |
| 251 | nlohmann::json params_call = {call_object, "latest"}; |
| 252 | auto response = sendJsonRpc("eth_call", params_call); |
| 253 | std::string result = response["result"]; |
| 254 | if (result.length() >= 66) { // 0x + 64 hex chars |
| 255 | // Parse uint256 from hex |
| 256 | return std::stoull(result.substr(2), nullptr, 16); |
| 257 | } |
| 258 | return 0; |
| 259 | } |
| 260 | |
| 261 | Amount getExecuteFee() { |
| 262 | // Call the contract's executeFee() getter |
nothing calls this directly
no test coverage detected