@etherisc/gif-next 0.0.2-ac5f18b → 0.0.2-aeb86f4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +70 -0
- package/artifacts/contracts/components/Component.sol/Component.dbg.json +4 -0
- package/artifacts/contracts/components/Component.sol/Component.json +179 -0
- package/artifacts/contracts/components/Component.sol/InstanceLinked.dbg.json +4 -0
- package/artifacts/contracts/components/Component.sol/InstanceLinked.json +35 -0
- package/artifacts/contracts/components/IPool.sol/IPoolComponent.dbg.json +4 -0
- package/artifacts/contracts/components/IPool.sol/IPoolComponent.json +179 -0
- package/artifacts/contracts/components/IProduct.sol/IProductComponent.dbg.json +4 -0
- package/artifacts/contracts/components/IProduct.sol/IProductComponent.json +192 -0
- package/artifacts/contracts/components/Pool.sol/Pool.dbg.json +4 -0
- package/artifacts/contracts/components/Pool.sol/Pool.json +213 -0
- package/artifacts/contracts/components/Product.sol/Product.dbg.json +4 -0
- package/artifacts/contracts/components/Product.sol/Product.json +231 -0
- package/artifacts/contracts/experiment/errors/Require.sol/Require.dbg.json +4 -0
- package/artifacts/contracts/experiment/errors/Require.sol/Require.json +105 -0
- package/artifacts/contracts/experiment/errors/Revert.sol/Revert.dbg.json +4 -0
- package/artifacts/contracts/experiment/errors/Revert.sol/Revert.json +105 -0
- package/artifacts/contracts/experiment/inheritance/A.sol/A.dbg.json +4 -0
- package/artifacts/contracts/experiment/inheritance/A.sol/A.json +128 -0
- package/artifacts/contracts/experiment/inheritance/A.sol/AShared.dbg.json +4 -0
- package/artifacts/contracts/experiment/inheritance/A.sol/AShared.json +42 -0
- package/artifacts/contracts/experiment/inheritance/B.sol/B.dbg.json +4 -0
- package/artifacts/contracts/experiment/inheritance/B.sol/B.json +76 -0
- package/artifacts/contracts/experiment/inheritance/C.sol/C.dbg.json +4 -0
- package/artifacts/contracts/experiment/inheritance/C.sol/C.json +89 -0
- package/artifacts/contracts/experiment/inheritance/IA.sol/IA.dbg.json +4 -0
- package/artifacts/contracts/experiment/inheritance/IA.sol/IA.json +128 -0
- package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.dbg.json +4 -0
- package/artifacts/contracts/experiment/inheritance/IA.sol/ISharedA.json +37 -0
- package/artifacts/contracts/experiment/inheritance/IB.sol/IB.dbg.json +4 -0
- package/artifacts/contracts/experiment/inheritance/IB.sol/IB.json +50 -0
- package/artifacts/contracts/experiment/inheritance/IC.sol/IC.dbg.json +4 -0
- package/artifacts/contracts/experiment/inheritance/IC.sol/IC.json +63 -0
- package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.dbg.json +4 -0
- package/artifacts/contracts/experiment/types/TypeA.sol/TypeALib.json +10 -0
- package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.dbg.json +4 -0
- package/artifacts/contracts/experiment/types/TypeB.sol/TypeBLib.json +10 -0
- package/artifacts/contracts/instance/IInstance.sol/IInstance.dbg.json +4 -0
- package/artifacts/contracts/instance/IInstance.sol/IInstance.json +892 -0
- package/artifacts/contracts/instance/Instance.sol/Instance.dbg.json +4 -0
- package/artifacts/contracts/instance/Instance.sol/Instance.json +1067 -0
- package/artifacts/contracts/instance/access/Access.sol/AccessModule.dbg.json +4 -0
- package/artifacts/contracts/instance/access/Access.sol/AccessModule.json +400 -0
- package/artifacts/contracts/instance/access/IAccess.sol/IAccess.dbg.json +4 -0
- package/artifacts/contracts/instance/access/IAccess.sol/IAccess.json +10 -0
- package/artifacts/contracts/instance/access/IAccess.sol/IAccessCheckRole.dbg.json +4 -0
- package/artifacts/contracts/instance/access/IAccess.sol/IAccessCheckRole.json +35 -0
- package/artifacts/contracts/instance/access/IAccess.sol/IAccessComponentTypeRoles.dbg.json +4 -0
- package/artifacts/contracts/instance/access/IAccess.sol/IAccessComponentTypeRoles.json +50 -0
- package/artifacts/contracts/instance/access/IAccess.sol/IAccessModule.dbg.json +4 -0
- package/artifacts/contracts/instance/access/IAccess.sol/IAccessModule.json +336 -0
- package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentModule.dbg.json +4 -0
- package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentModule.json +327 -0
- package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentOwnerService.dbg.json +4 -0
- package/artifacts/contracts/instance/component/ComponentModule.sol/ComponentOwnerService.json +147 -0
- package/artifacts/contracts/instance/component/IComponent.sol/IComponent.dbg.json +4 -0
- package/artifacts/contracts/instance/component/IComponent.sol/IComponent.json +10 -0
- package/artifacts/contracts/instance/component/IComponent.sol/IComponentContract.dbg.json +4 -0
- package/artifacts/contracts/instance/component/IComponent.sol/IComponentContract.json +179 -0
- package/artifacts/contracts/instance/component/IComponent.sol/IComponentModule.dbg.json +4 -0
- package/artifacts/contracts/instance/component/IComponent.sol/IComponentModule.json +245 -0
- package/artifacts/contracts/instance/component/IComponent.sol/IComponentOwnerService.dbg.json +4 -0
- package/artifacts/contracts/instance/component/IComponent.sol/IComponentOwnerService.json +94 -0
- package/artifacts/contracts/instance/component/IComponent.sol/IInstanceLinked.dbg.json +4 -0
- package/artifacts/contracts/instance/component/IComponent.sol/IInstanceLinked.json +24 -0
- package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicy.dbg.json +4 -0
- package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicy.json +10 -0
- package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicyModule.dbg.json +4 -0
- package/artifacts/contracts/instance/policy/IPolicy.sol/IPolicyModule.json +231 -0
- package/artifacts/contracts/instance/policy/PolicyModule.sol/PolicyModule.dbg.json +4 -0
- package/artifacts/contracts/instance/policy/PolicyModule.sol/PolicyModule.json +231 -0
- package/artifacts/contracts/instance/pool/IPoolModule.sol/IPool.dbg.json +4 -0
- package/artifacts/contracts/instance/pool/IPoolModule.sol/IPool.json +10 -0
- package/artifacts/contracts/instance/pool/IPoolModule.sol/IPoolModule.dbg.json +4 -0
- package/artifacts/contracts/instance/pool/IPoolModule.sol/IPoolModule.json +149 -0
- package/artifacts/contracts/instance/pool/PoolModule.sol/PoolModule.dbg.json +4 -0
- package/artifacts/contracts/instance/pool/PoolModule.sol/PoolModule.json +162 -0
- package/artifacts/contracts/instance/product/IProductService.sol/IProductModule.dbg.json +4 -0
- package/artifacts/contracts/instance/product/IProductService.sol/IProductModule.json +75 -0
- package/artifacts/contracts/instance/product/IProductService.sol/IProductService.dbg.json +4 -0
- package/artifacts/contracts/instance/product/IProductService.sol/IProductService.json +114 -0
- package/artifacts/contracts/instance/product/ProductService.sol/ProductModule.dbg.json +4 -0
- package/artifacts/contracts/instance/product/ProductService.sol/ProductModule.json +75 -0
- package/artifacts/contracts/instance/product/ProductService.sol/ProductService.dbg.json +4 -0
- package/artifacts/contracts/instance/product/ProductService.sol/ProductService.json +167 -0
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.dbg.json +4 -0
- package/artifacts/contracts/registry/ChainNft.sol/ChainNft.json +534 -0
- package/artifacts/contracts/registry/IChainNft.sol/IChainNft.dbg.json +4 -0
- package/artifacts/contracts/registry/IChainNft.sol/IChainNft.json +452 -0
- package/artifacts/contracts/registry/IRegistry.sol/IOwnable.dbg.json +4 -0
- package/artifacts/contracts/registry/IRegistry.sol/IOwnable.json +24 -0
- package/artifacts/contracts/registry/IRegistry.sol/IRegisterable.dbg.json +4 -0
- package/artifacts/contracts/registry/IRegistry.sol/IRegisterable.json +166 -0
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.dbg.json +4 -0
- package/artifacts/contracts/registry/IRegistry.sol/IRegistry.json +279 -0
- package/artifacts/contracts/registry/IRegistry.sol/IRegistryLinked.dbg.json +4 -0
- package/artifacts/contracts/registry/IRegistry.sol/IRegistryLinked.json +49 -0
- package/artifacts/contracts/registry/Registry.sol/Registerable.dbg.json +4 -0
- package/artifacts/contracts/registry/Registry.sol/Registerable.json +166 -0
- package/artifacts/contracts/registry/Registry.sol/Registry.dbg.json +4 -0
- package/artifacts/contracts/registry/Registry.sol/Registry.json +347 -0
- package/artifacts/contracts/registry/Registry.sol/RegistryLinked.dbg.json +4 -0
- package/artifacts/contracts/registry/Registry.sol/RegistryLinked.json +60 -0
- package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.dbg.json +4 -0
- package/artifacts/contracts/types/Blocknumber.sol/BlocknumberLib.json +174 -0
- package/artifacts/contracts/types/ChainId.sol/ChainIdLib.dbg.json +4 -0
- package/artifacts/contracts/types/ChainId.sol/ChainIdLib.json +10 -0
- package/artifacts/contracts/types/NftId.sol/NftIdLib.dbg.json +4 -0
- package/artifacts/contracts/types/NftId.sol/NftIdLib.json +92 -0
- package/artifacts/contracts/types/Timestamp.sol/TimestampLib.dbg.json +4 -0
- package/artifacts/contracts/types/Timestamp.sol/TimestampLib.json +174 -0
- package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.dbg.json +4 -0
- package/artifacts/contracts/types/UFixed.sol/UFixedMathLib.json +453 -0
- package/contracts/components/Component.sol +62 -0
- package/contracts/components/IPool.sol +9 -0
- package/contracts/components/IProduct.sol +12 -0
- package/contracts/components/Pool.sol +29 -0
- package/contracts/components/Product.sol +66 -0
- package/contracts/experiment/errors/Require.sol +33 -0
- package/contracts/experiment/errors/Revert.sol +39 -0
- package/contracts/experiment/inheritance/A.sol +56 -0
- package/contracts/experiment/inheritance/B.sol +23 -0
- package/contracts/experiment/inheritance/C.sol +28 -0
- package/contracts/experiment/inheritance/IA.sol +18 -0
- package/contracts/experiment/inheritance/IB.sol +9 -0
- package/contracts/experiment/inheritance/IC.sol +11 -0
- package/contracts/experiment/types/TypeA.sol +42 -0
- package/contracts/experiment/types/TypeB.sol +24 -0
- package/contracts/instance/IInstance.sol +20 -0
- package/contracts/instance/Instance.sol +64 -0
- package/contracts/instance/access/Access.sol +218 -0
- package/contracts/instance/access/IAccess.sol +83 -0
- package/contracts/instance/component/ComponentModule.sol +248 -0
- package/contracts/instance/component/IComponent.sol +95 -0
- package/contracts/instance/policy/IPolicy.sol +66 -0
- package/contracts/instance/policy/PolicyModule.sol +107 -0
- package/contracts/instance/pool/IPoolModule.sol +41 -0
- package/contracts/instance/pool/PoolModule.sol +86 -0
- package/contracts/instance/product/IProductService.sol +46 -0
- package/contracts/instance/product/ProductService.sol +108 -0
- package/contracts/registry/ChainNft.sol +173 -0
- package/contracts/registry/IChainNft.sol +18 -0
- package/contracts/registry/IRegistry.sol +70 -0
- package/contracts/registry/Registry.sol +182 -0
- package/contracts/types/Blocknumber.sol +60 -0
- package/contracts/types/ChainId.sol +30 -0
- package/contracts/types/NftId.sol +35 -0
- package/contracts/types/Timestamp.sol +55 -0
- package/contracts/types/UFixed.sol +211 -0
- package/package.json +6 -6
- package/artifacts/contracts/Dip.sol/DIP.dbg.json +0 -4
- package/artifacts/contracts/Dip.sol/DIP.json +0 -338
- package/artifacts/contracts/Lock.sol/Lock.dbg.json +0 -4
- package/artifacts/contracts/Lock.sol/Lock.json +0 -74
- package/contracts/Dip.sol +0 -26
- package/contracts/Lock.sol +0 -34
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"_format": "hh-sol-artifact-1",
|
|
3
|
-
"contractName": "Lock",
|
|
4
|
-
"sourceName": "contracts/Lock.sol",
|
|
5
|
-
"abi": [
|
|
6
|
-
{
|
|
7
|
-
"inputs": [
|
|
8
|
-
{
|
|
9
|
-
"internalType": "uint256",
|
|
10
|
-
"name": "_unlockTime",
|
|
11
|
-
"type": "uint256"
|
|
12
|
-
}
|
|
13
|
-
],
|
|
14
|
-
"stateMutability": "payable",
|
|
15
|
-
"type": "constructor"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"anonymous": false,
|
|
19
|
-
"inputs": [
|
|
20
|
-
{
|
|
21
|
-
"indexed": false,
|
|
22
|
-
"internalType": "uint256",
|
|
23
|
-
"name": "amount",
|
|
24
|
-
"type": "uint256"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"indexed": false,
|
|
28
|
-
"internalType": "uint256",
|
|
29
|
-
"name": "when",
|
|
30
|
-
"type": "uint256"
|
|
31
|
-
}
|
|
32
|
-
],
|
|
33
|
-
"name": "Withdrawal",
|
|
34
|
-
"type": "event"
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"inputs": [],
|
|
38
|
-
"name": "owner",
|
|
39
|
-
"outputs": [
|
|
40
|
-
{
|
|
41
|
-
"internalType": "address payable",
|
|
42
|
-
"name": "",
|
|
43
|
-
"type": "address"
|
|
44
|
-
}
|
|
45
|
-
],
|
|
46
|
-
"stateMutability": "view",
|
|
47
|
-
"type": "function"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"inputs": [],
|
|
51
|
-
"name": "unlockTime",
|
|
52
|
-
"outputs": [
|
|
53
|
-
{
|
|
54
|
-
"internalType": "uint256",
|
|
55
|
-
"name": "",
|
|
56
|
-
"type": "uint256"
|
|
57
|
-
}
|
|
58
|
-
],
|
|
59
|
-
"stateMutability": "view",
|
|
60
|
-
"type": "function"
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
"inputs": [],
|
|
64
|
-
"name": "withdraw",
|
|
65
|
-
"outputs": [],
|
|
66
|
-
"stateMutability": "nonpayable",
|
|
67
|
-
"type": "function"
|
|
68
|
-
}
|
|
69
|
-
],
|
|
70
|
-
"bytecode": "0x60806040526040516105d83803806105d8833981810160405281019061002591906100f0565b804210610067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161005e906101a0565b60405180910390fd5b8060008190555033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550506101c0565b600080fd5b6000819050919050565b6100cd816100ba565b81146100d857600080fd5b50565b6000815190506100ea816100c4565b92915050565b600060208284031215610106576101056100b5565b5b6000610114848285016100db565b91505092915050565b600082825260208201905092915050565b7f556e6c6f636b2074696d652073686f756c6420626520696e207468652066757460008201527f7572650000000000000000000000000000000000000000000000000000000000602082015250565b600061018a60238361011d565b91506101958261012e565b604082019050919050565b600060208201905081810360008301526101b98161017d565b9050919050565b610409806101cf6000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c8063251c1aa3146100465780633ccfd60b146100645780638da5cb5b1461006e575b600080fd5b61004e61008c565b60405161005b919061024a565b60405180910390f35b61006c610092565b005b61007661020b565b60405161008391906102a6565b60405180910390f35b60005481565b6000544210156100d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100ce9061031e565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610167576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161015e9061038a565b60405180910390fd5b7fbf2ed60bd5b5965d685680c01195c9514e4382e28e3a5a2d2d5244bf59411b9347426040516101989291906103aa565b60405180910390a1600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610208573d6000803e3d6000fd5b50565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000819050919050565b61024481610231565b82525050565b600060208201905061025f600083018461023b565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061029082610265565b9050919050565b6102a081610285565b82525050565b60006020820190506102bb6000830184610297565b92915050565b600082825260208201905092915050565b7f596f752063616e27742077697468647261772079657400000000000000000000600082015250565b60006103086016836102c1565b9150610313826102d2565b602082019050919050565b60006020820190508181036000830152610337816102fb565b9050919050565b7f596f75206172656e277420746865206f776e6572000000000000000000000000600082015250565b60006103746014836102c1565b915061037f8261033e565b602082019050919050565b600060208201905081810360008301526103a381610367565b9050919050565b60006040820190506103bf600083018561023b565b6103cc602083018461023b565b939250505056fea2646970667358221220b9af3dffdf9349137e6b0082cb0c40dcd6a29633bba553cca3235766b0f3bcad64736f6c63430008140033",
|
|
71
|
-
"deployedBytecode": "0x608060405234801561001057600080fd5b50600436106100415760003560e01c8063251c1aa3146100465780633ccfd60b146100645780638da5cb5b1461006e575b600080fd5b61004e61008c565b60405161005b919061024a565b60405180910390f35b61006c610092565b005b61007661020b565b60405161008391906102a6565b60405180910390f35b60005481565b6000544210156100d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016100ce9061031e565b60405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610167576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161015e9061038a565b60405180910390fd5b7fbf2ed60bd5b5965d685680c01195c9514e4382e28e3a5a2d2d5244bf59411b9347426040516101989291906103aa565b60405180910390a1600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610208573d6000803e3d6000fd5b50565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000819050919050565b61024481610231565b82525050565b600060208201905061025f600083018461023b565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061029082610265565b9050919050565b6102a081610285565b82525050565b60006020820190506102bb6000830184610297565b92915050565b600082825260208201905092915050565b7f596f752063616e27742077697468647261772079657400000000000000000000600082015250565b60006103086016836102c1565b9150610313826102d2565b602082019050919050565b60006020820190508181036000830152610337816102fb565b9050919050565b7f596f75206172656e277420746865206f776e6572000000000000000000000000600082015250565b60006103746014836102c1565b915061037f8261033e565b602082019050919050565b600060208201905081810360008301526103a381610367565b9050919050565b60006040820190506103bf600083018561023b565b6103cc602083018461023b565b939250505056fea2646970667358221220b9af3dffdf9349137e6b0082cb0c40dcd6a29633bba553cca3235766b0f3bcad64736f6c63430008140033",
|
|
72
|
-
"linkReferences": {},
|
|
73
|
-
"deployedLinkReferences": {}
|
|
74
|
-
}
|
package/contracts/Dip.sol
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
-
pragma solidity ^0.8.20;
|
|
3
|
-
|
|
4
|
-
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
|
|
5
|
-
|
|
6
|
-
contract DIP is ERC20 {
|
|
7
|
-
|
|
8
|
-
// https://etherscan.io/token/0xc719d010b63e5bbf2c0551872cd5316ed26acd83#readContract
|
|
9
|
-
string public constant NAME = "Decentralized Insurance Protocol - DUMMY";
|
|
10
|
-
string public constant SYMBOL = "DIP";
|
|
11
|
-
uint8 public constant DECIMALS = 18;
|
|
12
|
-
uint256 public constant INITIAL_SUPPLY = 10**9 * 10**DECIMALS; // 1 Billion 1'000'000'000
|
|
13
|
-
// decimals == 18 (openzeppelin erc20 default)
|
|
14
|
-
constructor()
|
|
15
|
-
ERC20(NAME, SYMBOL)
|
|
16
|
-
{
|
|
17
|
-
_mint(
|
|
18
|
-
_msgSender(),
|
|
19
|
-
INITIAL_SUPPLY
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function decimals() public pure override returns(uint8) {
|
|
24
|
-
return DECIMALS;
|
|
25
|
-
}
|
|
26
|
-
}
|
package/contracts/Lock.sol
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: UNLICENSED
|
|
2
|
-
pragma solidity ^0.8.20;
|
|
3
|
-
|
|
4
|
-
// Uncomment this line to use console.log
|
|
5
|
-
// import "hardhat/console.sol";
|
|
6
|
-
|
|
7
|
-
contract Lock {
|
|
8
|
-
uint public unlockTime;
|
|
9
|
-
address payable public owner;
|
|
10
|
-
|
|
11
|
-
event Withdrawal(uint amount, uint when);
|
|
12
|
-
|
|
13
|
-
constructor(uint _unlockTime) payable {
|
|
14
|
-
require(
|
|
15
|
-
block.timestamp < _unlockTime,
|
|
16
|
-
"Unlock time should be in the future"
|
|
17
|
-
);
|
|
18
|
-
|
|
19
|
-
unlockTime = _unlockTime;
|
|
20
|
-
owner = payable(msg.sender);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
function withdraw() public {
|
|
24
|
-
// Uncomment this line, and the import of "hardhat/console.sol", to print a log in your terminal
|
|
25
|
-
// console.log("Unlock time is %o and block timestamp is %o", unlockTime, block.timestamp);
|
|
26
|
-
|
|
27
|
-
require(block.timestamp >= unlockTime, "You can't withdraw yet");
|
|
28
|
-
require(msg.sender == owner, "You aren't the owner");
|
|
29
|
-
|
|
30
|
-
emit Withdrawal(address(this).balance, block.timestamp);
|
|
31
|
-
|
|
32
|
-
owner.transfer(address(this).balance);
|
|
33
|
-
}
|
|
34
|
-
}
|