perf: smart Contract Performance Improvement

This commit is contained in:
PedroCailleret
2022-11-23 19:46:29 -03:00
parent b1fe0a574c
commit 856da07def
90 changed files with 3859 additions and 3970 deletions

View File

@@ -1,4 +0,0 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/dbb5a55867d7e81ad1b5b45703a00001.json"
}

View File

@@ -1,4 +0,0 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../../build-info/dbb5a55867d7e81ad1b5b45703a00001.json"
}

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +0,0 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../../build-info/dbb5a55867d7e81ad1b5b45703a00001.json"
}

View File

@@ -1,194 +0,0 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "IERC20",
"sourceName": "contracts/@openzeppelin/contracts/token/ERC20/IERC20.sol",
"abi": [
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
}
],
"bytecode": "0x",
"deployedBytecode": "0x",
"linkReferences": {},
"deployedLinkReferences": {}
}

View File

@@ -1,4 +0,0 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../../../build-info/dbb5a55867d7e81ad1b5b45703a00001.json"
}

View File

@@ -1,4 +0,0 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/dbb5a55867d7e81ad1b5b45703a00001.json"
}

View File

@@ -1,10 +0,0 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "Context",
"sourceName": "contracts/@openzeppelin/contracts/utils/Context.sol",
"abi": [],
"bytecode": "0x",
"deployedBytecode": "0x",
"linkReferences": {},
"deployedLinkReferences": {}
}

View File

@@ -1,4 +0,0 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../../build-info/dbb5a55867d7e81ad1b5b45703a00001.json"
}

View File

@@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../build-info/6c9bcd31e56d59a208be7520d57707e6.json"
}

View File

@@ -0,0 +1,10 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "DataTypes",
"sourceName": "contracts/DataTypes.sol",
"abi": [],
"bytecode": "0x602d6037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea164736f6c6343000809000a",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea164736f6c6343000809000a",
"linkReferences": {},
"deployedLinkReferences": {}
}

View File

@@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../build-info/6c9bcd31e56d59a208be7520d57707e6.json"
}

View File

@@ -0,0 +1,225 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "EventAndErrors",
"sourceName": "contracts/EventAndErrors.sol",
"abi": [
{
"inputs": [],
"name": "AlreadyReleased",
"type": "error"
},
{
"inputs": [],
"name": "DepositAlreadyExists",
"type": "error"
},
{
"inputs": [],
"name": "InvalidDeposit",
"type": "error"
},
{
"inputs": [],
"name": "InvalidSigner",
"type": "error"
},
{
"inputs": [],
"name": "LoopOverflow",
"type": "error"
},
{
"inputs": [],
"name": "NotEnoughTokens",
"type": "error"
},
{
"inputs": [],
"name": "NotExpired",
"type": "error"
},
{
"inputs": [],
"name": "OnlySeller",
"type": "error"
},
{
"inputs": [],
"name": "TxAlreadyUsed",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "seller",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "depositID",
"type": "uint256"
},
{
"indexed": false,
"internalType": "address",
"name": "token",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "premium",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "DepositAdded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "seller",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "depositID",
"type": "uint256"
}
],
"name": "DepositClosed",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "seller",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "depositID",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "DepositWithdrawn",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "buyer",
"type": "address"
},
{
"indexed": true,
"internalType": "bytes32",
"name": "lockID",
"type": "bytes32"
},
{
"indexed": false,
"internalType": "uint256",
"name": "depositID",
"type": "uint256"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "LockAdded",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "buyer",
"type": "address"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "lockId",
"type": "bytes32"
}
],
"name": "LockReleased",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "buyer",
"type": "address"
},
{
"indexed": false,
"internalType": "bytes32",
"name": "lockId",
"type": "bytes32"
}
],
"name": "LockReturned",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": false,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "amount",
"type": "uint256"
}
],
"name": "PremiumsWithdrawn",
"type": "event"
}
],
"bytecode": "0x",
"deployedBytecode": "0x",
"linkReferences": {},
"deployedLinkReferences": {}
}

View File

@@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../build-info/6c9bcd31e56d59a208be7520d57707e6.json"
}

View File

@@ -1,7 +1,7 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "Ownable",
"sourceName": "contracts/@openzeppelin/contracts/access/Ownable.sol",
"contractName": "Owned",
"sourceName": "contracts/lib/auth/Owned.sol",
"abi": [
{
"anonymous": false,
@@ -9,7 +9,7 @@
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"name": "user",
"type": "address"
},
{
@@ -19,7 +19,7 @@
"type": "address"
}
],
"name": "OwnershipTransferred",
"name": "OwnerUpdated",
"type": "event"
},
{
@@ -35,13 +35,6 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
@@ -50,7 +43,7 @@
"type": "address"
}
],
"name": "transferOwnership",
"name": "setOwner",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"

View File

@@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../build-info/6c9bcd31e56d59a208be7520d57707e6.json"
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../build-info/6c9bcd31e56d59a208be7520d57707e6.json"
}

View File

@@ -1,7 +1,7 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "IERC20Metadata",
"sourceName": "contracts/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol",
"contractName": "ERC20",
"sourceName": "contracts/lib/tokens/ERC20.sol",
"abi": [
{
"anonymous": false,
@@ -21,7 +21,7 @@
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"name": "amount",
"type": "uint256"
}
],
@@ -46,23 +46,36 @@
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"name": "amount",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"inputs": [],
"name": "DOMAIN_SEPARATOR",
"outputs": [
{
"internalType": "bytes32",
"name": "",
"type": "bytes32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"name": "",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"name": "",
"type": "address"
}
],
@@ -105,7 +118,7 @@
"inputs": [
{
"internalType": "address",
"name": "account",
"name": "",
"type": "address"
}
],
@@ -146,6 +159,68 @@
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"name": "nonces",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "deadline",
"type": "uint256"
},
{
"internalType": "uint8",
"name": "v",
"type": "uint8"
},
{
"internalType": "bytes32",
"name": "r",
"type": "bytes32"
},
{
"internalType": "bytes32",
"name": "s",
"type": "bytes32"
}
],
"name": "permit",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "symbol",

View File

@@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../build-info/6c9bcd31e56d59a208be7520d57707e6.json"
}

View File

@@ -1,8 +1,14 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "Counters",
"sourceName": "contracts/@openzeppelin/contracts/utils/Counters.sol",
"abi": [],
"sourceName": "contracts/lib/utils/Counters.sol",
"abi": [
{
"inputs": [],
"name": "DecOverflow",
"type": "error"
}
],
"bytecode": "0x602d6037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea164736f6c6343000809000a",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea164736f6c6343000809000a",
"linkReferences": {},

View File

@@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../build-info/6c9bcd31e56d59a208be7520d57707e6.json"
}

View File

@@ -0,0 +1,16 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "ReentrancyGuard",
"sourceName": "contracts/lib/utils/ReentrancyGuard.sol",
"abi": [
{
"inputs": [],
"name": "Reentrancy",
"type": "error"
}
],
"bytecode": "0x",
"deployedBytecode": "0x",
"linkReferences": {},
"deployedLinkReferences": {}
}

View File

@@ -0,0 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../../../build-info/6c9bcd31e56d59a208be7520d57707e6.json"
}

View File

@@ -0,0 +1,10 @@
{
"_format": "hh-sol-artifact-1",
"contractName": "SafeTransferLib",
"sourceName": "contracts/lib/utils/SafeTransferLib.sol",
"abi": [],
"bytecode": "0x602d6037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea164736f6c6343000809000a",
"deployedBytecode": "0x73000000000000000000000000000000000000000030146080604052600080fdfea164736f6c6343000809000a",
"linkReferences": {},
"deployedLinkReferences": {}
}

View File

@@ -1,4 +0,0 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../build-info/dbb5a55867d7e81ad1b5b45703a00001.json"
}

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +1,4 @@
{
"_format": "hh-sol-dbg-1",
"buildInfo": "../../build-info/dbb5a55867d7e81ad1b5b45703a00001.json"
"buildInfo": "../../build-info/6c9bcd31e56d59a208be7520d57707e6.json"
}

File diff suppressed because one or more lines are too long