可升级代理合约测试
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
"author": "Jason.Chen",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@openzeppelin/contracts": "^4.8.0"
|
||||
"@openzeppelin/contracts": "^4.8.0",
|
||||
"@openzeppelin/contracts-upgradeable": "^4.8.0"
|
||||
}
|
||||
}
|
||||
|
||||
11
src/ERC20/UpgradeableERC20.sol
Normal file
11
src/ERC20/UpgradeableERC20.sol
Normal file
@@ -0,0 +1,11 @@
|
||||
// SPDX-License-Identifier: GPL-3.0
|
||||
|
||||
pragma solidity ^0.8.0;
|
||||
|
||||
import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol";
|
||||
|
||||
contract UpgradeableERC20 is ERC20Upgradeable {
|
||||
function initialize() public initializer {
|
||||
__ERC20_init("MyToken", "MTK");
|
||||
}
|
||||
}
|
||||
82
src/ERC721/StandardJsonInput/MyERC721.json
Normal file
82
src/ERC721/StandardJsonInput/MyERC721.json
Normal file
File diff suppressed because one or more lines are too long
13
src/proxy/AdminUpgradeabilityProxy.sol
Normal file
13
src/proxy/AdminUpgradeabilityProxy.sol
Normal file
@@ -0,0 +1,13 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
pragma solidity ^0.8.0;
|
||||
|
||||
import "@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol";
|
||||
import "@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol";
|
||||
|
||||
contract AdminUpgradeabilityProxy is TransparentUpgradeableProxy {
|
||||
constructor(
|
||||
address logic,
|
||||
address admin,
|
||||
bytes memory data
|
||||
) payable TransparentUpgradeableProxy(logic, admin, data) {}
|
||||
}
|
||||
@@ -2,6 +2,11 @@
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@openzeppelin/contracts-upgradeable@^4.8.0":
|
||||
version "4.8.0"
|
||||
resolved "https://registry.npmmirror.com/@openzeppelin/contracts-upgradeable/-/contracts-upgradeable-4.8.0.tgz#26688982f46969018e3ed3199e72a07c8d114275"
|
||||
integrity sha512-5GeFgqMiDlqGT8EdORadp1ntGF0qzWZLmEY7Wbp/yVhN7/B3NNzCxujuI77ktlyG81N3CUZP8cZe3ZAQ/cW10w==
|
||||
|
||||
"@openzeppelin/contracts@^4.8.0":
|
||||
version "4.8.0"
|
||||
resolved "https://registry.npmmirror.com/@openzeppelin/contracts/-/contracts-4.8.0.tgz#6854c37df205dd2c056bdfa1b853f5d732109109"
|
||||
|
||||
Reference in New Issue
Block a user