Simple Off-Chain Smart Contract Sample

Our team create a simple off-chain smart contract games.
How it works?
Send 2 ADA + 1 PIGY to our address. You get 1 .8xx ADA + 1 PIGY + 1 PIGY image.

Create 2 of them then you can breed a new PIGY

We are looking forward to create this on Cardano smart contract.

For more information here’s the link

Note: This only can only be done with Daedalus or CLI wallet


Well done!:smiling_face_with_three_hearts:

1 Like

Thanks :stuck_out_tongue_winking_eye:
Have you try it? Come on give it a shot…
It’s fun…

Do I need to send 2 transactions right?

1 Like

Very cool! Will have to try it. :soon::top::pray:t4:

1 Like

Just one, if you just want to mint 1 PIGY Image. If you want to breed a PIG then you should make 3 transaction. 1 is create daddy pig, 1 to create mommy pig, then combine daddy + mommy to make the child of those pig…


The PIGY and ADA need to be sent together in a single transaction to the service address. The Daedalus wallet can send multiple token types in the same transaction, but it appears that neither Yoroi nor Adalite can do that. (I’m not sure about whether other wallets can.) So right now one probably needs to use Daedalus or cardano-cli to play this game.

1 Like

Thanks for bringing this up. I use Daedalus most of the time.

That’s why I asked yesterday… in yoroi I can’t send more assets in one transaction :frowning:


I’m thinking about whether the logic of the service could support wallets that cannot send multiple assets in the same transaction, but it would be difficult and it might degrade the service for wallets like Daedalus that can send multiples. I wish we had fully featured wallets.

1 Like

I am missing the point of doing this.
It is just to demonstrate smart contract functionality?
I have no interest in sending you any ADA at this point, I rather wait until a smart contract has a meaningful function.
Just trying to place your post into the larger framework of Cardano’s development

1 Like

Thanks for your feedback and question. This is simply an experimental game meant for entertainment and learning, while also providing some utility to the PIGY token while we await Goguen: it does not have deep functionality and could be considered frivolous. In that spirit, the service collects no fees, so the only cost is the standard network fees for the incoming/outgoing transactions involved. (Even those fees might be subsidized in a future upgrade to the service.)

So far the lessons learned center around the following:

  1. Technique and open-source Haskell implementation of realtime monitoring of token movement and activity at service addresses.
  2. Similarly, a reusabe, open-source Haskell framework suitable for services of this general type.
  3. How a service/contract can handle rollbacks of the blockchain. (Several short, brief forks occur each day on Cardano nodes, and the Ouroboros security parameter setting of k = 2160 blocks means that contracts need to be prepared to switch to or recover from a long fork if one ever occurs.)
  4. Scalability and concurrency tradeoffs in designing services that use the UTxO model.
  5. Limitations of off-chain contracts.
  6. Suitability of Daedalus, Yori, and other common wallets for interacting with services like this.
  7. Effective communication to users about how to use new services.
  8. Constraints imposed by taxation and other regulation.

Very interesting!
Now it makes a lot more sense!
Thank you for taking the time to itemize the purpose.

1 Like