`api` Package for contract
- Dominant language
- Go
- Stars
- 44
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
- Define functions and wrapper functions for contract execution
| API | Desc | Note |
|--- |--- |--- |
| PutStorage(key, value) -> bool,err | Write k/v to contract's own storage | int,string are support |
| GetStorage(key) -> value,bool | Read value of a key from contract's own storage | |
| WithdrawBalance(to,balance) -> bool | Withdraw this contract's balance to another address | |
| GetBalance() -> int | Get this contract's balance to another address | |
| CallContract(ContractAddress, method, args) -> value,err | Inter contract Call | |
| Now() -> int | return timestamp in seconds | |
| BlockHeight() -> int | return height of this block | |
| BlockPrevHash() -> string | return hash of prev block | |
| tx.Source -> string(address) | return source of this tx | |
| log.Print | loging? | |
Contributor guide
Assessment
This issue has not been assessed yet.