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
#[starknet::interface] | |
pub trait ValidateDeploy<TContractState> { | |
fn __validate_deploy__( | |
self: @TContractState, | |
class_hash: felt252, | |
contract_address_salt: felt252, | |
public_key: felt252 | |
) -> felt252; | |
} |
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
# Useful Python 2.x script for Tezos bakers to calculate payouts for their delegators | |
# This is a highly edited payout calculation script which aims to be a bit friendlier while giving more information. | |
# Original credit goes to /u/8x1_ from https://reddit.com/r/tezos/comments/98jwb4/paypy_there_is_no_more_excuse_for_not_paying/ | |
# Released under the MIT License - See bottom of file for license information | |
import urllib | |
import json | |
import random | |
import sys |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
cls.my = ContractInterface.create_from(join(project_dir, 'src/my_contract.tz'), | |
factory=NonFungibleTokenImpl) |
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
cls.my = ContractInterface.create_from(join(dirname(__file__), 'my_contract.tz'), | |
shell='sandboxnet') |
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
def test_concat(self): | |
res = self.my.call('bar').result(storage='foo') | |
self.assertEqual('foobar', res.storage) |
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
parameter string; | |
storage string; | |
code { DUP; | |
DIP { CAR ; NIL string ; SWAP ; CONS } ; | |
CDR ; CONS ; | |
CONCAT ; | |
NIL operation; PAIR } |
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
from os.path import dirname, join | |
from unittest import TestCase | |
from decimal import Decimal | |
from pytezos import ContractInterface, pytezos, format_timestamp, MichelsonRuntimeError | |
class MyContractTest(TestCase): | |
@classmethod | |
def setUpClass(cls): |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder