- Introduced Aggregator.sol for Chainlink-compatible oracle functionality, including round-based updates and access control. - Added OracleWithCCIP.sol to extend Aggregator with CCIP cross-chain messaging capabilities. - Created .gitmodules to include OpenZeppelin contracts as a submodule. - Developed a comprehensive deployment guide in NEXT_STEPS_COMPLETE_GUIDE.md for Phase 2 and smart contract deployment. - Implemented Vite configuration for the orchestration portal, supporting both Vue and React frameworks. - Added server-side logic for the Multi-Cloud Orchestration Portal, including API endpoints for environment management and monitoring. - Created scripts for resource import and usage validation across non-US regions. - Added tests for CCIP error handling and integration to ensure robust functionality. - Included various new files and directories for the orchestration portal and deployment scripts.
5.3 KiB
5.3 KiB
API Documentation
JSON-RPC API
The DeFi Oracle Meta Mainnet provides a public JSON-RPC API for reading blockchain data.
Endpoint
- HTTPS:
https://rpc.d-bis.org - WebSocket:
wss://rpc.d-bis.org - Secondary HTTPS:
https://rpc2.d-bis.org - Domain:
d-bis.org(Cloudflare DNS/SSL)
Authentication
Currently, authentication is not required for public endpoints. API keys may be required in the future.
Rate Limits
- Default: 1200 requests/minute per IP
- eth_call: 600 requests/minute
- eth_getLogs: 300 requests/minute
- eth_getBlockByNumber: 600 requests/minute
- eth_getTransactionReceipt: 600 requests/minute
- eth_estimateGas: 300 requests/minute
Allowed Methods
Read Operations
eth_blockNumber- Get current block numbereth_call- Execute a message calleth_estimateGas- Estimate gas for a transactioneth_gasPrice- Get current gas priceeth_getBalance- Get account balanceeth_getBlockByHash- Get block by hasheth_getBlockByNumber- Get block by numbereth_getBlockTransactionCountByHash- Get transaction count in blocketh_getBlockTransactionCountByNumber- Get transaction count in blocketh_getCode- Get contract codeeth_getLogs- Get logs (limited to 10,000 blocks)eth_getStorageAt- Get storage at addresseth_getTransactionByHash- Get transaction by hasheth_getTransactionByBlockHashAndIndex- Get transaction by block and indexeth_getTransactionByBlockNumberAndIndex- Get transaction by block and indexeth_getTransactionCount- Get transaction count (nonce)eth_getTransactionReceipt- Get transaction receipteth_getUncleByBlockHashAndIndex- Get uncle by block and indexeth_getUncleByBlockNumberAndIndex- Get uncle by block and indexeth_getUncleCountByBlockHash- Get uncle count by block hasheth_getUncleCountByBlockNumber- Get uncle count by block numbereth_protocolVersion- Get protocol versioneth_syncing- Get sync statusnet_listening- Check if node is listeningnet_peerCount- Get peer countnet_version- Get network versionweb3_clientVersion- Get client versionweb3_sha3- Hash data with keccak256
Blocked Methods
The following methods are blocked for public users:
eth_sendTransaction- Send transaction (write operation)eth_sendRawTransaction- Send raw transaction (write operation)miner_*- Mining operationsadmin_*- Admin operationsdebug_*- Debug operations (except limited trace operations)
Request Format
{
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 1
}
Response Format
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1234"
}
Error Format
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32000,
"message": "execution reverted"
}
}
Examples
Get Block Number
curl -X POST https://rpc.d-bis.org \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 1
}'
Get Block by Number
curl -X POST https://rpc.d-bis.org \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBlockByNumber",
"params": ["latest", false],
"id": 1
}'
Call Contract
curl -X POST https://rpc.d-bis.org \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_call",
"params": [{
"to": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"data": "0x70a08231000000000000000000000000742d35Cc6634C0532925a3b844Bc9e7595f0bEb"
}, "latest"],
"id": 1
}'
Get Logs
curl -X POST https://rpc.d-bis.org \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getLogs",
"params": [{
"fromBlock": "0x0",
"toBlock": "latest",
"address": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"]
}],
"id": 1
}'
WebSocket API
Connection
const ws = new WebSocket('wss://rpc.d-bis.org');
ws.onopen = () => {
ws.send(JSON.stringify({
jsonrpc: "2.0",
method: "eth_subscribe",
params: ["newHeads"],
id: 1
}));
};
ws.onmessage = (event) => {
const data = JSON.parse(event.data);
console.log(data);
};
Chain Metadata
- ChainID: 138
- Network Name: DeFi Oracle Meta Mainnet
- Native Currency: ETH
- Block Time: ~2 seconds
- Explorer: https://explorer.d-bis.org
Rate Limit Headers
When rate limits are approached, the following headers are included in responses:
X-RateLimit-Limit: Maximum requests per minuteX-RateLimit-Remaining: Remaining requests in current windowX-RateLimit-Reset: Time when the rate limit resets
Error Codes
-32700: Parse error-32600: Invalid request-32601: Method not found-32602: Invalid params-32603: Internal error-32000: Execution error-32001: Resource not found-32002: Resource unavailable-32003: Transaction rejected-32004: Method not supported-32005: Limit exceeded
Support
For API support, please contact the network operators or open an issue on the project repository.