I'm trying to use two capi calls in succession
first is creating nft collection
second is setting metadata for that collection
I need to make these calls separately, because first call generates collection ID, which I take and set the metadata
so for maximum speed I'm utilising inBlockEvents
which allows to get the ID very fast without waiting for things to be finalized, this is how I did things in PJS
but it seems that if I run a second call without waiting for things to be finalized I get the "cannot regress" error in rune.js
async evaluate(time, receipt) {
if (this._currentTime > time)
throw new Error("cannot regress");
If I use finalizedEvents in the first call, then everything works fine.
So what am I missing? Do I actually need to wait for everything to finish (finalize) or I can somehow handle this situation?
I'm trying to use two capi calls in succession first is creating nft collection second is setting metadata for that collection
I need to make these calls separately, because first call generates collection ID, which I take and set the metadata
so for maximum speed I'm utilising inBlockEvents which allows to get the ID very fast without waiting for things to be finalized, this is how I did things in PJS but it seems that if I run a second call without waiting for things to be finalized I get the "cannot regress" error in rune.js
If I use finalizedEvents in the first call, then everything works fine.
So what am I missing? Do I actually need to wait for everything to finish (finalize) or I can somehow handle this situation?