New feature: Interact writes from contracts #50
ppedziwiatr
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have just released a new SDK version with our experimental implementation of the writes between contracts (#37) - basically as an extension of the base SmartWeave protocol.
To enable this feature, you need to switch the
internalWrites
feature switch in the evaluation options. The write function is available from the contract code underSmartWeave.contracts.write
.We would suggest reviewing our integration tests in https://github.com/redstone-finance/redstone-smartcontracts/tree/main/src/__tests__/integration/internal-writes - they should cover most basic use-cases (with some more real-life example in https://github.com/redstone-finance/redstone-smartcontracts/blob/main/src/__tests__/integration/internal-writes/staking.test.ts).
Any feedback would be greatly appreciated. As you probably expect - that's was a tricky thing to implement 😉 - so there are probably some bugs. If you decide to use it, we'll be happy with reviewing the code and helping with testing.
The best way to quickly test this on your contracts would be use ArLocal to quickly deploy contracts and write some interactions (similarly to how we write our integration tests).
Beta Was this translation helpful? Give feedback.
All reactions