warp-contracts / warp

An implementation of the Arweave SmartWeave smart contracts protocol.
MIT License
159 stars 44 forks source link

[BUG] warp sdk 1.3.3 readState error with webpack5 #385

Closed marslab2022 closed 1 year ago

marslab2022 commented 1 year ago

Describe the bug Updated to warp sdk 1.3.3 from 1.2.20, and when calling readState image Got error in console image

To Reproduce GH Example: https://github.com/marslab2022/test_warp_v3

npm install
npm start

press F12 to open console, will display the error.

Expected behavior should no error and print contract state in console.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

asiaziola commented 1 year ago

Hey @marslab2022 ! Have you tried importing from warp-contracts/web?

asiaziola commented 1 year ago

I've just tested it in your github repository and it seems to work fine. Here is a repo with sample usage for several web bundlers including webpack5 https://github.com/warp-contracts/bundlers

marslab2022 commented 1 year ago

warp-contracts/web

Thanks. With warp-contracts/web it works fine!