interface.jsView |
---|
276 | 276 | opPromise = this.environment.getBlockHash(number) |
277 | 277 | } |
278 | 278 | |
279 | 279 | |
280 | | - this.kernel._addOperation(opPromise) |
281 | | - .then(values => { |
282 | | - const hash = values.pop() |
| 280 | + this.kernel._addOperation(opPromise, cbOffset, hash => { |
283 | 281 | this.setMemory(offset, U256_SIZE_BYTES, hash.toMemory()) |
284 | | - this.module.exports[cbOffset.toString()]() |
285 | 282 | }) |
286 | 283 | } |
287 | 284 | |
288 | 285 | |
518 | 515 | |
519 | 516 | return null |
520 | 517 | }) |
521 | 518 | |
522 | | - this.kernel._addOperation(opPromise) |
523 | | - .then(values => { |
524 | | - const oldValue = values.pop() |
| 519 | + this.kernel._addOperation(opPromise, cbDest, oldValue => { |
525 | 520 | if (valIsZero && oldValue) { |
526 | 521 | |
527 | 522 | this.environment.gasRefund += 15000 |
528 | 523 | this.environment.state.del(path) |
533 | 528 | } |
534 | 529 | |
535 | 530 | this.environment.state.set(path, value) |
536 | 531 | } |
537 | | - |
538 | | - this.module.exports[cbDest.toString()]() |
539 | 532 | }) |
540 | 533 | } |
541 | 534 | |
542 | 535 | |
555 | 548 | |
556 | 549 | return new Uint8Array(32) |
557 | 550 | }) |
558 | 551 | |
559 | | - this.kernel._addOperation(opPromise) |
560 | | - .then(values => { |
561 | | - const result = values.pop() |
| 552 | + this.kernel._addOperation(opPromise, cbDest, result => { |
562 | 553 | this.setMemory(resultOffset, U256_SIZE_BYTES, result) |
563 | | - this.module.exports[cbDest.toString()]() |
564 | 554 | }) |
565 | 555 | } |
566 | 556 | |
567 | 557 | |