Commit 3e76d33a7cef629ec34b59cf2d48fb0561fe2bc7
Kernel: support the identity precompile
Alex Beregszaszi committed on 8/28/2016, 1:15:40 AMParent: e40cb39472f8609adea6dbe71bd08f434fa64f5c
Files changed
index.js | changed |
precompile.js | changed |
index.js | ||
---|---|---|
@@ -24,8 +24,9 @@ | ||
24 | 24 | const Utils = require('./utils.js') |
25 | 25 | const Transaction = require('./transaction.js') |
26 | 26 | const Precompile = require('./precompile.js') |
27 | 27 | |
28 | +const identityContract = new Address('0x0000000000000000000000000000000000000004') | |
28 | 29 | const meteringContract = new Address('0x000000000000000000000000000000000000000A') |
29 | 30 | const transcompilerContract = new Address('0x000000000000000000000000000000000000000B') |
30 | 31 | |
31 | 32 | module.exports = class Kernel { |
@@ -72,8 +73,10 @@ | ||
72 | 73 | if (call.to.equals(meteringContract)) { |
73 | 74 | return Precompile.meteringInjector(call) |
74 | 75 | } else if (call.to.equals(transcompilerContract)) { |
75 | 76 | return Precompile.transcompiler(call) |
77 | + } else if (call.to.equals(identityContract)) { | |
78 | + return Precompile.identity(call) | |
76 | 79 | } |
77 | 80 | |
78 | 81 | let account = this.environment.state.get(call.to.toString()) |
79 | 82 | if (!account) { |
Built with git-ssb-web