Skip to content

[DO NOT MERGE] Creates Programs section. #278

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

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions content/programs/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: "Programs"
weight: 30
lead: "The following pages explore the Entropy programs including how developers can create, update, delete, and use them."
---

31 changes: 31 additions & 0 deletions content/programs/development/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
title: "Development"
weight: 20
lead: ""
---

## Create

Since Entropy programs rely on WASM architecture, creating a program is pretty straight-forward:

1. Create the logic you want in your Entropy program.
1. Include specific functionality that Entropy requires from each program.
1. Write tests to make sure that your program functions the way that you're expecting.
1. Compile your program down to WASM.

## Update

## Delete

Deleting a program from the network is possible up until it is referenced by an account. If at least one account is registered to a program, that program cannot be deleted. Since there is no way to deregister accounts that you do not own from a deployed program, it is best to presume that all deployed programs cannot be deleted.

### Deregister an account

Every account can change the programs associated with their keys. see pallet Registery change_program_instance, removing a program here will reduce the ref count.

### Remove a program

To delete/remove a deployed program, call the `remove_program` function within in the `programs` pallet using the account that deployed the program. The network will return the deposit associated with the program to the account.


## Interact
5 changes: 5 additions & 0 deletions content/programs/mechanics/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: "Mechanics"
weight: 0
lead: ""
---
5 changes: 5 additions & 0 deletions content/programs/testing/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: "Testing"
weight: 30
lead: ""
---
5 changes: 5 additions & 0 deletions content/programs/troubleshooting/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
title: "Troubleshooting"
weight: 100
lead: ""
---