semuxproject / semux-core

Semux Core
https://www.semux.org
MIT License
76 stars 32 forks source link

Add an interface to query the contract data of the local node. #295

Open VictorECDSA opened 4 years ago

VictorECDSA commented 4 years ago

At present, there is only one call interface for contract operation. For the query of contract data, even if the contract status is not modified, the query transaction needs to be sent to the blockchain network and gas is consumed.Does the project side need to add an interface to query the local node contract status data like ethereum, instead of sending the query transaction to the blockchain network?

honeycrypto commented 4 years ago

@fenghaoming there are /local-call and /local-create interfaces in API v2.4.0 You need to enable API server in config/semux.properties and then you can find specs in swagger explorer at this address: http://127.0.0.1:5171/index.html#/Tool/localCall

local-call