Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hello World contract family #63

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

cmickeyb
Copy link
Contributor

@cmickeyb cmickeyb commented Sep 25, 2024

Initial commit for the example contract family. The example contract family is primarily used as a means of documenting the process of writing, building, and extending a contract family. In addition, the example contract family provides a template for building a new contract family. Copying the example contract family to a new directory and editing family.cmake should be sufficient to create a new family.

Detailed documentation is provided that includes an explanation of the various parts of a contract family, how to create a new one, and how to define additional methods in a contract family. Most of this is provided as a step-by-step guide.

A functioning Jupyter notebook is also provided. However, documentation for customizing Jupyter is still work in progress.

NOTE: This PR depends on #64

@cmickeyb cmickeyb self-assigned this Sep 25, 2024
@cmickeyb cmickeyb force-pushed the mic.sep17.hello_world branch from 92a78b1 to bf4a82d Compare September 26, 2024 19:00
@cmickeyb
Copy link
Contributor Author

cmickeyb commented Oct 2, 2024

#64 should be committed first.

@cmickeyb cmickeyb force-pushed the mic.sep17.hello_world branch from bf4a82d to 768421c Compare October 2, 2024 19:30
Copy link
Member

@mbrandenburger mbrandenburger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great detailed hello world tutorial. It really helped to get an idea how to start writing my first contract family.

However, I was not able to run my helloworld contract within my personal time limit of ~45min.

Is there a dev container image that helps me to kickstart and provides me all the tools/deps needed as described in docs/install.md?

docs/notebooks/index.md Outdated Show resolved Hide resolved
docs/notebooks/index.md Outdated Show resolved Hide resolved
docs/notebooks/index.md Outdated Show resolved Hide resolved
common-contract/README.md Outdated Show resolved Hide resolved
docs/notebooks/index.md Outdated Show resolved Hide resolved
Comment on lines +7 to +9
This directory contains a number of pdo-shell scripts to test the
digital asset contract family. The scripts assume that a complete
installation of the PDO client is complete.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean the example contact family I guess?!

Comment on lines +23 to +24
This script sets up and runs the functional test suite for the digital asset
contract family. The actual tests will be found in the pdo-shell script
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

example contract familiy?

exchange-contract/docs/tests/05.token_transfer.md Outdated Show resolved Hide resolved

**The protocols and software are for reference purposes only and not intended for production usage.**

# Example Contract Family #
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In your PR you call it Hello World Contract Family ... maybe that is a better name than Example, in particular, if there are folders in the recommended project structure that is called example.


1. Copy the `example-contract` directory to a new directory. To be
picked up by the build system automatically, the new directory
should be named with `myfirst-contract`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to be consistent with your PR title ... helloworld-contract maybe call is?

cmickeyb and others added 7 commits December 17, 2024 10:34
Initial commit for the example contract family. The example contract
family is primarily used as a means of documenting the process of
writing, building, and extending a contract family. In addition, the
example contract family provides a template for building a new
contract family. Copying the example contract family to a new
directory and editing family.cmake should be sufficient to create a
new family.

Signed-off-by: Mic Bowman <[email protected]>
Adds a simple, getting started target for building and
running the example contract.

Add a docker target to start a contracts container that is running
Jupyter. The current source directory is mounted in /project/pdo/dev
inside the container. When used with the Jupyter shell, this provides
a relatively easy way to develop and test contracts, specifically the
example contract.

Do not remove model during docker cleanup.  There is no particular
reason to remove the downloaded model during docker clean up. This
should save some time during build/debug/test cycles. The model can be
removed with the clean_model target.

Signed-off-by: Mic Bowman <[email protected]>
Adds the basic factory/template model for the example contract. This
should allow for, more or less, a cut and paste for creating a new
contract that preserved the counter. That is, the factory & template
are for the specific contract type and would have to be replaced
completely for a new contract.

Signed-off-by: Mic Bowman <[email protected]>
@cmickeyb cmickeyb force-pushed the mic.sep17.hello_world branch from f18c5ca to 248bd09 Compare December 17, 2024 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants