Skip to content

Instantly share code, notes, and snippets.

@LindaOrtega
LindaOrtega / deploy-testnet-module.md
Last active September 4, 2022 04:31
Walkthrough for deploying a module to Kadena's Testnet

Deploy Module to Testnet Using Command Line

This document will walk you through how to deploy your first module to Testnet using the Command Line. To achieve this, we will use the pact command line tool's API Request formatter (pact -a) and the curl command line tool.

Step 0: Install the Prerequisites

Step 1: Create the Pact Module

We will be deploying the following pact module. For simplicity's sake, this walkthrough expects that the pact code we are deploying is not using a transaction's data field (read-keyset is one such pact function that makes use of this field). Otherwise, the accompanying YAML file will have to change. We also assume that this pact code is saved as test.pact.

@LindaOrtega
LindaOrtega / pact-web-interface-example.pact
Created June 3, 2019 15:46
Bug when try to "Load into REPL"
(define-keyset "test-keyset" (read-keyset "test-keyset"))
(module acct-module "test-keyset"
@doc "account schema module"
(defschema account
@model [(invariant (>= balance 0))]
balance:integer
ks:keyset
@LindaOrtega
LindaOrtega / schemes.hs
Created December 20, 2018 23:55
Uses type families, GADTs, and Singletons to abstract over Scheme Options
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE DataKinds #-}
import Data.Kind
import qualified Crypto.Ed25519.Pure as Ed25519
data SchemeOptions = ED2551' | ETH'