Skip to content

Commit

Permalink
Merge pull request #62 from nguyenphuminh/patch-0.22.1
Browse files Browse the repository at this point in the history
Fix runtime "send"
  • Loading branch information
nguyenphuminh authored Apr 17, 2023
2 parents ac2300c + 4be81dc commit 241044e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jechain",
"version": "0.22.0",
"version": "0.22.1",
"description": "Node for JeChain - an experimental smart contract blockchain network",
"main": "./index.js",
"scripts": {
Expand Down
4 changes: 3 additions & 1 deletion src/core/runtime.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
const { bigIntable } = require("../utils/utils");
const Transaction = require("./transaction");

const { EMPTY_HASH } = require("../config.json");

const crypto = require("crypto"), SHA256 = message => crypto.createHash("sha256").update(message).digest("hex");

async function jelscript(input, originalState = {}, gas, stateDB, block, txInfo, contractInfo, enableLogging = false) {
Expand Down Expand Up @@ -242,7 +244,7 @@ async function jelscript(input, originalState = {}, gas, stateDB, block, txInfo,
if (!await stateDB.keys().all().includes(target) && !state[target]) {
state[target] = {
balance: amount.toString(),
body: "",
codeHash: EMPTY_HASH,
nonce: 0,
storage: {}
}
Expand Down

0 comments on commit 241044e

Please sign in to comment.