EVER SDK
Developer ToolsEver PlatformForum
  • Ever SDK
  • Quick start (JavaScript)
  • Add EVER to your backend
  • Reference
    • Types and Methods
      • Modules
      • Module abi
      • Module boc
      • Module client
      • Module crypto
      • Module debot
      • Module net
      • Module processing
      • Module proofs
      • Module tvm
      • Module utils
    • Error API
    • Error Codes
    • JavaScript Reference
    • Rust Reference
  • Samples
    • JavaScript Samples
  • guides
    • Installation
      • Add SDK to your App
    • Configuration
      • Endpoint Configuration
      • Message Expiration
      • Message Retry
      • Config Reference
    • Work with contracts
      • Add Contract to your App
      • Use your own Giver
      • Deploy
      • Run on-chain
      • Run ABI Get Method
      • Run Fift Get Method
      • Query/Subscribe for messages(events)
      • Decode Messages(Event)
      • External Signing
      • Emulate Transaction
      • Estimate Fees
      • Validate address, convert address
      • Monitor Messages
      • Trace message processing with REMP
    • Crypto
      • Mnemonics and Keys
    • Queries and subscriptions
      • Use-cases
      • How to work with net module
      • net.query syntax
      • Data pagination
      • Subscribe to Updates
      • Query Collection
      • Aggregate Collection
  • For Binding Developers
    • How to work with Application Objects in binding generators
    • JSON Interface to Ton Client
  • Links
    • Ever SDK repository
    • AppKit JS documentation
Powered by GitBook
On this page
  • When you may need it?
  • Lets debug!
  • How to emulate contract deploy?
  • How to emulate contract local execution?
  • Sample source code

Was this helpful?

  1. guides
  2. Work with contracts

Emulate Transaction

PreviousExternal SigningNextEstimate Fees

Last updated 1 year ago

Was this helpful?

Emulate transaction execution locally to understand why it fails

When you may need it?

If you want to test your contract locally and find out will your operation work on the real network or not, you can emulate it locally.

Lets debug!

Core SDK provides method of tvm module for it.

provides localDeploy and localRun functions for it.

How to emulate contract deploy?

To emulate deploy you need to create a deploy message and execute it locally.

If you plan to emulate local execution afterwards, then retrieve account state (BOC) from deploy emulation result and pass it into the next local execution.

See the JavaScript samples below to understand how to emulate contract deploy.

How to emulate contract local execution?

To emulate local execution you need to take the current contract state (boc), create a run message and execute it locally on the current account state.

If you emulated deploy before run, then you need to get the account state from the result of the deploy emulation.

For the subsequent call emulations, use account state retrieved from the previous local execution emulation.

See the JavaScript samples below to understand how to emulate contract deploy.

Sample source code

Core

AppKit

https://github.com/everx-labs/sdk-samples/tree/master/core-examples/node-js/run_executor
https://github.com/everx-labs/sdk-samples/tree/master/appkit-examples/run_executor
AppKit
run_executor