RGB-WG / rgb

RGB smart contracts: command-line tool & wallet runtime library for desktop and mobile integration
https://rgb.tech
Apache License 2.0
129 stars 34 forks source link

missing rgb20 rgb21 rgb 25 simple working examples #26

Closed lastdof closed 8 months ago

lastdof commented 12 months ago

Right after compiling the last rgb version on osx, There's no simple examples rgb20 or 21 or 25 ready to go.

I would love to see 3 yml files, interfaces and schemata with some typical content , especially some encoded picture for the RGB21, as we don't have a file size problem and we don't really need to put a digital art on ipfs or arweare .

We would use the rgb issue "interface" RGBXX sample.yml and it would just work .

I even could not make it work with the separate rgb-schemata repo

dr-orlovsky commented 12 months ago

I expect you have checked https://github.com/RGB-WG/rgb-schemata/tree/master/examples

I would love to see 3 yml files, interfaces and schemata with some typical content

ok

lastdof commented 12 months ago

I did find them very quickly indeed . But this is the coding way ( i'm on it today even i'm not in rust) . I was thinking about the first test when you start .. Something a little more easy to try and beside , with a clear data oriented document like yml or json ? I would find very logical too start with all three RGB basic shemata included ( schemata and interfaces ) . But maybe i'm really wrong and the rust way is definitely the prefered way ? I understand that very well too :)

oneforalone commented 11 months ago

I second this, I'm succeeded compile a simple rgb20 contract, when i try to publish it with rgb issue <contract_id> <iface> <rgba-file>, got error says no matches found: urn:lnp-bp:if:48hc4i-m9JRcYQA-uUSzwFCK-VNEa9eZf-nhepU8QJ-pqosXS#laptop-domingo-cool, seems i'm using the wrong iface. So, what's the exactly rgb20 iface? I just import rgb20 interface from https://github.com/RGB-WG/rgb-schemata/tree/master/interfaces. Did I import the wrong interface? Also, the rgb issue -h show the last argument should be a file in YAML format, but i can't find any file in YAML format. So, how can I issue a simple rgb20 contract after generated? Am i missing something or in the wrong way?

oneforalone commented 11 months ago

What's the exactly rgb20 iface?

I figure it out that rgb20 iface is just RGB20 after watching your youtube video. However, still don't know how to generate the contract yaml file. How can i generate contracts yaml file?

dr-orlovsky commented 11 months ago

@oneforalone just take this example and modify according to your needs: https://github.com/RGB-WG/rgb/blob/master/examples/rgb20-demo.yaml

oneforalone commented 11 months ago

@dr-orlovsky Thanks, I believe it's kinda outdated, right? I'm working on it recently, and trying to figure out the whole procedures of rgb20, from creating a contract to transfering a rgb20 token. Will update the docs when i after i finishing it.