mirror of
https://github.com/EvernodeXRPL/hp-devkit.git
synced 2026-04-29 15:37:58 +00:00
Blank contract.
This commit is contained in:
6
docker/code-templates/nodejs/blank-contract/dist/hp.cfg.override
vendored
Normal file
6
docker/code-templates/nodejs/blank-contract/dist/hp.cfg.override
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"contract": {
|
||||
"bin_path": "/usr/bin/node",
|
||||
"bin_args": "index.js"
|
||||
}
|
||||
}
|
||||
12
docker/code-templates/nodejs/blank-contract/package.json
Normal file
12
docker/code-templates/nodejs/blank-contract/package.json
Normal file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"name": "_projname_",
|
||||
"version": "1.0.0",
|
||||
"scripts": {
|
||||
"build": "npx ncc build src/_projname_.js -o dist",
|
||||
"start": "npm run build && hpdevkit deploy dist"
|
||||
},
|
||||
"dependencies": {
|
||||
"hotpocket-nodejs-contract": "0.5.6",
|
||||
"@vercel/ncc": "0.34.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
const HotPocket = require("hotpocket-nodejs-contract");
|
||||
|
||||
const _projname_ = async (ctx) => {
|
||||
// Your smart contract logic.
|
||||
console.log('Blank contract');
|
||||
}
|
||||
|
||||
const hpc = new HotPocket.Contract();
|
||||
hpc.init(_projname_);
|
||||
Reference in New Issue
Block a user