You want your token to have fixed max supply (NFT is just token with 1 max supply).
This file contains hidden or 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
# Poker Design Notes | |
## 合约框架 | |
### CheckIn | |
- 创建牌桌,初始化参数 | |
- 玩家加入,锁定资产 | |
- 玩家提交公钥和DLOG证明,客户端合并玩家公钥可得全局公钥 |
This file contains hidden or 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
contract ERC20 { | |
map[address][uint256] _balances; | |
// deposit through native module | |
// native module will first move user's native tokens to contract address, | |
// then mint on evm directly | |
function deposit(receipient, amount) { | |
require(msg.sender == native_module_address) | |
_balances[receipient] += amount; | |
} |
This file contains hidden or 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
// Sources flattened with hardhat v2.4.3 https://hardhat.org | |
// File @openzeppelin/contracts/token/ERC20/[email protected] | |
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.0; | |
/** | |
* @dev Interface of the ERC20 standard as defined in the EIP. |
This file contains hidden or 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
[package] | |
name = "async-benchmark" | |
version = "0.1.0" | |
authors = ["yihuang <[email protected]>"] | |
edition = "2018" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] |
This file contains hidden or 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 json | |
import sys | |
if len(sys.argv) < 3: | |
print( | |
"""add_genesis_accounts.py accounts.json path/to/genesis.json | |
new genesis file is print to stdout | |
""", | |
file=sys.stderr, |
This file contains hidden or 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 base64 | |
import json | |
# import hashlib | |
import sys | |
import bech32 | |
def clear_staking(genesis): |
$ nix-env -i hello
installing 'hello-2.10'
these paths will be fetched (0.02 MiB download, 0.07 MiB unpacked):
/nix/store/mmlnjqg7gbr4w7xjlwj614z97kk1rvfv-hello-2.10
copying path '/nix/store/mmlnjqg7gbr4w7xjlwj614z97kk1rvfv-hello-2.10' from 'https://cache.nixos.org'...
This file contains hidden or 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
[package] | |
name = "test-rust" | |
version = "0.1.0" | |
authors = ["yihuang <[email protected]>"] | |
edition = "2018" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] |