With the continuous progress of information technology and communication technology,we have entered the era of intelligent industry.In this era,the application of various intelligent technologies is promoting the upgrading and transformation of industry,and the new generation of information technologies such as artificial intelligence technology,5G technology and industrial Internet technology are constantly promoting the progress and development of the era.
Artificial intelligence technology is one of the core technologies in the era of intelligent industry.AI technology includes machine learning,deep learning,natural language processing,computer vision,etc.
Uniswap V1通过向流动性添加者发放流动性代币来记录流动性添加者在该交兑换合约的交易池内所持有的份额,流动性代币也是一种ERC20代币,不同的兑换合约之间的流动性代币不互通
#流动性代币名称
name:public(bytes32)#Uniswap V1
#流动性代币符号
symbol:public(bytes32)#UNI-V1
#精度
decimals:public(uint256)#18
#流动性代币总供应量
totalSupply:public(uint256)#total number of UNI in existence
#余额映射
balances:uint256[address]#UNI balance of an address
#余额使用授权列表
allowances:(uint256[address])[address]#UNI allowance of one address on another
#dev This function acts as a contract constructor which is not currently supported in contracts deployed
#using create_with_code_of().It is called once by the factory during contract creation.
public
def setup(token_addr:address):
assert(self.factory==ZERO_ADDRESS and self.token==ZERO_ADDRESS)and token_addr!=ZERO_ADDRESS
self.factory=msg.sender
self.token=token_addr
self.name=0x556e697377617020563100000000000000000000000000000000000000000000
self.symbol=0x554e492d56310000000000000000000000000000000000000000000000000000
self.decimals=18