diff --git a/.openzeppelin/unknown-80002.json b/.openzeppelin/unknown-80002.json index b18ee26b..f6f67961 100644 --- a/.openzeppelin/unknown-80002.json +++ b/.openzeppelin/unknown-80002.json @@ -34,6 +34,11 @@ "address": "0x002380ccAFf852dEF50a176873d50f8019e36FBc", "txHash": "0xc530695371ce1f4985c031395866be67a62d77a8323eec2060747237457dac1b", "kind": "transparent" + }, + { + "address": "0x4FF860525ccb6E992E0A4579860465f7EF581aed", + "txHash": "0x4b0c26448dd2540d194cc9063cd3c686e6074ad2dd33a4e81c98fcd06ca18a2e", + "kind": "transparent" } ], "impls": { @@ -877,6 +882,197 @@ } } } + }, + "5a1f4dab6be8f98f6f0d9a9a4e6c21cdd622ca951751693706bdf3e89d48e45a": { + "address": "0x5F5462Fc1C298ccB65dB5338f9aE90ce24Eec9d6", + "txHash": "0xafb0286413508e5f9dc387d749c739f9eda31cf3c67286f7df8022cd8b631db3", + "layout": { + "solcVersion": "0.8.24", + "storage": [ + { + "label": "_initialized", + "offset": 0, + "slot": "0", + "type": "t_uint8", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:62", + "retypedFrom": "bool" + }, + { + "label": "_initializing", + "offset": 1, + "slot": "0", + "type": "t_bool", + "contract": "Initializable", + "src": "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol:67" + }, + { + "label": "__gap", + "offset": 0, + "slot": "1", + "type": "t_array(t_uint256)50_storage", + "contract": "ContextUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol:36" + }, + { + "label": "_status", + "offset": 0, + "slot": "51", + "type": "t_uint256", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:38" + }, + { + "label": "__gap", + "offset": 0, + "slot": "52", + "type": "t_array(t_uint256)49_storage", + "contract": "ReentrancyGuardUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol:74" + }, + { + "label": "__gap", + "offset": 0, + "slot": "101", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC2771RegistryContext", + "src": "contracts/metatx/ERC2771RegistryContext.sol:89" + }, + { + "label": "_owner", + "offset": 0, + "slot": "151", + "type": "t_address", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:22" + }, + { + "label": "__gap", + "offset": 0, + "slot": "152", + "type": "t_array(t_uint256)49_storage", + "contract": "OwnableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol:94" + }, + { + "label": "__gap", + "offset": 0, + "slot": "201", + "type": "t_array(t_uint256)50_storage", + "contract": "ERC165Upgradeable", + "src": "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol:41" + }, + { + "label": "_roles", + "offset": 0, + "slot": "251", + "type": "t_mapping(t_bytes32,t_struct(RoleData)12512_storage)", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:61" + }, + { + "label": "__gap", + "offset": 0, + "slot": "252", + "type": "t_array(t_uint256)49_storage", + "contract": "AccessControlUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol:259" + }, + { + "label": "_paused", + "offset": 0, + "slot": "301", + "type": "t_bool", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:29" + }, + { + "label": "__gap", + "offset": 0, + "slot": "302", + "type": "t_array(t_uint256)49_storage", + "contract": "PausableUpgradeable", + "src": "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol:116" + }, + { + "label": "_seaport", + "offset": 0, + "slot": "351", + "type": "t_contract(ConsiderationInterface)52028", + "contract": "SeaportProxyBuyer", + "src": "contracts/marketplace/SeaportProxyBuyer.sol:31" + }, + { + "label": "__gap", + "offset": 0, + "slot": "352", + "type": "t_array(t_uint256)50_storage", + "contract": "SeaportProxyBuyer", + "src": "contracts/marketplace/SeaportProxyBuyer.sol:121" + } + ], + "types": { + "t_address": { + "label": "address", + "numberOfBytes": "20" + }, + "t_array(t_uint256)49_storage": { + "label": "uint256[49]", + "numberOfBytes": "1568" + }, + "t_array(t_uint256)50_storage": { + "label": "uint256[50]", + "numberOfBytes": "1600" + }, + "t_bool": { + "label": "bool", + "numberOfBytes": "1" + }, + "t_bytes32": { + "label": "bytes32", + "numberOfBytes": "32" + }, + "t_contract(ConsiderationInterface)52028": { + "label": "contract ConsiderationInterface", + "numberOfBytes": "20" + }, + "t_mapping(t_address,t_bool)": { + "label": "mapping(address => bool)", + "numberOfBytes": "32" + }, + "t_mapping(t_bytes32,t_struct(RoleData)12512_storage)": { + "label": "mapping(bytes32 => struct AccessControlUpgradeable.RoleData)", + "numberOfBytes": "32" + }, + "t_struct(RoleData)12512_storage": { + "label": "struct AccessControlUpgradeable.RoleData", + "members": [ + { + "label": "members", + "type": "t_mapping(t_address,t_bool)", + "offset": 0, + "slot": "0" + }, + { + "label": "adminRole", + "type": "t_bytes32", + "offset": 0, + "slot": "1" + } + ], + "numberOfBytes": "64" + }, + "t_uint256": { + "label": "uint256", + "numberOfBytes": "32" + }, + "t_uint8": { + "label": "uint8", + "numberOfBytes": "1" + } + }, + "namespaces": {} + } } } } diff --git a/CHANGELOG.md b/CHANGELOG.md index 196095da..ad730d41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## v0.9.18 + +- Deploy `SeaportProxyBuyer@0.1.0` contract to `Amoy` testnet + ## v0.9.17 - Add minter to `SeaportProxyBuyer` contract in sandbox diff --git a/artifacts/USDC.json b/artifacts/USDC.json index f7c509b1..68cbe375 100644 --- a/artifacts/USDC.json +++ b/artifacts/USDC.json @@ -292,8 +292,8 @@ "type": "function" } ], - "bytecode": "0x608060405234801561000f575f80fd5b506040518060400160405280600981526020016855534443204d6f636b60b81b815250604051806040016040528060048152602001635553444360e01b815250816003908161005e919061010b565b50600461006b828261010b565b5050506101ca565b634e487b7160e01b5f52604160045260245ffd5b600181811c9082168061009b57607f821691505b6020821081036100b957634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561010657805f5260205f20601f840160051c810160208510156100e45750805b601f840160051c820191505b81811015610103575f81556001016100f0565b50505b505050565b81516001600160401b0381111561012457610124610073565b610138816101328454610087565b846100bf565b602080601f83116001811461016b575f84156101545750858301515b5f19600386901b1c1916600185901b1785556101c2565b5f85815260208120601f198616915b828110156101995788860151825594840194600190910190840161017a565b50858210156101b657878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b6108f2806101d75f395ff3fe608060405234801561000f575f80fd5b50600436106100b1575f3560e01c806340c10f191161006e57806340c10f191461013d57806370a082311461015257806395d89b411461017a578063a457c2d714610182578063a9059cbb14610195578063dd62ed3e146101a8575f80fd5b806306fdde03146100b5578063095ea7b3146100d357806318160ddd146100f657806323b872dd14610108578063313ce5671461011b578063395093511461012a575b5f80fd5b6100bd6101bb565b6040516100ca9190610775565b60405180910390f35b6100e66100e13660046107dc565b61024b565b60405190151581526020016100ca565b6002545b6040519081526020016100ca565b6100e6610116366004610804565b610264565b604051601281526020016100ca565b6100e66101383660046107dc565b610287565b61015061014b3660046107dc565b6102a8565b005b6100fa61016036600461083d565b6001600160a01b03165f9081526020819052604090205490565b6100bd6102b6565b6100e66101903660046107dc565b6102c5565b6100e66101a33660046107dc565b610344565b6100fa6101b636600461085d565b610351565b6060600380546101ca9061088e565b80601f01602080910402602001604051908101604052809291908181526020018280546101f69061088e565b80156102415780601f1061021857610100808354040283529160200191610241565b820191905f5260205f20905b81548152906001019060200180831161022457829003601f168201915b5050505050905090565b5f3361025881858561037b565b60019150505b92915050565b5f3361027185828561049e565b61027c858585610516565b506001949350505050565b5f336102588185856102998383610351565b6102a391906108c6565b61037b565b6102b282826106b8565b5050565b6060600480546101ca9061088e565b5f33816102d28286610351565b9050838110156103375760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b61027c828686840361037b565b5f33610258818585610516565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103dd5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161032e565b6001600160a01b03821661043e5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161032e565b6001600160a01b038381165f8181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b5f6104a98484610351565b90505f19811461051057818110156105035760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161032e565b610510848484840361037b565b50505050565b6001600160a01b03831661057a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161032e565b6001600160a01b0382166105dc5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161032e565b6001600160a01b0383165f90815260208190526040902054818110156106535760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161032e565b6001600160a01b038481165f81815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610510565b6001600160a01b03821661070e5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161032e565b8060025f82825461071f91906108c6565b90915550506001600160a01b0382165f81815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b5f602080835283518060208501525f5b818110156107a157858101830151858201604001528201610785565b505f604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b03811681146107d7575f80fd5b919050565b5f80604083850312156107ed575f80fd5b6107f6836107c1565b946020939093013593505050565b5f805f60608486031215610816575f80fd5b61081f846107c1565b925061082d602085016107c1565b9150604084013590509250925092565b5f6020828403121561084d575f80fd5b610856826107c1565b9392505050565b5f806040838503121561086e575f80fd5b610877836107c1565b9150610885602084016107c1565b90509250929050565b600181811c908216806108a257607f821691505b6020821081036108c057634e487b7160e01b5f52602260045260245ffd5b50919050565b8082018082111561025e57634e487b7160e01b5f52601160045260245ffdfea164736f6c6343000818000a", - "deployedBytecode": "0x608060405234801561000f575f80fd5b50600436106100b1575f3560e01c806340c10f191161006e57806340c10f191461013d57806370a082311461015257806395d89b411461017a578063a457c2d714610182578063a9059cbb14610195578063dd62ed3e146101a8575f80fd5b806306fdde03146100b5578063095ea7b3146100d357806318160ddd146100f657806323b872dd14610108578063313ce5671461011b578063395093511461012a575b5f80fd5b6100bd6101bb565b6040516100ca9190610775565b60405180910390f35b6100e66100e13660046107dc565b61024b565b60405190151581526020016100ca565b6002545b6040519081526020016100ca565b6100e6610116366004610804565b610264565b604051601281526020016100ca565b6100e66101383660046107dc565b610287565b61015061014b3660046107dc565b6102a8565b005b6100fa61016036600461083d565b6001600160a01b03165f9081526020819052604090205490565b6100bd6102b6565b6100e66101903660046107dc565b6102c5565b6100e66101a33660046107dc565b610344565b6100fa6101b636600461085d565b610351565b6060600380546101ca9061088e565b80601f01602080910402602001604051908101604052809291908181526020018280546101f69061088e565b80156102415780601f1061021857610100808354040283529160200191610241565b820191905f5260205f20905b81548152906001019060200180831161022457829003601f168201915b5050505050905090565b5f3361025881858561037b565b60019150505b92915050565b5f3361027185828561049e565b61027c858585610516565b506001949350505050565b5f336102588185856102998383610351565b6102a391906108c6565b61037b565b6102b282826106b8565b5050565b6060600480546101ca9061088e565b5f33816102d28286610351565b9050838110156103375760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b61027c828686840361037b565b5f33610258818585610516565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103dd5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161032e565b6001600160a01b03821661043e5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161032e565b6001600160a01b038381165f8181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b5f6104a98484610351565b90505f19811461051057818110156105035760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161032e565b610510848484840361037b565b50505050565b6001600160a01b03831661057a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161032e565b6001600160a01b0382166105dc5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161032e565b6001600160a01b0383165f90815260208190526040902054818110156106535760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161032e565b6001600160a01b038481165f81815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610510565b6001600160a01b03821661070e5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161032e565b8060025f82825461071f91906108c6565b90915550506001600160a01b0382165f81815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b5f602080835283518060208501525f5b818110156107a157858101830151858201604001528201610785565b505f604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b03811681146107d7575f80fd5b919050565b5f80604083850312156107ed575f80fd5b6107f6836107c1565b946020939093013593505050565b5f805f60608486031215610816575f80fd5b61081f846107c1565b925061082d602085016107c1565b9150604084013590509250925092565b5f6020828403121561084d575f80fd5b610856826107c1565b9392505050565b5f806040838503121561086e575f80fd5b610877836107c1565b9150610885602084016107c1565b90509250929050565b600181811c908216806108a257607f821691505b6020821081036108c057634e487b7160e01b5f52602260045260245ffd5b50919050565b8082018082111561025e57634e487b7160e01b5f52601160045260245ffdfea164736f6c6343000818000a", + "bytecode": "0x608060405234801561000f575f80fd5b506040518060400160405280600981526020016855534443204d6f636b60b81b815250604051806040016040528060048152602001635553444360e01b815250816003908161005e919061010b565b50600461006b828261010b565b5050506101ca565b634e487b7160e01b5f52604160045260245ffd5b600181811c9082168061009b57607f821691505b6020821081036100b957634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561010657805f5260205f20601f840160051c810160208510156100e45750805b601f840160051c820191505b81811015610103575f81556001016100f0565b50505b505050565b81516001600160401b0381111561012457610124610073565b610138816101328454610087565b846100bf565b602080601f83116001811461016b575f84156101545750858301515b5f19600386901b1c1916600185901b1785556101c2565b5f85815260208120601f198616915b828110156101995788860151825594840194600190910190840161017a565b50858210156101b657878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b6108f2806101d75f395ff3fe608060405234801561000f575f80fd5b50600436106100b1575f3560e01c806340c10f191161006e57806340c10f191461013d57806370a082311461015257806395d89b411461017a578063a457c2d714610182578063a9059cbb14610195578063dd62ed3e146101a8575f80fd5b806306fdde03146100b5578063095ea7b3146100d357806318160ddd146100f657806323b872dd14610108578063313ce5671461011b578063395093511461012a575b5f80fd5b6100bd6101bb565b6040516100ca9190610775565b60405180910390f35b6100e66100e13660046107dc565b61024b565b60405190151581526020016100ca565b6002545b6040519081526020016100ca565b6100e6610116366004610804565b610264565b604051600681526020016100ca565b6100e66101383660046107dc565b610287565b61015061014b3660046107dc565b6102a8565b005b6100fa61016036600461083d565b6001600160a01b03165f9081526020819052604090205490565b6100bd6102b6565b6100e66101903660046107dc565b6102c5565b6100e66101a33660046107dc565b610344565b6100fa6101b636600461085d565b610351565b6060600380546101ca9061088e565b80601f01602080910402602001604051908101604052809291908181526020018280546101f69061088e565b80156102415780601f1061021857610100808354040283529160200191610241565b820191905f5260205f20905b81548152906001019060200180831161022457829003601f168201915b5050505050905090565b5f3361025881858561037b565b60019150505b92915050565b5f3361027185828561049e565b61027c858585610516565b506001949350505050565b5f336102588185856102998383610351565b6102a391906108c6565b61037b565b6102b282826106b8565b5050565b6060600480546101ca9061088e565b5f33816102d28286610351565b9050838110156103375760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b61027c828686840361037b565b5f33610258818585610516565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103dd5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161032e565b6001600160a01b03821661043e5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161032e565b6001600160a01b038381165f8181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b5f6104a98484610351565b90505f19811461051057818110156105035760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161032e565b610510848484840361037b565b50505050565b6001600160a01b03831661057a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161032e565b6001600160a01b0382166105dc5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161032e565b6001600160a01b0383165f90815260208190526040902054818110156106535760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161032e565b6001600160a01b038481165f81815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610510565b6001600160a01b03821661070e5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161032e565b8060025f82825461071f91906108c6565b90915550506001600160a01b0382165f81815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b5f602080835283518060208501525f5b818110156107a157858101830151858201604001528201610785565b505f604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b03811681146107d7575f80fd5b919050565b5f80604083850312156107ed575f80fd5b6107f6836107c1565b946020939093013593505050565b5f805f60608486031215610816575f80fd5b61081f846107c1565b925061082d602085016107c1565b9150604084013590509250925092565b5f6020828403121561084d575f80fd5b610856826107c1565b9392505050565b5f806040838503121561086e575f80fd5b610877836107c1565b9150610885602084016107c1565b90509250929050565b600181811c908216806108a257607f821691505b6020821081036108c057634e487b7160e01b5f52602260045260245ffd5b50919050565b8082018082111561025e57634e487b7160e01b5f52601160045260245ffdfea164736f6c6343000818000a", + "deployedBytecode": "0x608060405234801561000f575f80fd5b50600436106100b1575f3560e01c806340c10f191161006e57806340c10f191461013d57806370a082311461015257806395d89b411461017a578063a457c2d714610182578063a9059cbb14610195578063dd62ed3e146101a8575f80fd5b806306fdde03146100b5578063095ea7b3146100d357806318160ddd146100f657806323b872dd14610108578063313ce5671461011b578063395093511461012a575b5f80fd5b6100bd6101bb565b6040516100ca9190610775565b60405180910390f35b6100e66100e13660046107dc565b61024b565b60405190151581526020016100ca565b6002545b6040519081526020016100ca565b6100e6610116366004610804565b610264565b604051600681526020016100ca565b6100e66101383660046107dc565b610287565b61015061014b3660046107dc565b6102a8565b005b6100fa61016036600461083d565b6001600160a01b03165f9081526020819052604090205490565b6100bd6102b6565b6100e66101903660046107dc565b6102c5565b6100e66101a33660046107dc565b610344565b6100fa6101b636600461085d565b610351565b6060600380546101ca9061088e565b80601f01602080910402602001604051908101604052809291908181526020018280546101f69061088e565b80156102415780601f1061021857610100808354040283529160200191610241565b820191905f5260205f20905b81548152906001019060200180831161022457829003601f168201915b5050505050905090565b5f3361025881858561037b565b60019150505b92915050565b5f3361027185828561049e565b61027c858585610516565b506001949350505050565b5f336102588185856102998383610351565b6102a391906108c6565b61037b565b6102b282826106b8565b5050565b6060600480546101ca9061088e565b5f33816102d28286610351565b9050838110156103375760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b61027c828686840361037b565b5f33610258818585610516565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166103dd5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161032e565b6001600160a01b03821661043e5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161032e565b6001600160a01b038381165f8181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b5f6104a98484610351565b90505f19811461051057818110156105035760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161032e565b610510848484840361037b565b50505050565b6001600160a01b03831661057a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161032e565b6001600160a01b0382166105dc5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161032e565b6001600160a01b0383165f90815260208190526040902054818110156106535760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161032e565b6001600160a01b038481165f81815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610510565b6001600160a01b03821661070e5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161032e565b8060025f82825461071f91906108c6565b90915550506001600160a01b0382165f81815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b5f602080835283518060208501525f5b818110156107a157858101830151858201604001528201610785565b505f604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b03811681146107d7575f80fd5b919050565b5f80604083850312156107ed575f80fd5b6107f6836107c1565b946020939093013593505050565b5f805f60608486031215610816575f80fd5b61081f846107c1565b925061082d602085016107c1565b9150604084013590509250925092565b5f6020828403121561084d575f80fd5b610856826107c1565b9392505050565b5f806040838503121561086e575f80fd5b610877836107c1565b9150610885602084016107c1565b90509250929050565b600181811c908216806108a257607f821691505b6020821081036108c057634e487b7160e01b5f52602260045260245ffd5b50919050565b8082018082111561025e57634e487b7160e01b5f52601160045260245ffdfea164736f6c6343000818000a", "linkReferences": {}, "deployedLinkReferences": {} } diff --git a/contracts/mocks/USDC.sol b/contracts/mocks/USDC.sol index 751fbe88..fec67f1a 100644 --- a/contracts/mocks/USDC.sol +++ b/contracts/mocks/USDC.sol @@ -6,6 +6,10 @@ pragma solidity ^0.8.0; import '@openzeppelin/contracts/token/ERC20/ERC20.sol'; contract USDC is ERC20('USDC Mock', 'USDC') { + function decimals() public view virtual override returns (uint8) { + return 6; + } + function mint(address account, uint256 amount) external { _mint(account, amount); } diff --git a/package.json b/package.json index c011dfe6..108fb138 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "uns", - "version": "0.9.17", + "version": "0.9.18", "description": "UNS contracts and tools", "repository": "https://github.com/unstoppabledomains/uns.git", "main": "./dist/index.js", diff --git a/scripts/deploy_SeaportProxyBuyer.ts b/scripts/deploy_SeaportProxyBuyer.ts index 3e16f2e1..28b32e5d 100644 --- a/scripts/deploy_SeaportProxyBuyer.ts +++ b/scripts/deploy_SeaportProxyBuyer.ts @@ -7,7 +7,7 @@ async function main () { console.log('Network:', network.name); const chainId: number = unwrap(network.config, 'chainId'); - if (![137].includes(chainId)) { + if (![137, 80002].includes(chainId)) { throw new Error(`Unsupported network ${chainId}`); } diff --git a/scripts/deploy_USDCMock.ts b/scripts/deploy_USDCMock.ts new file mode 100644 index 00000000..bccfad5b --- /dev/null +++ b/scripts/deploy_USDCMock.ts @@ -0,0 +1,32 @@ +import { network } from 'hardhat'; +import { NameService, getNetworkConfig, mergeNetworkConfig } from '../src/config'; +import { Deployer } from '../src/deployer'; +import { unwrap } from '../src/utils'; + +async function main () { + console.log('Network:', network.name); + + const chainId: number = unwrap(network.config, 'chainId'); + if (![80002].includes(chainId)) { + throw new Error(`Unsupported network ${chainId}`); + } + + const config = getNetworkConfig(chainId, NameService.UNS); + + if (!config) { + throw new Error(`Config not found for network ${chainId}`); + } + + const deployer = await Deployer.create(); + const deployConfig = await deployer.execute(['usdc_mock'], config); + mergeNetworkConfig(deployConfig, NameService.UNS); + + console.log('Deployed!'); +} + +main() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); diff --git a/scripts/fund_SeaportProxyBuyer.ts b/scripts/fund_SeaportProxyBuyer.ts new file mode 100644 index 00000000..5be18359 --- /dev/null +++ b/scripts/fund_SeaportProxyBuyer.ts @@ -0,0 +1,31 @@ +import { network } from 'hardhat'; +import { NameService, getNetworkConfig } from '../src/config'; +import { Deployer } from '../src/deployer'; +import { unwrap } from '../src/utils'; + +async function main () { + console.log('Network:', network.name); + + const chainId: number = unwrap(network.config, 'chainId'); + if (![80002].includes(chainId)) { + throw new Error(`Unsupported network ${chainId}`); + } + + const config = getNetworkConfig(chainId, NameService.UNS); + + if (!config) { + throw new Error(`Config not found for network ${chainId}`); + } + + const deployer = await Deployer.create(); + await deployer.execute(['fund_seaport_proxy_buyer'], config); + + console.log('Funded!'); +} + +main() + .then(() => process.exit(0)) + .catch((error) => { + console.error(error); + process.exit(1); + }); diff --git a/src/tasks.ts b/src/tasks.ts index 1625aaac..0d3e0eb2 100644 --- a/src/tasks.ts +++ b/src/tasks.ts @@ -1,4 +1,4 @@ -import { network, upgrades, ethers, defender } from 'hardhat'; +import { defender, ethers, network, upgrades } from 'hardhat'; import { Contract, keccak256, namehash, parseEther, parseUnits } from 'ethers'; import { merge } from 'lodash'; import { getContractAddress } from '@openzeppelin/hardhat-upgrades/dist/utils'; @@ -7,15 +7,15 @@ import { ENSCustody, MintingManager, ProxyReader, + SeaportProxyBuyer, UNSOperator, UNSRegistry, ZilliqaRecover, - SeaportProxyBuyer, } from '../types'; import { Deployer } from './deployer'; -import { ArtifactName, DependenciesMap, EnsContractName, UnsContractName, NsNetworkConfig } from './types'; +import { ArtifactName, DependenciesMap, EnsContractName, NsNetworkConfig, UnsContractName } from './types'; import verify from './verify'; -import { unwrap, unwrapDependencies, notNullSha } from './utils'; +import { notNullSha, unwrap, unwrapDependencies } from './utils'; import { deployProxy, ensureDeployed, ensureUpgradable } from './helpers'; export type Task = { @@ -26,6 +26,7 @@ export type Task = { }; const isSandbox = network.config.chainId === 1337; +const isTestnet = network.config.chainId === 80002 || network.config.chainId === 11155111; export const deployCNSTask: Task = { tags: ['cns', 'full'], @@ -1093,13 +1094,14 @@ const deployUsdcMockTask: Task = { run: async (ctx: Deployer) => { const { owner } = ctx.accounts; - if (!isSandbox) { - throw new Error('This task is only available for sandbox'); + if (!isSandbox && !isTestnet) { + throw new Error('This task is only available for sandbox or testnet'); } const usdcMock = await ethers.deployContract(ArtifactName.USDC, [], owner); await usdcMock.waitForDeployment(); await ctx.saveContractConfig(UnsContractName.USDC, usdcMock); + await verify(ctx, await usdcMock.getAddress(), [], 'contracts/mocks/USDC.sol:USDC'); }, ensureDependencies: () => ({}), }; @@ -1136,6 +1138,7 @@ const deploySeaportProxyBuyerTask: Task = { seaportProxyBuyerImpl, seaportProxyBuyer, ); + await verify(ctx, seaportProxyBuyerImpl, []); }, ensureDependencies: (ctx: Deployer, config?: NsNetworkConfig): DependenciesMap => { config = merge(ctx.getDeployConfig(), config); @@ -1150,8 +1153,8 @@ const fundSeaportProxyBuyerTask: Task = { run: async (ctx: Deployer, dependencies: DependenciesMap) => { const { owner } = ctx.accounts; - if (!isSandbox) { - throw new Error('This task is only available for sandbox'); + if (!isSandbox && !isTestnet) { + throw new Error('This task is only available for sandbox or testnet'); } const [SeaportProxyBuyer, USDCMock] = unwrapDependencies(dependencies, [ diff --git a/src/verify.ts b/src/verify.ts index e3e8b8eb..89606aeb 100644 --- a/src/verify.ts +++ b/src/verify.ts @@ -1,13 +1,14 @@ import { network, run } from 'hardhat'; import { Deployer } from './deployer'; -export default async (ctx: Deployer, address: string, args: unknown[]) => { +export default async (ctx: Deployer, address: string, args: unknown[], contract?: string) => { try { await run('verify:verify', { address, constructorArguments: args, + contract, }); } catch (err) { - ctx.log('Verification failed', { chainId: network.config.chainId, address, args }); + ctx.log('Verification failed', { chainId: network.config.chainId, address, args, err }); } }; diff --git a/uns-config.json b/uns-config.json index bbf5c053..0aa6bbb5 100644 --- a/uns-config.json +++ b/uns-config.json @@ -498,14 +498,14 @@ "deploymentBlock": "0x0" }, "SeaportProxyBuyer": { - "address": "0x0000000000000000000000000000000000000000", - "deploymentBlock": "0x0", - "implementation": "0x0000000000000000000000000000000000000000", - "forwarder": "0x0000000000000000000000000000000000000000" + "address": "0x4FF860525ccb6E992E0A4579860465f7EF581aed", + "deploymentBlock": "0x7c4d06", + "implementation": "0x5F5462Fc1C298ccB65dB5338f9aE90ce24Eec9d6", + "forwarder": "0x4FF860525ccb6E992E0A4579860465f7EF581aed" }, "USDC": { - "address": "0x41E94Eb019C0762f9Bfcf9Fb1E58725BfB0e7582", - "deploymentBlock": "0x0" + "address": "0x6694CfD96d7fD80041062895B49f768081CA96f2", + "deploymentBlock": "0x7c62a5" } } },