Ammend staticCall to support EVM.
@@ -121,6 +121,7 @@ func (c *DAppChainRPCClient) Query(contractAddr loom.LocalAddress, query proto.M
params := map[string]interface{}{
"contract": contractAddr.String(),
"query": queryBytes,
+ "vmType": vm.VMType_PLUGIN,
}
var r []byte
if err = c.queryClient.Call("query", params, c.getNextRequestID(), &r); err != nil {
@@ -129,6 +130,19 @@ func (c *DAppChainRPCClient) Query(contractAddr loom.LocalAddress, query proto.M
return r, nil
}
+func (c *DAppChainRPCClient) QueryEvm(contractAddr loom.LocalAddress, query []byte) ([]byte, error) {
+ params := map[string]interface{}{
+ "contract": contractAddr.String(),
+ "query": query,
+ "vmType": vm.VMType_EVM,
+ }
+ var r []byte
+ if err := c.queryClient.Call("query", params, c.getNextRequestID(), &r); err != nil {
+ return nil, err
+ }
+ return r, nil
+}
+
func (c *DAppChainRPCClient) CommitDeployTx(
from loom.Address,
signer auth.Signer,
