Parameter | Weight |
---|---|
1x Unverified proof | 1 |
1x Verified proof | 4 |
👆 prior to announcement | +2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { TzKTAPI, TzKTEvents } from '@asbjornenge/tzkt-api' | |
import ohash from 'object-hash' | |
import { | |
TZKT_API, | |
CHAINBORN_DATASTORE | |
} from './config.js' | |
import { getClient } from './utils.js' | |
import './sentry.js' | |
const api = new TzKTAPI({ BASE: TZKT_API }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export async function summonHero({ dappAddress, walletAddress, tokenAddress, tokenId, name, cost }) { | |
const tokenContract = await Tezos.wallet.at(tokenAddress) | |
const dappContract = await Tezos.wallet.at(dappAddress) | |
const batchOp = await Tezos.wallet.batch([ | |
{ | |
kind: OpKind.TRANSACTION, | |
...tokenContract.methods.update_operators([ | |
{ | |
add_operator: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { TezosToolkit } from '@taquito/taquito' | |
import { BeaconWallet } from '@taquito/beacon-wallet' | |
const Tezos = new TezosToolkit() | |
const wallet = new BeaconWallet({ name: "ChainBorn" }) | |
Tezos.setWalletProvider(wallet) | |
export async function setProvider(rpc) { | |
Tezos.setProvider({ rpc: rpc}) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import smartpy as sp | |
import json | |
import os | |
from datetime import datetime, timezone | |
env = os.environ | |
cwd = os.getcwd() | |
Data = sp.io.import_script_from_url("file://%s/datastore.py" % cwd) | |
Game = sp.io.import_script_from_url("file://%s/controller.py" % cwd) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import smartpy as sp | |
import os | |
cwd = os.getcwd() | |
Game = sp.io.import_script_from_url("file://%s/controller.py" % cwd) | |
Data = sp.io.import_script_from_url("file://%s/datastore.py" % cwd) | |
Types = sp.io.import_script_from_url("file://%s/types.py" % cwd) | |
Tokens = sp.io.import_script_from_url("file://%s/tokens.py" % cwd) | |
Randomizer = sp.io.import_script_from_url("https://ipfs.infura.io/ipfs/QmPNkabMCpDmFE6GynfS9UAoQDLE6PyCLpRJQmceEp2oTv") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import smartpy as sp | |
import os | |
cwd = os.getcwd() | |
Types = sp.io.import_script_from_url("file://%s/types.py" % cwd) | |
class ChainBornGame(sp.Contract): | |
def __init__( | |
self, | |
admins, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import smartpy as sp | |
import os | |
cwd = os.getcwd() | |
Types = sp.io.import_script_from_url("file://%s/types.py" % cwd) | |
class ChainBornDatastore(sp.Contract): | |
def __init__( | |
self, | |
admins, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import smartpy as sp | |
## Config | |
# | |
TGameConfig = sp.TRecord( | |
paused=sp.TBool, | |
summon_cost=sp.TMutez, | |
minimum_loot=sp.TMutez, | |
hero_health_initial=sp.TNat, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
rm -Rf bin pyvenv.cfg | |
wget https://smartpy.io/cli/install.sh | |
chmod +x install.sh | |
./install.sh --prefix bin | |
rm install.sh | |
virtualenv . | |
cd bin && ln -sf SmartPy.sh spy && cd .. |
NewerOlder