Skip to content
This repository has been archived by the owner on Feb 17, 2023. It is now read-only.

Can I call the compiled TS on the front end(browser environment) ? #8

Closed
LeoWangJ opened this issue Feb 9, 2023 · 2 comments
Closed

Comments

@LeoWangJ
Copy link

LeoWangJ commented Feb 9, 2023

For example, I want to call tact-template sample_SampleTactContract.ts file in my Dapp

But it import ton-emulator, this library contains some methods that do not have on the browser like __dirname

The compiled TS file looks more like testing for contract developers?

Could you give me a little inspiration how to call the compiled TS file in the front end, thanks!

@LeoWangJ
Copy link
Author

solved!
I remove ton-emulator related code and it can use.

@anstill
Copy link

anstill commented Feb 14, 2023

@ex3ndr I believe the issue still exists with a workaround removing ton-emulator code. It's tricky because Tact needs to know how to store data in the contract if you need to build from the init.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants