#0
nonstandard
0.00004000 BSV
Q!=gIë¤ä\üP?ÌÏFëAð¶åôýddÁ³Q®M{"__cls":"class PositionSC {\n constructor(owner, numberOfShares = 0, dealId = '', facilityId = '', fundId = '') {\n this._owners = [owner];\n this.numberOfShares = numberOfShares;\n this.dealId = dealId\n this.facilityId = facilityId;\n this.fundId = fundId;\n }\n merge(...positions) {\n try {\n if (positions.length === 0) return this;\n let sendNumberOfShares = this.numberOfShares;\n this.numberOfShares = 0;\n for (let i = 0; i < positions.length; i += 1) {\n if (positions[i].dealId !== this.dealId || positions[i].facilityId !== this.facilityId || positions[i].fundId !== this.fundId) {\n throw new Error(`Unable to merge positions`);\n }\n sendNumberOfShares += positions[i].numberOfShares;\n positions[i].numberOfShares = 0;\n }\n return new PositionSC(this._owners[0], sendNumberOfShares, this.dealId, this.facilityId, this.fundId);\n } catch (err) {\n throw new Error(`Unable to merge positions`);\n }\n }\n}","__index":{"obj":0},"__func":"constructor","__args":["020e3d679949eba4e45c02fc503fcccf461eeb41f0b6e5f4fd64106491c18bb3ad",300,"1","2","3"]}u
https://whatsonchain.com/tx/d15db655647c9d8a1209c957edf5a0ca72eac4c975c4ebc0c91cd80bae8d3555