Settings

Blockchain
Network
Unit
Language
Theme
Sound New Block

Transaction

9ba9c0d8cccbc4a8c379831e9e4673ed53606967ebe635312207ec6bb5f8afcd
Timestamp (utc)
2022-02-17 06:34:39
Fee Paid
0.00006562 BSV
(
20.95074626 BSV
-
20.95068064 BSV
)
Fee Rate
500 sat/KB
Version
1
Confirmations
249,634
Size Stats
13,122 B

11 Outputs

Total Output:
20.95068064 BSV
  • jrunLoUM61{"in":0,"ref":["native://Jig","f97d4ac2a3d6f5ed09fad4a4f341619dc5a3773d9844ff95c99c5d4f8388de2f_o1","63e0e1268d8ab021d1c578afb8eaa0828ccbba431ffffd9309d04b78ebeb6e56_o1"],"out":["9d2236f6186745df7f9369ef32b5a5bef6b857593df10ead773456feeaa85411","ed22946a02c14af943d1a2dfc7a96281e3a26f533adb923899cec2b0ee73f642","66e0957720c633fe681efb115bb85da7ffc39c8dbf061c4632988629300191da","61fc5d5d6a0aa088712646d35dbd6749370ca600b4dd919e886348b4a4c33905","0f468a4ab3d0e08456bd27f07d3027a7fda25992a29c460044242715226e35ca","1a6571c0a3f3fc08e7466f8c5c819b2a135a4739419095d9f424e4f98080ee82","2ebd9233487d3e79db40620d27b628d6b5e40d5efb7d0e651d4664e4228e78de","621d29cb65fd1aa6aa5dc9d08d9289f372fedccc04e37785956a97d560b98842","eb2e3fb4f031943a7bcd912601152ed98f948f614b787084b7d625d511ce8532"],"del":[],"cre":["mpeRNN2saTDQbR2aC6Psu7pv6kDs9WjjP1","mpeRNN2saTDQbR2aC6Psu7pv6kDs9WjjP1","mpeRNN2saTDQbR2aC6Psu7pv6kDs9WjjP1","mpeRNN2saTDQbR2aC6Psu7pv6kDs9WjjP1","mpeRNN2saTDQbR2aC6Psu7pv6kDs9WjjP1","mpeRNN2saTDQbR2aC6Psu7pv6kDs9WjjP1","mpeRNN2saTDQbR2aC6Psu7pv6kDs9WjjP1","mpeRNN2saTDQbR2aC6Psu7pv6kDs9WjjP1","mpeRNN2saTDQbR2aC6Psu7pv6kDs9WjjP1"],"exec":[{"op":"DEPLOY","data":["class CardJig extends Jig {\n init(owner, cardId) {\n expect(caller).toBe(CardJigCode);\n this.owner = owner;\n this.cardId = cardId;\n }\n static print(owner, cardId) {\n // only code owner can call this\n return new CardJigCode(owner, cardId);\n }\n}",{"deps":{"CardJigCode":{"$jig":3},"Jig":{"$jig":0},"expect":{"$jig":1}},"metadata":{"emoji":"🃏"}}]},{"op":"DEPLOY","data":["class PlayerJig extends Jig {\n init(owner, playerName) {\n this.owner = owner;\n this.playerName = playerName;\n }\n}",{"deps":{"Jig":{"$jig":0}},"metadata":{"emoji":"👨‍💻️"}}]},{"op":"DEPLOY","data":["class GamePlayerJig extends Jig {\n init(player, startingLife, deck) {\n expect(deck).toBeInstanceOf(GameDeckJig);\n function isRealPlayer(obj) {\n return obj && \"owner\" in obj;\n }\n if (isRealPlayer(player)) {\n this.owner = player.owner;\n this.playerName = player.playerName;\n }\n else {\n this.owner = player.address;\n this.playerName = \"Computer\";\n this.isAI = true;\n this.aiPrivKeyEncr = player.privKeyEncrypted;\n }\n this.maxPermTreasuresPlayedPerTurn = 1;\n this.permTreasuresPlayedThisTurn = 0;\n this.life = startingLife;\n this.maxHandSize = 5;\n this._prevMaxHandSize = 5;\n this.isDead = false;\n this.floatingMana = {\n Yellow: 0,\n Black: 0,\n Red: 0,\n Blue: 0,\n Green: 0,\n Colorless: 0\n };\n // init(owner: string, initialDefinitionSig: string, initialZone: Zone)\n this.cardStates = deck.locationSigs.deck\n .map(x => new GameCardStateJig(this.owner, x, GZone.Deck))\n .concat(deck.locationSigs.sideboard.map(x => new GameCardStateJig(this.owner, x, GZone.Sideboard)));\n this.startingDeck = deck;\n }\n resetTreasuresPlayed() {\n this.permTreasuresPlayedThisTurn = 0;\n }\n setMaxHandSize(size) {\n this._prevMaxHandSize = this.maxHandSize;\n this.maxHandSize = size;\n }\n revertMaxHandSize(size) {\n this.maxHandSize = this._prevMaxHandSize;\n }\n setMana(floating) {\n this.floatingMana = floating;\n }\n addMana(color, amount) {\n this.floatingMana[color] += amount;\n }\n incrPermTreasuresPlayed() {\n this.permTreasuresPlayedThisTurn++;\n }\n incrLife(amount) {\n this.life += amount;\n }\n setMaxPermTreasures(value) {\n this.maxPermTreasuresPlayedPerTurn = value;\n }\n setDeckCards(newDeck) {\n // remove old deck cards and concat new ones\n this.cardStates = this.cardStates.filter(x => x.zone !== GZone.Deck).concat(newDeck);\n }\n}",{"deps":{"GZone":{"Battlefield":"Battlefield","Deck":"Deck","Discard":"Discard","Hand":"Hand","Sideboard":"Sideboard","Stack":"Stack","Trash":"Trash"},"GameCardStateJig":{"$jig":6},"GameDeckJig":{"$jig":9},"Jig":{"$jig":0},"PlayerJig":{"$jig":4},"expect":{"$jig":1}},"metadata":{"emoji":"🧙"}},"class GameCardStateJig extends Jig {\n init(owner, initialDefinitionSig, initialZone) {\n this.owner = owner;\n this.defSig = initialDefinitionSig;\n this.zone = initialZone;\n this.controllingPlayerId = owner;\n this._LVL1_ZONES = [GZone.Battlefield, GZone.Stack, GZone.Discard, GZone.Trash];\n this._LVL2_ZONES = [GZone.Hand, GZone.Sideboard];\n this._LVL3_ZONES = [GZone.Deck];\n }\n _validateZoneDefSig(zone, defSig) {\n if (this._LVL1_ZONES.includes(zone) && !isValidCardId(defSig)) {\n throw new Error(`Card defSig not level one for public zone ${zone}. ${defSig}`);\n }\n if (this._LVL2_ZONES.includes(zone) && !defSig.startsWith(\"2\")) {\n throw new Error(`Card defSig not level two for zone ${zone}. ${defSig}`);\n }\n if (this._LVL3_ZONES.includes(zone) && !defSig.startsWith(\"3\")) {\n throw new Error(`Card defSig not level three for zone ${zone}. ${defSig}`);\n }\n }\n setZone(zone, defSig) {\n if (zone === GZone.Stack) {\n throw new Error(\"Call addStack to add to stack\");\n }\n if (zone === GZone.Battlefield) {\n throw new Error(\"Call addToBattlefield\");\n }\n this.zone = zone;\n if (defSig) {\n this.defSig = defSig;\n }\n this._validateZoneDefSig(zone, this.defSig);\n this.turnEnteredPlay = null;\n }\n addToBattlefield(game, args = {}) {\n this.turnEnteredPlay = game.state.currentTurn;\n this.isTapped = args.tapped;\n this.zone = GZone.Battlefield;\n this.attrs = {};\n if (args.initialAttrs) {\n const grouped = Object.fromEntries(Object.entries(groupBy(args.initialAttrs, x => x.mod)).map(([mod, attrs]) => [\n mod,\n attrs.reduce((prev, next) => prev + next.count || 1, 0)\n ]));\n this.attrs = grouped;\n }\n if (args.defSig) {\n this.defSig = args.defSig;\n }\n this._validateZoneDefSig(this.zone, this.defSig);\n }\n addToStack(defSig) {\n this._validateZoneDefSig(GZone.Stack, defSig);\n this.zone = GZone.Stack;\n this.defSig = defSig;\n }\n setDefSig(sig) {\n this._validateZoneDefSig(this.zone, sig);\n this.defSig = sig;\n }\n setTapped(isTapped) {\n this.isTapped = isTapped;\n }\n addAttributes(attrs) {\n for (const attr of attrs) {\n const exist = this.attrs[attr.mod];\n if (exist && attr.count) {\n this.attrs[attr.mod] = exist + attr.count;\n }\n else if (!exist) {\n this.attrs[attr.mod] = attr.count;\n }\n }\n }\n removeAttributes(attrsToRemove) {\n if (attrsToRemove) {\n for (const attr of attrsToRemove) {\n if (attr.mod in this.attrs) {\n if (attr.count) {\n // if they pass a number, reduce it by that number\n this.attrs[attr.mod] -= attr.count;\n if (this.attrs[attr.mod] <= 0) {\n delete this.attrs[attr.mod];\n }\n }\n else {\n delete this.attrs[attr.mod];\n }\n }\n }\n }\n else {\n this.attrs = {};\n }\n }\n resetWithSig(sig, zone, game, isTapped) {\n if (zone === GZone.Stack) {\n throw new Error(\"Call addStack to add to stack\");\n }\n if (zone === GZone.Battlefield) {\n this.turnEnteredPlay = game.state.currentTurn;\n }\n else {\n this.turnEnteredPlay = null;\n }\n this._validateZoneDefSig(zone, sig);\n this.defSig = sig;\n this.zone = zone;\n this.isTapped = isTapped;\n this.controllingPlayerId = this.owner;\n }\n}",{"deps":{"GZone":{"Battlefield":"Battlefield","Deck":"Deck","Discard":"Discard","Hand":"Hand","Sideboard":"Sideboard","Stack":"Stack","Trash":"Trash"},"Jig":{"$dup":["1","deps","Jig"]},"groupBy":{"$jig":7},"isValidCardId":{"$jig":8}},"metadata":{"emoji":"🎴"}},"function groupBy(arr, selector) {\n let grouped = {};\n for (const item of arr) {\n const val = selector(item);\n grouped[val] = grouped[val] || [];\n grouped[val].push(item);\n }\n return grouped;\n}",{"deps":{}},"function isValidCardId(cardId) {\n return /^[A-Z]{3}[0-9A-Z]{0,3}\\/\\d+$/.test(cardId);\n}",{"deps":{}},"class GameDeckJig extends Jig {\n init(owner, locationSigs, cardHashes) {\n expect(locationSigs).toBeObject();\n expect(cardHashes).toBeArray();\n this.owner = owner;\n this.locationSigs = locationSigs;\n this.cardHashes = cardHashes;\n }\n}",{"deps":{"Jig":{"$dup":["1","deps","Jig"]},"expect":{"$dup":["1","deps","expect"]}},"metadata":{"emoji":"🎴"}}]},{"op":"DEPLOY","data":["class DeckDefinitionJig extends Jig {\n init(owner, deckName, startingDeck, sideboard) {\n this.owner = owner;\n this.deckName = deckName;\n this.startingDeck = startingDeck;\n this.sideboard = sideboard;\n }\n cards() {\n return this.startingDeck.concat(this.sideboard);\n }\n}",{"deps":{"CardJig":{"$jig":3},"Jig":{"$jig":0}},"metadata":{"emoji":"🎲"}}]},{"op":"DEPLOY","data":["class GameJig extends Jig {\n init(owner, gameId, players) {\n this.owner = owner;\n for (const p of players) {\n expect(p).toBeInstanceOf(GamePlayerJig);\n }\n this.players = players;\n this.turnOrder = players.map(x => x.owner);\n this.gameId = gameId;\n this.activeEffects = [];\n }\n pushCardStack(ability) {\n this.state.stack.push(ability);\n }\n popCardStack() {\n const rtn = this.state.stack.pop();\n return rtn;\n }\n setGameState(state) {\n this.state = state;\n }\n addEffects(effects) {\n this.activeEffects.push(...effects);\n }\n removeEffect(ownerPlayerId, effectKey) {\n const index = this.activeEffects.findIndex(x => x.effectKey === effectKey && x.ownerPlayerId === ownerPlayerId);\n if (~index) {\n this.activeEffects.splice(index, 1);\n return true;\n }\n else {\n return false;\n }\n }\n onTurnEnd() {\n this.declaredAttacks = null;\n const prev = this.state;\n const lastTurnPlayer = prev.turnQueue.shift();\n this.state = {\n ...prev,\n currentTurn: prev.currentTurn + 1,\n turnQueue: lastTurnPlayer.isUnorthodoxTurn\n ? // player had an additional turn, ignore queue shift\n prev.turnQueue.slice()\n : [...prev.turnQueue, lastTurnPlayer]\n };\n }\n declareAttackers(attackers) {\n this.declaredAttacks = attackers;\n }\n declareBlockers(attacker, blocker) {\n const attack = this.declaredAttacks.find(x => x.attacker === attacker);\n if (!attack) {\n return false;\n }\n attack.blockers || (attack.blockers = []);\n if (!attack.blockers.includes(blocker)) {\n attack.blockers.push(blocker);\n return true;\n }\n return false;\n }\n removeBlockers(attacker, blocker) {\n const attack = this.declaredAttacks.find(x => x.attacker === attacker);\n if (!attack) {\n return false;\n }\n const index = attack.blockers.indexOf(blocker);\n if (~index) {\n attack.blockers.splice(index, 1);\n return true;\n }\n return false;\n }\n}",{"deps":{"CardJig":{"$jig":3},"GZone":{"Battlefield":"Battlefield","Deck":"Deck","Discard":"Discard","Hand":"Hand","Sideboard":"Sideboard","Stack":"Stack","Trash":"Trash"},"GameCardStateJig":{"$jig":6},"GameDeckJig":{"$jig":9},"GamePlayerJig":{"$jig":5},"Group":{"$jig":2},"Jig":{"$jig":0},"PlayerJig":{"$jig":4},"expect":{"$jig":1}},"metadata":{"emoji":"🕹️"}}]}]}
    https://whatsonchain.com/tx/9ba9c0d8cccbc4a8c379831e9e4673ed53606967ebe635312207ec6bb5f8afcd
Total Output:
20.95068064 BSV