Settings

Blockchain
Network
Unit
Language
Theme
Sound New Block

Transaction

57b269e3b2aa66e215d0651d2dbf19be91b9274f749df83ecd5cd0053029cd17
Timestamp (utc)
2022-02-19 06:27:48
Fee Paid
0.00006674 BSV
(
20.93291808 BSV
-
20.93285134 BSV
)
Fee Rate
500.1 sat/KB
Version
1
Confirmations
252,796
Size Stats
13,343 B

11 Outputs

Total Output:
20.93285134 BSV
  • jrunLoUMí0{"in":2,"ref":["native://Jig","f97d4ac2a3d6f5ed09fad4a4f341619dc5a3773d9844ff95c99c5d4f8388de2f_o1","63e0e1268d8ab021d1c578afb8eaa0828ccbba431ffffd9309d04b78ebeb6e56_o1"],"out":["1a54692fb3cd7f308ec89a0e67768abc87e3f23929885f4568e2d23901021b52","181854cb3241c70b14c55fa23302dd843a22170002a9e3f413ab11a601902acf","d6b2b4c82d1dcf860ae111c30a48e0b6fde11c8ea6c5c697230d44f5c8246e7c","0a0d35fd1861c2bb7a41c66f0c7c7326c71a446c744a6ddc3d302549f1f535a2","99d78d8965483e157885d9f99423ea9401c801bf68a5cd5915aba88c56add3c9","9c9cb06d079468b854dc38e23cd0a0c0cd5b9b5387caf9ec314d0904bb26d456","fd18a0ae3a9af2069bbc9ccc0c1866b46db0c2705275eeef1703f9e6fe76bef9","272a078a90d33462b4bd52a7ded5dedb5426e6ce0c01c5eb019b42d68e789132","03caf2eb5048c08382e47f576ddec3c0d5b00b945c87eff15965cb9a1d8581da"],"del":[],"cre":["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":5},"Jig":{"$jig":2},"expect":{"$jig":3}},"metadata":{"emoji":"🃏"}}]},{"op":"UPGRADE","data":[{"$jig":0},"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":5},"Jig":{"$jig":2}},"metadata":{"emoji":"🎲"}}]},{"op":"DEPLOY","data":["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 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 }\n _validateZoneDefSig(zone, defSig) {\n if (LVL1_ZONES.includes(zone) && !isValidCardId(defSig)) {\n throw new Error(`Card defSig not level one for public zone ${zone}. ${defSig}`);\n }\n if (LVL2_ZONES.includes(zone) && !defSig.startsWith(\"2\")) {\n throw new Error(`Card defSig not level two for zone ${zone}. ${defSig}`);\n }\n if (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":{"$jig":2},"LVL1_ZONES":["Battlefield","Stack","Discard","Trash"],"LVL2_ZONES":["Hand","Sideboard"],"LVL3_ZONES":["Deck"],"groupBy":{"$jig":6},"isValidCardId":{"$jig":7}},"metadata":{"emoji":"🎴"}},"class GameDeckJig extends Jig {\n init(owner, locationSigs, cardHashes) {\n expect(locationSigs).toBeObject();\n expect(cardHashes).toBeArray();\n this.owner = owner;\n locationSigs = locationSigs;\n this.cardHashes = cardHashes;\n }\n}",{"deps":{"Jig":{"$dup":["5","deps","Jig"]},"expect":{"$jig":3}},"metadata":{"emoji":"🎴"}},"class PlayerJig extends Jig {\n init(owner, playerName) {\n this.owner = owner;\n this.playerName = playerName;\n }\n}",{"deps":{"Jig":{"$dup":["5","deps","Jig"]}},"metadata":{"emoji":"👨‍💻️"}},"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 Purple: 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":8},"GameDeckJig":{"$jig":9},"Jig":{"$dup":["5","deps","Jig"]},"PlayerJig":{"$jig":10},"expect":{"$dup":["7","deps","expect"]}},"metadata":{"emoji":"🧙"}}]},{"op":"UPGRADE","data":[{"$jig":1},"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 this.stackNonceIndex = 0;\n }\n pushCardStack(ability) {\n ability.nonce = ++this.stackNonceIndex;\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":5},"GZone":{"Battlefield":"Battlefield","Deck":"Deck","Discard":"Discard","Hand":"Hand","Sideboard":"Sideboard","Stack":"Stack","Trash":"Trash"},"GameCardStateJig":{"$jig":8},"GameDeckJig":{"$jig":9},"GamePlayerJig":{"$jig":11},"Group":{"$jig":4},"Jig":{"$jig":2},"PlayerJig":{"$jig":10},"expect":{"$jig":3}},"metadata":{"emoji":"🕹️"}}]}]}
    https://whatsonchain.com/tx/57b269e3b2aa66e215d0651d2dbf19be91b9274f749df83ecd5cd0053029cd17
Total Output:
20.93285134 BSV