Digital economy is an economic form with data resources as the key elements and digital technology as the support. Digital industrialization and industrial digitalization are the key contents of the digital economy. Digital industrialization is mainly to promote digital technology to form a large-scale industry. Industrial digitalization is mainly to use digital technology to support and promote the transformation and upgrading of traditional industries. In this process, we can promote information technology services to accelerate digital industrialization based on digital technologies such as blockchain, and rely on the new scenario of the metauniverse to drive information consumption and promote industrial digitalization.
contract ERC721{
function balanceOf(address _owner)external view returns(uint256);
关于项目技术开发唯:MrsFu123代币发行、dapp智能合约开发、链游开发、交易所开发、
量化合约开发、互助游戏开发、Nft数字藏品开发、众筹互助开发、元宇宙开发、swap开发、
链上合约开发、ido开发、商城开发,成熟技术团队,欢迎实体参考。
function ownerOf(uint256 _tokenId)external view returns(address);
区块链技术开发:I35系统7O98软件O7I8
function safeTransferFrom(address _from,address _to,uint256 _tokenId,bytes data)external payable;
function safeTransferFrom(address _from,address _to,uint256 _tokenId)external payable;
function transferFrom(address _from,address _to,uint256 _tokenId)external payable;
function approve(address _approved,uint256 _tokenId)external payable;
function setApprovalForAll(address _operator,bool _approved)external;
function getApproved(uint256 _tokenId)external view returns(address);
function isApprovedForAll(address _owner,address _operator)external view returns(bool);
function supportsInterface(bytes4 interfaceID)external view returns(bool);
event Transfer(address indexed _from,address indexed _to,uint256 _tokenId);
event Approval(address indexed _owner,address indexed _approved,uint256 _tokenId);
event ApprovalForAll(address indexed _owner,address indexed _operator,bool _approved);
}
Python Web3与智能合约的交互
开发合约,或者开源合约,都会有一份该合约的ABI JSON文件
ABI文件包括了智能合约的输入与输出格式(其中name对应合约function的名字)
from web3 import Web3
import web3
CONTRACT='0x22C1f6050E56d2876009903609a2cC3fEf83B415'#合约地址
#---打开abi json文件
with open('contracts/contract_abi.json','r')as contract_abi:
abi=json.load(contract_abi)
#---提供HTTPProvider,链上互动的接口
w3=Web3(Web3.HTTPProvider(HTTPProvider))
#---检查HTTPProvider
print(w3.isConnected())
#---继续
#---连接合约
contract=w3.eth.contract(address=CONTRACT,abi=abi)