mirror of
https://github.com/EvernodeXRPL/hp-devkit.git
synced 2026-04-29 15:37:58 +00:00
Wording changes.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# This image contains scripts for creating Hot Pocket contract clusters
|
||||
# This image contains scripts for creating HotPocket contract clusters
|
||||
# on the developer machine for local development testing.
|
||||
# docker build -t evernodedev/hpdevkit .
|
||||
# docker push evernodedev/hpdevkit
|
||||
@@ -16,7 +16,7 @@ RUN dpkg -x docker.deb docker-extracted
|
||||
RUN wget -O jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64
|
||||
RUN chmod +x jq
|
||||
|
||||
# Set permissions for hot pocket devkit scripts.
|
||||
# Set permissions for hotpocket devkit scripts.
|
||||
COPY scripts /build/scripts
|
||||
RUN chmod -R +x /build/scripts/*.sh
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
"start": "npm run build && hpdevkit deploy dist"
|
||||
},
|
||||
"dependencies": {
|
||||
"hotpocket-nodejs-contract": "0.5.4",
|
||||
"hotpocket-nodejs-contract": "0.5.6",
|
||||
"@vercel/ncc": "0.34.0"
|
||||
}
|
||||
}
|
||||
@@ -44,7 +44,7 @@ export class _projname_ {
|
||||
}
|
||||
|
||||
async setData(data) {
|
||||
// Hot Pocket subjects data on-disk to consensus.
|
||||
// HotPocket subjects data-on-disk to consensus.
|
||||
await fs.writeFile(dataFile, data);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
const HotPocket = require('hotpocket-nodejs-contract');
|
||||
const { _projname_ } = require('./_projname_');
|
||||
|
||||
// Hot Pocket smart contract is defined as a function which takes the Hot Pocket ExecutionContext as an argument.
|
||||
// HotPocket smart contract is defined as a function which takes the HotPocket contract context as an argument.
|
||||
// This function gets invoked every consensus round and whenever a user sends a out-of-concensus read-request.
|
||||
async function contract(ctx) {
|
||||
|
||||
// Create our application logic component.
|
||||
// This pattern allows us to test the application logic independently of Hot Pocket.
|
||||
// This pattern allows us to test the application logic independently of HotPocket.
|
||||
const app = new _projname_();
|
||||
|
||||
// Wire-up output emissions from the application before we pass user inputs to it.
|
||||
app.sendOutput = async (userPublicKey, output) => {
|
||||
// In Hot Pocket, each user is represented by their Ed25519 public key.
|
||||
// In HotPocket, each user is represented by their Ed25519 public key.
|
||||
const user = ctx.users.find(userPublicKey);
|
||||
await user.send(output)
|
||||
}
|
||||
|
||||
|
||||
// In 'readonly' mode, nothing our contract does will get persisted on the ledger. The benefit is
|
||||
// readonly messages gets processed much faster due to not being subjected to consensus.
|
||||
// We should only use readonly mode for returning/replying data for the requesting user.
|
||||
|
||||
@@ -75,7 +75,7 @@ function create_instance {
|
||||
let peer_port=22860+$node
|
||||
let user_port=8080+$node
|
||||
|
||||
# Create container for hot pocket instance.
|
||||
# Create container for hotpocket instance.
|
||||
local container_name="${container_prefix}_$node"
|
||||
docker container create --name $container_name --privileged \
|
||||
-p $user_port:$user_port --network $network --network-alias node$node \
|
||||
@@ -116,7 +116,7 @@ function joinarr {
|
||||
echo $str
|
||||
}
|
||||
|
||||
# Update all instances hot pocket configs so they connect to each other as a cluster.
|
||||
# Update all instances hotpocket configs so they connect to each other as a cluster.
|
||||
function bind_mesh {
|
||||
local instance_count=$(get_container_count)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user