Contract con_new_meta_catagories


Contract Code


  
1 # proposed new meta fields and formats :
2 metadata = Hash()
3
4 @construct
5 def seed():
6 metadata['operator'] = ctx.caller
7 # Current LST002 standards, embedded in tokenController.js
8 # metadata['token_name'] = "Token Name"
9 # metadata['token_symbol'] = "TCKR"
10 # metadata['token_logo_url' =
11 # metadata['token_logo_base64_svg'] =
12 # metadata['token_logo_base64_png'] =
13 #
14 # Proposed 'Lamden Contract Metadata Categorization Information Standards'
15 # metedata['category'] = {
16 # "field_1" : "entry_1",
17 # "field_n" : "entry_n"
18 # }
19 # Suggested seed metadata['catagories']
20 # and recommended {"field_1":"entry_1","field_n":"information_n"} for each ['category']
21
22 metadata['info'] : {
23 "description": "Summary of token, short description.",
24 "website": "token.com"
25 }
26
27 metadata['links'] : {
28 "blog": "https://medium.com/token",
29
30 "twitter": "https://twitter.com/@token_twitter",
31 "telegram": "https://t.me/token_tg_channel",
32 "discord": "https://discord.com/invite/XXXxxxxxx",
33 "facebook": "https://www.facebook.com/token_group",
34 "git": "https://github.com/token_repo",
35 "ipfs": "https://ipfs.infura.io/ipfs/QmbHeyJNC6XGpPoBUUVv7XpabPYWTYiRKaHn9jshEnWkSi"
36 }
37
38 metadata['stats'] : {
39 "total_supply": 1000000,
40 "circ_supply": 1000000,
41 "burn_address": "con_burn_address",
42 "genesis_date": "2022-06-01"
43 }
44
45 @export
46 def change_metadata(key: str, value: Any):
47 assert ctx.caller == metadata['operator'], 'Only operator can set metadata!'
48 metadata[key] = value

Byte Code

e300000000000000000000000008000000400000007376000000550065006400640164028d025a016403640484005a0265010100640501006406640764089c0201006501010064090100640a640b640c640d640e640f641064119c0701006501010064120100641364136414641564169c0401006503640083016504650564179c0264186419840483015a06641a5300291bda17636f6e5f6e65775f6d6574615f63617461676f72696573da086d657461646174612902da08636f6e7472616374da046e616d65630000000000000000000000000300000043000000730e00000074006a01740264013c006400530029024eda086f70657261746f722903da03637478da0663616c6c6572da0a5f5f6d65746164617461a90072090000007209000000da00da045f5f5f5f0400000073020000000001720b000000da04696e666f7a2453756d6d617279206f6620746f6b656e2c2073686f7274206465736372697074696f6e2e7a09746f6b656e2e636f6d2902da0b6465736372697074696f6e5a0777656273697465da056c696e6b737a1868747470733a2f2f6d656469756d2e636f6d2f746f6b656e7a2268747470733a2f2f747769747465722e636f6d2f40746f6b656e5f747769747465727a1d68747470733a2f2f742e6d652f746f6b656e5f74675f6368616e6e656c7a2468747470733a2f2f646973636f72642e636f6d2f696e766974652f5858587878787878787a2468747470733a2f2f7777772e66616365626f6f6b2e636f6d2f746f6b656e5f67726f75707a1d68747470733a2f2f6769746875622e636f6d2f746f6b656e5f7265706f7a4a68747470733a2f2f697066732e696e667572612e696f2f697066732f516d624865794a4e4336584770506f42555556763758706162505957545969524b61486e396a7368456e576b536929075a04626c6f675a07747769747465725a0874656c656772616d5a07646973636f72645a0866616365626f6f6bda036769745a0469706673da0573746174736940420f005a10636f6e5f6275726e5f616464726573737a0a323032322d30362d30312904da0c746f74616c5f737570706c795a0b636972635f737570706c79da0c6275726e5f616464726573735a0c67656e657369735f646174652902da036b6579da0576616c7565630200000000000000020000000300000043000000732200000074006a017402640119006b02731674036402830182017c0174027c003c006400530029034e72050000007a1f4f6e6c79206f70657261746f722063616e20736574206d65746164617461212904720600000072070000007208000000da0e417373657274696f6e4572726f7229027213000000721400000072090000007209000000720a000000da0f6368616e67655f6d6574616461746116000000730600000000021001060172160000004e2907da04486173687208000000720b000000da085f5f6578706f7274da03737472da03416e797216000000720900000072090000007209000000720a000000da083c6d6f64756c653e01000000731e00000002000c0308040a0108010a010201020102010201020108020c010a030601