Skip to content

Commit

Permalink
v1.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ansigroup committed Jun 30, 2020
1 parent 3d8beae commit 9e08177
Show file tree
Hide file tree
Showing 9 changed files with 667 additions and 116 deletions.
237 changes: 154 additions & 83 deletions README.md

Large diffs are not rendered by default.

45 changes: 45 additions & 0 deletions README_KR.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ detach (owner, assetidc, [assetid1,..,assetidn])
attachf (owner, author, quantity, assetidc)
detachf (owner, author, quantity, assetidc)
mdadd (author, data)
mdupdate (id, author, data)
mdremove (id)
mdaddlog (id, author, data)
# -- For Fungible Tokens ---
createf (author, maximum_supply, authorctrl, data)
Expand All @@ -103,6 +108,13 @@ openf (owner, author, symbol, ram_payer)
closef (owner, author, symbol)
```

# -- For Non-Transferable Tokens (NTTs) ---

createntt (author, category, owner, idata, mdata, requireсlaim)
updatentt (author, owner, assetid, mdata)
burnntt (owner, [assetid1,..,assetidn], memo)
claimntt (claimer, [assetid1,..,assetidn])

# 데이터 구조

## 자산
Expand Down Expand Up @@ -194,6 +206,39 @@ sofferf {
}
```

## NTT
```
snttassets {
uint64_t id; // NTT id used for claim or burn;
name owner; // asset owner (mutable - by owner!!!);
name author; // asset author (game contract, immutable);
name category; // asset category, chosen by author, immutable;
string idata; // immutable assets data. Can be stringified JSON or just sha256 string;
string mdata; // mutable assets data, added on creation or asset update by author. Can be
// stringified JSON or just sha256 string;
}
```

```
nttoffers {
uint64_t id; // id of the offer for claim (increments automatically)
name author; // ft author
name owner; // ft owner
asset quantity; // quantity
name offeredto; // account who can claim the offer
uint64_t cdate; // offer creation date
}
```

## More Data
```
moredata{
uint64_t id; // id of the more data
name author; // author of the more data
string data; // more data
}
```

# 예시: 스마트 컨트랙트에서 심플에셋 사용하기

## 자산을 생성해 소유자 계정 ownerowner22으로 전송하기:
Expand Down
14 changes: 13 additions & 1 deletion README_ZH.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@ detach (owner, assetidc, [assetid1,..,assetidn])
attachf (owner, author, quantity, assetidc)
detachf (owner, author, quantity, assetidc)
mdadd (author, data)
mdupdate (id, author, data)
mdremove (id)
mdaddlog (id, author, data)
\# -- For Fungible Tokens (FTs)---
createf (author, maximum_supply, authorctrl, data)
Expand Down Expand Up @@ -306,7 +311,14 @@ nttoffers {
uint64_t cdate; // offer 的创建日期
}
```

## More Data
```
moredata{
uint64_t id; // id of the more data
name author; // author of the more data
string data; // more data
}
```
---
# 示例:如何在智能合约中使用简单资产

Expand Down
107 changes: 106 additions & 1 deletion build/SimpleAssets/SimpleAssets.abi
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@
"type": "uint64"
},
{
"name": "spare1",
"name": "mdid",
"type": "uint64"
},
{
Expand Down Expand Up @@ -589,6 +589,66 @@
}
]
},
{
"name": "mdadd",
"base": "",
"fields": [
{
"name": "author",
"type": "name"
},
{
"name": "data",
"type": "string"
}
]
},
{
"name": "mdaddlog",
"base": "",
"fields": [
{
"name": "id",
"type": "uint64"
},
{
"name": "author",
"type": "name"
},
{
"name": "data",
"type": "string"
}
]
},
{
"name": "mdremove",
"base": "",
"fields": [
{
"name": "id",
"type": "uint64"
}
]
},
{
"name": "mdupdate",
"base": "",
"fields": [
{
"name": "id",
"type": "uint64"
},
{
"name": "author",
"type": "name"
},
{
"name": "data",
"type": "string"
}
]
},
{
"name": "offer",
"base": "",
Expand Down Expand Up @@ -753,6 +813,24 @@
}
]
},
{
"name": "smoredata",
"base": "",
"fields": [
{
"name": "id",
"type": "uint64"
},
{
"name": "author",
"type": "name"
},
{
"name": "data",
"type": "string"
}
]
},
{
"name": "snttasset",
"base": "",
Expand Down Expand Up @@ -1127,6 +1205,26 @@
"type": "issuef",
"ricardian_contract": "---\nspec_version: 0.0.2\ntitle: Issue a fungible token\nsummary: This action issues a fungible token\nicon: https://cryptolions.io/assets/images/sa-icons-256/issuef.png#a40d77b2162d646cd3ce0488dfeab1cdfae8801fcc1d0c6ef1f16f2547b16551\n---\n\nInput parameters:\n`to` - account receiver;\n`author` - fungible token author;\n`quantity` - amount to issue, example \"1000.00 WOOD\";\n`memo` - transfers memo;\n\nTERM\nThis Contract expires at the conclusion of code execution.\nby CryptoLions [ https://cryptolions.io ]"
},
{
"name": "mdadd",
"type": "mdadd",
"ricardian_contract": "---\nspec_version: 0.0.2\ntitle: Create new more date\nsummary: Create new more date\nicon: https://cryptolions.io/assets/images/sa-icons-256/update.png#305b640fe614876c6e6f5fed5ac21f8157c80f7bee39f3db26228986c1fc5e0e\n---\n\nInput parameters:\n`author` - authors account;\n`data` - stringified json with mutable assets data;\n\nTERM\nThis Contract expires at the conclusion of code execution.\nby CryptoLions [ https://cryptolions.io ]"
},
{
"name": "mdaddlog",
"type": "mdaddlog",
"ricardian_contract": "---\nspec_version: 0.0.2\ntitle: Internal action used for creating log\nsummary: Internal action used for creating log\nicon: https://cryptolions.io/assets/images/sa-icons-256/update.png#305b640fe614876c6e6f5fed5ac21f8157c80f7bee39f3db26228986c1fc5e0e\n---\n\nInput parameters:\n`id` - is id of more data;\n`author` - authors account;\n`data` - stringified json with mutable assets data;\n\nTERM\nThis Contract expires at the conclusion of code execution.\nby CryptoLions [ https://cryptolions.io ]"
},
{
"name": "mdremove",
"type": "mdremove",
"ricardian_contract": "---\nspec_version: 0.0.2\ntitle: Update existing more data\nsummary: Update existing more data\nicon: https://cryptolions.io/assets/images/sa-icons-256/update.png#305b640fe614876c6e6f5fed5ac21f8157c80f7bee39f3db26228986c1fc5e0e\n---\n\nInput parameters:\n`id` - is id of more data;\n\nTERM\nThis Contract expires at the conclusion of code execution.\nby CryptoLions [ https://cryptolions.io ]"
},
{
"name": "mdupdate",
"type": "mdupdate",
"ricardian_contract": "---\nspec_version: 0.0.2\ntitle: Update existing more data\nsummary: Update existing more data\nicon: https://cryptolions.io/assets/images/sa-icons-256/update.png#305b640fe614876c6e6f5fed5ac21f8157c80f7bee39f3db26228986c1fc5e0e\n---\n\nInput parameters:\n`id` - is id of more data;\n`author` - authors account;\n`data` - stringified json with mutable assets data;\n\nTERM\nThis Contract expires at the conclusion of code execution.\nby CryptoLions [ https://cryptolions.io ]"
},
{
"name": "offer",
"type": "offer",
Expand Down Expand Up @@ -1207,6 +1305,13 @@
"key_names": [],
"key_types": []
},
{
"name": "moredata",
"type": "smoredata",
"index_type": "i64",
"key_names": [],
"key_types": []
},
{
"name": "nttoffers",
"type": "snttoffer",
Expand Down
Binary file modified build/SimpleAssets/SimpleAssets.wasm
Binary file not shown.
Loading

0 comments on commit 9e08177

Please sign in to comment.