Skip to content

Commit 89e63f9

Browse files
committed
Update contracts. Add RewardLocker. Simplify assets
1 parent 3ea3f24 commit 89e63f9

File tree

1,026 files changed

+19736
-8417
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,026 files changed

+19736
-8417
lines changed

packages/thirdweb/scripts/generate/abis/assets/AssetEntrypointERC20.json

Lines changed: 0 additions & 34 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[
2-
"function deployInfraProxyDeterministic(address implementation, bytes data, bytes32 salt, bytes extraData) public returns (address deployedProxy)",
2+
"function deployInfraProxyDeterministic(address implementation, bytes data, bytes32 salt, bytes extraData) returns (address deployedProxy)",
33
"event AssetInfraDeployed(address indexed implementation, address indexed proxy, bytes32 inputSalt, bytes data, bytes extraData)",
44
"error ProxyDeploymentFailed()"
55
]
Lines changed: 47 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,49 @@
11
[
2-
"function initialize(string _name, string _symbol, string _contractURI, uint256 _maxSupply, address _owner) external"
2+
"constructor()",
3+
"function DOMAIN_SEPARATOR() view returns (bytes32 result)",
4+
"function allowance(address owner, address spender) view returns (uint256 result)",
5+
"function approve(address spender, uint256 amount) returns (bool)",
6+
"function balanceOf(address owner) view returns (uint256 result)",
7+
"function burn(uint256 amount)",
8+
"function burnFrom(address from, uint256 amount)",
9+
"function cancelOwnershipHandover() payable",
10+
"function completeOwnershipHandover(address pendingOwner) payable",
11+
"function contractURI() view returns (string)",
12+
"function decimals() view returns (uint8)",
13+
"function initialize(string _name, string _symbol, string _contractURI, uint256 _maxSupply, address _owner)",
14+
"function name() view returns (string)",
15+
"function nonces(address owner) view returns (uint256 result)",
16+
"function owner() view returns (address result)",
17+
"function ownershipHandoverExpiresAt(address pendingOwner) view returns (uint256 result)",
18+
"function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s)",
19+
"function renounceOwnership() payable",
20+
"function requestOwnershipHandover() payable",
21+
"function setContractURI(string _contractURI)",
22+
"function supportsInterface(bytes4 interfaceId) pure returns (bool)",
23+
"function symbol() view returns (string)",
24+
"function totalSupply() view returns (uint256 result)",
25+
"function transfer(address to, uint256 amount) returns (bool)",
26+
"function transferFrom(address from, address to, uint256 amount) returns (bool)",
27+
"function transferOwnership(address newOwner) payable",
28+
"event Approval(address indexed owner, address indexed spender, uint256 amount)",
29+
"event ContractURIUpdated()",
30+
"event Initialized(uint64 version)",
31+
"event OwnershipHandoverCanceled(address indexed pendingOwner)",
32+
"event OwnershipHandoverRequested(address indexed pendingOwner)",
33+
"event OwnershipTransferred(address indexed oldOwner, address indexed newOwner)",
34+
"event Transfer(address indexed from, address indexed to, uint256 amount)",
35+
"error AllowanceOverflow()",
36+
"error AllowanceUnderflow()",
37+
"error AlreadyInitialized()",
38+
"error InsufficientAllowance()",
39+
"error InsufficientBalance()",
40+
"error InvalidInitialization()",
41+
"error InvalidPermit()",
42+
"error NewOwnerIsZeroAddress()",
43+
"error NoHandoverRequest()",
44+
"error NotInitializing()",
45+
"error Permit2AllowanceIsFixedAtInfinity()",
46+
"error PermitExpired()",
47+
"error TotalSupplyOverflow()",
48+
"error Unauthorized()"
349
]
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
[
2+
"constructor()",
3+
"function addImplementation((bytes32 contractId, address implementation, uint8 implementationType, uint8 createHook, bytes createHookData) config, bool isDefault)",
4+
"function buyAsset(address asset, (address recipient, address referrer, address tokenIn, uint256 amountIn, uint256 minAmountOut, uint256 deadline, bytes hookData) params) payable returns (uint256 amountIn, uint256 amountOut)",
5+
"function cancelOwnershipHandover() payable",
6+
"function claimRewards(address asset)",
7+
"function completeOwnershipHandover(address pendingOwner) payable",
8+
"function createAsset(address creator, (uint256 amount, address referrer, bytes32 salt, bytes data, bytes hookData) createParams) returns (address asset)",
9+
"function createAssetById(bytes32 contractId, address creator, (uint256 amount, address referrer, bytes32 salt, bytes data, bytes hookData) params) returns (address asset)",
10+
"function createAssetByImplementationConfig((bytes32 contractId, address implementation, uint8 implementationType, uint8 createHook, bytes createHookData) config, address creator, (uint256 amount, address referrer, bytes32 salt, bytes data, bytes hookData) params) returns (address asset)",
11+
"function decodeOwnerFromInitData(bytes data) pure returns (address owner)",
12+
"function distributeAsset(address asset, (uint256 amount, address recipient)[] contents) payable",
13+
"function getAirdrop() view returns (address airdrop)",
14+
"function getImplementation(bytes32 contractId) view returns ((bytes32 contractId, address implementation, uint8 implementationType, uint8 createHook, bytes createHookData) config)",
15+
"function getRewardLocker() view returns (address rewardLocker)",
16+
"function getRewardPosition(address asset) view returns ((address positionManager, uint256 tokenId, address recipient, address referrer, uint16 referrerBps))",
17+
"function getRouter() view returns (address router)",
18+
"function guardSalt(bytes32 salt, address creator, bytes contractInitData, bytes hookInitData) view returns (bytes32)",
19+
"function initialize(address owner, address router, address rewardLocker, address airdrop)",
20+
"function listAsset(address asset, (address tokenOut, uint256 pricePerUnit, uint8 priceDenominator, uint256 totalSupply, uint48 startTime, uint48 endTime, address hook, bytes createHookData) params) returns (address sale, address position, uint256 positionId)",
21+
"function owner() view returns (address result)",
22+
"function ownershipHandoverExpiresAt(address pendingOwner) view returns (uint256 result)",
23+
"function predictAssetAddress(bytes32 contractId, address creator, (uint256 amount, address referrer, bytes32 salt, bytes data, bytes hookData) params) view returns (address predicted)",
24+
"function predictAssetAddressByConfig((bytes32 contractId, address implementation, uint8 implementationType, uint8 createHook, bytes createHookData) config, address creator, (uint256 amount, address referrer, bytes32 salt, bytes data, bytes hookData) params) view returns (address predicted)",
25+
"function proxiableUUID() view returns (bytes32)",
26+
"function renounceOwnership() payable",
27+
"function requestOwnershipHandover() payable",
28+
"function sellAsset(address asset, (address recipient, address tokenOut, uint256 amountIn, uint256 minAmountOut, uint256 deadline, bytes hookData) params) returns (uint256 amountIn, uint256 amountOut)",
29+
"function setAirdrop(address airdrop)",
30+
"function setRewardLocker(address rewardLocker)",
31+
"function setRouter(address router)",
32+
"function transferOwnership(address newOwner) payable",
33+
"function upgradeToAndCall(address newImplementation, bytes data) payable",
34+
"event AirdropUpdated(address airdrop)",
35+
"event AssetCreated(bytes32 contractId, address indexed creator, address indexed asset, address referrer, bytes aux)",
36+
"event AssetDistributed(address asset, uint256 recipientCount, uint256 totalAmount)",
37+
"event ImplementationAdded(bytes32 contractId, address indexed implementation, uint8 implementationType, uint8 createHook, bytes createHookData)",
38+
"event Initialized(uint64 version)",
39+
"event OwnershipHandoverCanceled(address indexed pendingOwner)",
40+
"event OwnershipHandoverRequested(address indexed pendingOwner)",
41+
"event OwnershipTransferred(address indexed oldOwner, address indexed newOwner)",
42+
"event RewardLockerUpdated(address locker)",
43+
"event RouterUpdated(address router)",
44+
"event Upgraded(address indexed implementation)",
45+
"error AlreadyInitialized()",
46+
"error ArrayLengthMismatch()",
47+
"error AssetNotRegistered()",
48+
"error CreateHookFailed()",
49+
"error CreateHookReverted(string reason)",
50+
"error ImplementationAlreadyExists()",
51+
"error InvalidContractId()",
52+
"error InvalidCreateHook()",
53+
"error InvalidCreator()",
54+
"error InvalidDeploymentArgs()",
55+
"error InvalidImplementation()",
56+
"error InvalidInitialization()",
57+
"error InvalidInitializer()",
58+
"error InvalidSaltFlags()",
59+
"error InvalidValue()",
60+
"error NewOwnerIsZeroAddress()",
61+
"error NoHandoverRequest()",
62+
"error NotInitializing()",
63+
"error Unauthorized()",
64+
"error UnauthorizedCallContext()",
65+
"error UpgradeFailed()",
66+
"error ValueTransferFailed()"
67+
]
Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,47 @@
11
[
2-
"function initialize(address _owner, address _feeRecipient, uint96 _defaultFee) external"
2+
"constructor(address _owner, address _feeRecipient)",
3+
"function ROLE_FEE_MANAGER() view returns (uint256)",
4+
"function calculateFee(address payer, bytes4 action, uint256 amount, uint256 maxFeeAmount) view returns (address recipient, uint256 feeAmount)",
5+
"function cancelOwnershipHandover() payable",
6+
"function completeOwnershipHandover(address pendingOwner) payable",
7+
"function domainSeparator() view returns (bytes32)",
8+
"function eip712Domain() view returns (bytes1 fields, string name, string version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] extensions)",
9+
"function feeConfigs(address target, bytes4 action) view returns (address recipient, uint8 feeType, uint256 value)",
10+
"function feeRecipient() view returns (address)",
11+
"function getFeeConfig(address target, bytes4 action) view returns ((address recipient, uint8 feeType, uint256 value) config)",
12+
"function grantRoles(address user, uint256 roles) payable",
13+
"function hasAllRoles(address user, uint256 roles) view returns (bool)",
14+
"function hasAnyRole(address user, uint256 roles) view returns (bool)",
15+
"function owner() view returns (address result)",
16+
"function ownershipHandoverExpiresAt(address pendingOwner) view returns (uint256 result)",
17+
"function renounceOwnership() payable",
18+
"function renounceRoles(uint256 roles) payable",
19+
"function requestOwnershipHandover() payable",
20+
"function revokeRoles(address user, uint256 roles) payable",
21+
"function rolesOf(address user) view returns (uint256 roles)",
22+
"function setFeeConfig(bytes4 action, uint8 feeType, uint256 value)",
23+
"function setFeeConfigBySignature(address target, bytes4 action, address recipient, uint8 feeType, uint256 value, uint256 nonce, uint256 deadline, bytes signature)",
24+
"function setFeeRecipient(address _feeRecipient)",
25+
"function setTargetFeeConfig(address target, bytes4 action, address recipient, uint8 feeType, uint256 value)",
26+
"function transferOwnership(address newOwner) payable",
27+
"function usedNonces(bytes32 signerNonce) view returns (bool used)",
28+
"event FeeConfigUpdated(address indexed target, bytes4 indexed action, address recipient, uint8 feeType, uint256 value)",
29+
"event FeeConfigUpdatedBySignature(address indexed signer, address indexed target, bytes4 indexed action, address recipient, uint8 feeType, uint256 value)",
30+
"event FeeRecipientUpdated(address feeRecipient)",
31+
"event OwnershipHandoverCanceled(address indexed pendingOwner)",
32+
"event OwnershipHandoverRequested(address indexed pendingOwner)",
33+
"event OwnershipTransferred(address indexed oldOwner, address indexed newOwner)",
34+
"event RolesUpdated(address indexed user, uint256 indexed roles)",
35+
"error AlreadyInitialized()",
36+
"error InvalidConfig()",
37+
"error InvalidFeeType()",
38+
"error InvalidModule()",
39+
"error InvalidNonce()",
40+
"error InvalidRecipient()",
41+
"error InvalidSignature()",
42+
"error InvalidValue()",
43+
"error NewOwnerIsZeroAddress()",
44+
"error NoHandoverRequest()",
45+
"error SignatureExpired()",
46+
"error Unauthorized()"
347
]
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[
2+
"constructor(address _feeManager, address _v3PositionManager, address _v4PositionManager)",
3+
"function collectRewards(address owner, address asset) returns (address token0, address token1, uint256 amount0, uint256 amount1)",
4+
"function feeManager() view returns (address)",
5+
"function lockPosition(address asset, address positionManager, uint256 tokenId, address recipient, address referrer, uint16 referrerBps)",
6+
"function positions(address owner, address asset) view returns (address positionManager, uint256 tokenId, address recipient, address referrer, uint16 referrerBps)",
7+
"function v3PositionManager() view returns (address)",
8+
"function v4PositionManager() view returns (address)",
9+
"event PositionLocked(address indexed owner, address indexed asset, address positionManager, uint256 tokenId, address recipient, address referrer)",
10+
"event RewardsCollected(address indexed owner, address indexed asset, address positionManager, uint256 tokenId, uint256 amount0, uint256 amount1)",
11+
"error InvalidPosition()",
12+
"error InvalidPositionManager()",
13+
"error InvalidReferrerBps()",
14+
"error InvalidRewardRecipient()",
15+
"error TokenAlreadyLocked()"
16+
]
Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,54 @@
11
[
2-
"function initialize(address _owner) external"
2+
"constructor()",
3+
"function NATIVE_TOKEN() view returns (address)",
4+
"function cancelOwnershipHandover() payable",
5+
"function completeOwnershipHandover(address pendingOwner) payable",
6+
"function createMarket((address creator, address tokenIn, address tokenOut, uint256 pricePerUnit, uint8 priceDenominator, uint256 totalSupply, uint48 startTime, uint48 endTime, uint256 tokenId, address hook, bytes createHookData) createMarketConfig) payable returns (address sale, address position, uint256 positionId)",
7+
"function createPool((address recipient, address referrer, address tokenA, address tokenB, uint256 amountA, uint256 amountB, bytes data) createPoolConfig) payable returns (address pool, address position, uint256 positionId, uint256 refundAmount0, uint256 refundAmount1)",
8+
"function disableAdapter(uint8 adapterType)",
9+
"function enableAdapter(uint8 adapterType, bytes config)",
10+
"function initialize(address owner)",
11+
"function owner() view returns (address result)",
12+
"function ownershipHandoverExpiresAt(address pendingOwner) view returns (uint256 result)",
13+
"function proxiableUUID() view returns (bytes32)",
14+
"function renounceOwnership() payable",
15+
"function requestOwnershipHandover() payable",
16+
"function swap((address tokenIn, address tokenOut, uint256 amountIn, uint256 minAmountOut, address recipient, address refundRecipient, uint256 deadline, bytes data) config) payable returns ((uint256 amountIn, uint256 amountOut, address source) result)",
17+
"function transferOwnership(address newOwner) payable",
18+
"function upgradeToAndCall(address newImplementation, bytes data) payable",
19+
"event AdapterDisabled(uint8 adapterType)",
20+
"event AdapterEnabled(uint8 adapterType)",
21+
"event Initialized(uint64 version)",
22+
"event OwnershipHandoverCanceled(address indexed pendingOwner)",
23+
"event OwnershipHandoverRequested(address indexed pendingOwner)",
24+
"event OwnershipTransferred(address indexed oldOwner, address indexed newOwner)",
25+
"event SwapExecuted(address indexed sender, address indexed tokenIn, address indexed tokenOut, uint256 amountIn, uint256 amountOut, uint8 adapterUsed)",
26+
"event Upgraded(address indexed implementation)",
27+
"error AdapterNotFound()",
28+
"error AlreadyInitialized()",
29+
"error DeadlineExceeded()",
30+
"error ExcessiveInput()",
31+
"error InsufficientOutput()",
32+
"error InvalidAmount()",
33+
"error InvalidConfiguration()",
34+
"error InvalidFee()",
35+
"error InvalidFee()",
36+
"error InvalidInitialization()",
37+
"error InvalidPoolConfig()",
38+
"error InvalidTick()",
39+
"error InvalidTick()",
40+
"error NewOwnerIsZeroAddress()",
41+
"error NoAvailableRoute()",
42+
"error NoHandoverRequest()",
43+
"error NotInitializing()",
44+
"error PoolAlreadyExists()",
45+
"error PoolAlreadyExists()",
46+
"error PoolNotFound()",
47+
"error PoolNotFound()",
48+
"error Reentrancy()",
49+
"error SwapFailed()",
50+
"error Unauthorized()",
51+
"error UnauthorizedCallContext()",
52+
"error UpgradeFailed()",
53+
"error ZeroAddress()"
354
]

0 commit comments

Comments
 (0)