当前位置:网站首页>Uniswap合约学习-- Uniswap UNI Token
Uniswap合约学习-- Uniswap UNI Token
2022-06-09 12:46:00 【MateZero】
记得朋友圈看到过一句话,如果Defi是以太坊的皇冠,那么Uniswap就是这顶皇冠中的明珠。当前,Uniswap已经发行了自己的ERC20代币,本文就是学习其代币合约的记录。
一、UNI Token 介绍
UNI Token 为 Uniswap团队自己发行的以太坊上的ERC20代币,其合约源码在etherscan上已经开源可查。在UniswapV2相关合约学习完之后(学习期间),我们抽空来学习一下它发行的ERC20代币合约。
UNI Token 代币合约并不属于Uniswap交易所的一部分,所以没有把它像以前那样归类到核心合约或者周边合约。但是它的某些实现上,和核心合约中的交易对流动性代币合约的相应实现有些类似。
二、合约源码
因为合约源码直接从ethersacn上复制而来,它将所有导入都写在一个源文件里,因此篇幅较长。笔者稍微整理了一下,将SafeMath库放在外面以减少篇幅。修改后的源码为:
pragma solidity ^0.5.16;
pragma experimental ABIEncoderV2;
import 边栏推荐
- leetcode:497. 非重叠矩形中的随机点【随缘随机 + 前缀和二分 + 过了就行】
- Seven misconceptions of digital transformation
- 炒作剽窃、内鬼欺诈 OpenSea上常见的NFT骗局及安全建议
- 记忆化搜索+状态压缩leetcode.464
- Zhengzhou Evan technology security headlines
- 云呐|固定资产归哪个部门管理,归谁管理
- Event storm method of DDD modeling methodology
- 【并查集】合根植物(连通块的数数量)
- 论文阅读《LEAStereo:Hierarchical Neural Architecture Search for Deep Stereo Matching》
- Using kubekey to build kubernetes/kubesphere environment
猜你喜欢

What's the use of finding amino acids in extraterrestrial life?

【并查集】合根植物(连通块的数数量)
浅谈RedisTemplate和StringRedisTemplate的区别

网络七层结构是干啥的?看这篇文章就够了

Yunna | which department manages the fixed assets and who manages them

常见的图像分割方法

【clickhouse专栏】单机版的安装与验证

6000 + words to help you understand the evolution of Internet architecture!

Wechat applet

Arm architecture corresponding to commonly used chips in the market
随机推荐
Virtual consumption leads new fashion and mutual integration cloud NFT system platform customization development helps enterprises open the "Z" era
未磁科技完成超亿元A轮融资,核心团队毕业于北航
Idea merges the newly added modifications to the previous version
Development and present situation of Network Space Surveying and mapping at home and abroad
Seven misconceptions of digital transformation
进程,时间片,并发与并行
Lossy transmission instance
Yunna administrative unit fixed assets management system, unit fixed assets management measures
TCP/IP协议机制详解
6000 + words to help you understand the evolution of Internet architecture!
C语言 结构体 | 链表
5分钟了解NFV
2022.5.31-----leetcode.剑指offer.114
对某快捷酒店一次内网测试
有损传输实例
MySQL Installer 方式安装MySQL
"Forget to learn again" shell Basics - 28. Description of conditional expressions in awk
5G发牌三周年 云网融合加速 如何解决企业网络之忧?
在这些根技术里,读懂华为的“三观”
使用nodejs导出md/Markdown文档当中的图片到本地并替换原始图片链接为本地图片链接