@haechi-labs/henesis-sdk
Advanced tools
Comparing version 0.2.0 to 0.3.0
export declare namespace Ethereum { | ||
interface Data { | ||
event: Event; | ||
userMeta: UserMeta; | ||
blockMeta: BlockMeta; | ||
} | ||
interface Event { | ||
id: number; | ||
index: string; | ||
payload: { | ||
@@ -69,9 +64,4 @@ name: string; | ||
export declare namespace Klaytn { | ||
interface Data { | ||
event: Event; | ||
userMeta: UserMeta; | ||
blockMeta: BlockMeta; | ||
} | ||
interface Event { | ||
id: number; | ||
index: string; | ||
payload: { | ||
@@ -78,0 +68,0 @@ name: string; |
{ | ||
"name": "@haechi-labs/henesis-sdk", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "SDK to build handler of Henesis", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -9,3 +9,3 @@ # henesis-sdk | ||
exports.handler = (web3, data: Ethereum.Data) => { | ||
exports.handler = (web3, event: Ethereum.Event, blockMeta: Ethereum.BlockMeta, userMeta: Ethereum.UserMeta) => { | ||
// do something awesome ! | ||
@@ -57,9 +57,9 @@ return result; | ||
exports.handler = (web3, data: Ethereum.Data) => { | ||
const { event } = data; | ||
const { transaction } = event; | ||
exports.handler = (web3, event: Ethereum.Event, blockMeta: Ethereum.BlockMeta, userMeta: Ethereum.UserMeta) => { | ||
const { index, payload } = event; | ||
const { name, data, transaction } = payload; | ||
if (transaction.gasUsed >= 10000) { | ||
return { | ||
id: event.id, | ||
index: index, | ||
msg: "gas used over 10000" | ||
@@ -66,0 +66,0 @@ }; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
7915
140