当前位置:网站首页>Ibox system development core functions and some core source codes
Ibox system development core functions and some core source codes
2022-06-10 18:34:00 【fifteen billion eight hundred and eighty-nine million seven hun】
IBOX The core functions of the system are as follows :
One 、 Collection chain
Digital collections are simply linked , One click quick release ;
Two 、 Collection distribution
Powerful promotion and distribution function , Users become salesmen ;
3、 ... and 、 Multiple ends in one
H5 End Small program end , A system is freely generated ;
Four 、 Gift on the chain
Support collection gift function , Improve the user experience ;
5、 ... and 、 The interface is open
Access to the original APP, Small program etc. .
Here are iobx The core source code of collection unit synthesis in the system
from IBOX import IBOX_ART
import json
# https://etherscan.io/tx/0xbede5e44cc631303a22d066cc269f989469742b5bb6d9a74185e146dab9211e4
# https://mainnet.infura.io/v3/8a264f274fd94de48eb290d35db030ab
# contract address is0x0632aDCab8F12edD3b06F99Dc6078FE1FEDD32B0
from web3 import Web3
my_provider = Web3.HTTPProvider('https://mainnet.infura.io/v3/8a264f274fd94de48eb290d35db030ab')
w3 = Web3(my_provider)
def main():
contract_address = '0x0632aDCab8F12edD3b06F99Dc6078FE1FEDD32B0'
contract_abi = json.load(open('surge.abi', 'r'))
# print(contract_abi)
mycontract = w3.eth.contract(address=contract_address, abi=contract_abi)
name = mycontract.functions.name().call()
print(name)
symbol = mycontract.functions.symbol().call()
print(symbol)
tokenURI = mycontract.functions.tokenURI(1802).call()
print(tokenURI)
pass
if __name__ == '__main__':
main()
Use merkle tree
/// @notice Presale minting verifies callers address is in Merkle Root
/// @param _amountOfTokens Amount of tokens to mint
/// @param _merkleProof Hash of the callers address used to verify the location of that address in the Merkle Root
function presaleMint(uint256 _amountOfTokens, bytes32[] calldata _merkleProof)
external
payable
verifyMaxPerUser(msg.sender, _amountOfTokens)
verifyMaxSupply(_amountOfTokens)
isEnoughEth(_amountOfTokens)
{
require(status == SaleStatus.Presale, "Presale not active");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender));
require(MerkleProof.verify(_merkleProof, merkleRoot, leaf), "Not in presale list");
_mintedAmount[msg.sender] += _amountOfTokens;
_safeMint(msg.sender, _amountOfTokens);
}
Set up merkle root
/// @notice Set Presale Merkle Root
/// @param _merkleRoot Merkle Root hash
function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner {
merkleRoot = _merkleRoot;
}
边栏推荐
- VMware vCenter version number comparison table
- Data URL
- c语言学习回顾---1 基础知识回顾
- AFL fuzzy multithreading
- 阅读micropyton源码-添加C扩展类模块(4)
- How to locate the hot problem of the game
- 作为程序员,对于底层原理真的有那么重要吗?
- C language -- 12 branch statement switch
- 企业管理者的质疑,这么多年的信息化,我们的钱花哪去了?
- Semiconductor silicon continued to fall short of demand, and Shenggao's long-term contract price rose by 30%!
猜你喜欢

NaturalSpeech模型合成语音在CMOS测试中首次达到真人语音水平

连续六年稳居中国SDN(软件)市场份额第一

Custom types: structural bodies

两部门发文明确校外培训机构消防安全条件

攻防演练 | 网络安全“吹哨人”:安全监控

滑动窗口最值问题

国货彩妆,败走618

Developers changing the world - Yao Guang teenagers playing Tetris

Form form of the uniapp uview framework, input the verification mobile number and verification micro signal

数字化时代,企业如何进行数据安全治理,保障数据资产安全
随机推荐
“数字化转型,数据先行”,谈谈数据治理对企业来说到底有多重要
两部门发文明确校外培训机构消防安全条件
c语言---12 分支语句switch
AOV network topology sorting
如何定位游戏发热问题
三部曲套路解bob活命问题
CodeCraft-22 and Codeforces Round #795 (Div. 2)
VMware vCenter version number comparison table
Research on next generation distributed file system
基于注解和反射生成xml
当前有哪些主流的全光技术方案?-下篇
【QNX Hypervisor 2.2 用户手册】3.2.2 VM配置示例
台积电刘德音:不担心半导体库存修正及美日韩合作,今年业绩将增长30%!
将同一文件夹下的大量文件根据设定分至多组
Record of cmake and GCC installation
【QNX Hypervisor 2.2 用户手册】3.2.3 ACPI表和FDT
Faster Planner——Kinodynamic Astar详解
[QNX hypervisor 2.2 user manual] 3.3 configure guest
c语言---5 初识字符串、转义字符、注释
[QNX hypervisor 2.2 user manual] 3.2.1 VM configuration syntax