Skip to content

Commit 8427359

Browse files
Disable ots_contractCreator API
Disable the API on our API nodes until #2381 is resolved.
1 parent 3ab3622 commit 8427359

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

z2/src/chain/node.rs

+29-1
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,35 @@ impl ChainNode {
820820
// 4201 is the publically exposed port - We don't expose everything there.
821821
let public_api = if self.role == NodeRole::Api || self.role == NodeRole::PrivateApi {
822822
// Enable all APIs, except `admin_` for API nodes.
823-
json!({ "port": 4201, "enabled_apis": ["erigon", "eth", "net", "ots", "trace", "txpool", "web3", "zilliqa"] })
823+
json!({
824+
"port": 4201,
825+
"enabled_apis": [
826+
"erigon",
827+
"eth",
828+
"net",
829+
{
830+
"namespace": "ots",
831+
// Enable all APIs except `ots_getContractCreator` until #2381 is resolved.
832+
"apis": [
833+
"getApiLevel",
834+
"getBlockDetails",
835+
"getBlockDetailsByHash",
836+
"getBlockTransactions",
837+
"getInternalOperations",
838+
"getTransactionBySenderAndNonce",
839+
"getTransactionError",
840+
"hasCode",
841+
"searchTransactionsAfter",
842+
"searchTransactionsBefore",
843+
"traceTransaction",
844+
],
845+
},
846+
"trace",
847+
"txpool",
848+
"web3",
849+
"zilliqa",
850+
]
851+
})
824852
} else {
825853
// Only enable `eth_blockNumber` for other nodes.
826854
json!({"port": 4201, "enabled_apis": [ { "namespace": "eth", "apis": ["blockNumber"] } ] })

0 commit comments

Comments
 (0)