@stellar-expert/tx-meta-effects-parser 6.3.0 → 6.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/effects-analyzer.js +7 -0
package/package.json
CHANGED
package/src/effects-analyzer.js
CHANGED
|
@@ -402,6 +402,7 @@ class EffectsAnalyzer {
|
|
|
402
402
|
break
|
|
403
403
|
}
|
|
404
404
|
case 'createContract':
|
|
405
|
+
case 'createContractV2':
|
|
405
406
|
const preimage = value.contractIdPreimage()
|
|
406
407
|
const executable = value.executable()
|
|
407
408
|
const executableType = executable.switch().name
|
|
@@ -434,6 +435,12 @@ class EffectsAnalyzer {
|
|
|
434
435
|
default:
|
|
435
436
|
throw new TxMetaEffectParserError('Unknown contract type: ' + executableType)
|
|
436
437
|
}
|
|
438
|
+
if (func.arm() === 'createContractV2') {
|
|
439
|
+
const args = value.constructorArgs() //array
|
|
440
|
+
if (args.length > 0) {
|
|
441
|
+
effect.constructorArgs = args.map(arg => arg.toXDR('base64'))
|
|
442
|
+
}
|
|
443
|
+
}
|
|
437
444
|
this.addEffect(effect, 0)
|
|
438
445
|
break
|
|
439
446
|
default:
|