diff --git a/internal/hmyapi/blockchain.go b/internal/hmyapi/blockchain.go index e79fba2c0..fa50443c3 100644 --- a/internal/hmyapi/blockchain.go +++ b/internal/hmyapi/blockchain.go @@ -63,6 +63,33 @@ func (s *PublicBlockChainAPI) GetBlockByHash(ctx context.Context, blockHash comm return nil, err } +// GetShardingStructure returns an array of sharding structures. +func (s *PublicBlockChainAPI) GetShardingStructure(ctx context.Context) ([]map[string]interface{}, error) { + res := []map[string]interface{}{ + map[string]interface{}{ + "shardID": "0", + "http": "http://127.0.0.1:800", + "wss": "wss://127.0.0.1:800", + }, + map[string]interface{}{ + "shardID": "1", + "http": "http://127.0.0.1:800", + "wss": "wss://127.0.0.1:800", + }, + map[string]interface{}{ + "shardID": "2", + "http": "http://127.0.0.1:800", + "wss": "wss://127.0.0.1:800", + }, + map[string]interface{}{ + "shardID": "3", + "http": "http://127.0.0.1:800", + "wss": "wss://127.0.0.1:800", + }, + } + return res, nil +} + // GetCode returns the code stored at the given address in the state for the given block number. func (s *PublicBlockChainAPI) GetCode(ctx context.Context, addr string, blockNr rpc.BlockNumber) (hexutil.Bytes, error) { address := internal_common.ParseAddr(addr)