MCPcopy Create free account
hub / github.com/QuipNetwork/cpp-sdk / getCreationFee

Method getCreationFee

src/quip_factory.cpp:229–243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

227 }
228
229 Amount getCreationFee() {
230 // Call the contract's creationFee() getter
231 nlohmann::json params = nlohmann::json::array();
232 std::string params_json = params.dump();
233 std::string data = abiEncode("creationFee", abi_json, params_json);
234 nlohmann::json call_object = {{"to", contract_address_}, {"data", data}};
235 nlohmann::json params_call = {call_object, "latest"};
236 auto response = sendJsonRpc("eth_call", params_call);
237 std::string result = response["result"];
238 if (result.length() >= 66) { // 0x + 64 hex chars
239 // Parse uint256 from hex
240 return std::stoull(result.substr(2), nullptr, 16);
241 }
242 return 0;
243 }
244
245 Amount getTransferFee() {
246 // Call the contract's transferFee() getter

Callers

nothing calls this directly

Calls 1

abiEncodeFunction · 0.85

Tested by

no test coverage detected