Skip to content

Commit 939bbe0

Browse files
bxq2011hustHaoXuan40404
authored andcommitted
update precompiled doc
1 parent 9753d9f commit 939bbe0

File tree

1 file changed

+25
-6
lines changed

1 file changed

+25
-6
lines changed

docs/manual/precompiled_contract.md

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,15 @@ contract SystemConfigPrecompiled
108108
- [Nodejs SDK](https://fisco-bcos-documentation.readthedocs.io/zh_CN/latest/docs/sdk/nodejs_sdk/api.html#systemconfigservice)
109109
- [Python SDK](https://fisco-bcos-documentation.readthedocs.io/zh_CN/latest/docs/sdk/python_sdk/api.html#id3)
110110
- [Go SDK](https://fisco-bcos-documentation.readthedocs.io/zh_CN/latest/docs/sdk/go_sdk/api.html#systemconfigservice)
111+
111112
### TableFactoryPrecompiled-0x1001
112113

113114
#### 接口声明
114115

116+
完整solidity请[参考这里](https://github.com/FISCO-BCOS/FISCO-BCOS/blob/master/libprecompiled/solidity/Table.sol)
117+
115118
```solidity
116-
pragma solidity ^0.4.24;
119+
pragma solidity>=0.4.24 <0.6.11;
117120
118121
contract TableFactory {
119122
function openTable(string tableName) public view returns (Table); //open table
@@ -377,16 +380,32 @@ contract ChainGovernancePrecompiled {
377380
#### 接口声明
378381

379382
```solidity
383+
pragma solidity>=0.4.24 <0.6.11;
384+
//one record
385+
contract Entry {
386+
function getInt(string memory) public view returns (int256) {}
387+
function getUInt(string memory) public view returns (uint256) {}
388+
function getAddress(string memory) public view returns (address) {}
389+
function getBytes64(string memory) public view returns (bytes1[64] memory) {}
390+
function getBytes32(string memory) public view returns (bytes32) {}
391+
function getString(string memory) public view returns (string memory) {}
392+
393+
function set(string memory, int256) public {}
394+
function set(string memory, uint256) public {}
395+
function set(string memory, string memory) public {}
396+
function set(string memory, address) public {}
397+
}
398+
380399
contract KVTableFactory {
381-
function openTable(string) public view returns (KVTable);
382-
function createTable(string, string, string) public returns (int256);
400+
function openTable(string memory) public view returns (KVTable) {}
401+
function createTable(string memory, string memory, string memory) public returns (int256) {}
383402
}
384403
385404
//KVTable per permiary key has only one Entry
386405
contract KVTable {
387-
function get(string) public view returns (bool, Entry);
388-
function set(string, Entry) public returns (int256);
389-
function newEntry() public view returns (Entry);
406+
function get(string memory) public view returns (bool, Entry) {}
407+
function set(string memory, Entry) public returns (int256) {}
408+
function newEntry() public view returns (Entry) {}
390409
}
391410
```
392411

0 commit comments

Comments
 (0)