Skip to content

Commit 26f96d8

Browse files
committed
assets -> tokens. update contracts, remove unused
1 parent 583af3f commit 26f96d8

File tree

1,132 files changed

+15823
-3123
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,132 files changed

+15823
-3123
lines changed

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

Lines changed: 0 additions & 5 deletions
This file was deleted.

packages/thirdweb/scripts/generate/abis/assets/ERC20AssetEntrypoint.json renamed to packages/thirdweb/scripts/generate/abis/tokens/ERC20Entrypoint.json

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,63 @@
11
[
22
"constructor()",
33
"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)",
4+
"function buy(address asset, (address recipient, address referrer, address tokenIn, uint256 amountIn, uint256 minAmountOut, uint256 deadline, bytes hookData) params) payable returns (uint256 amountIn, uint256 amountOut)",
55
"function cancelOwnershipHandover() payable",
66
"function claimReward(address asset)",
77
"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",
8+
"function create(address creator, (address referrer, bytes32 salt, bytes data, bytes hookData) createParams) payable returns (address asset)",
9+
"function createById(bytes32 contractId, address creator, (address referrer, bytes32 salt, bytes data, bytes hookData) params) payable returns (address asset)",
10+
"function createByImplementationConfig((bytes32 contractId, address implementation, uint8 implementationType, uint8 createHook, bytes createHookData) config, address creator, (address referrer, bytes32 salt, bytes data, bytes hookData) params) payable returns (address asset)",
11+
"function distribute(address asset, (uint256 amount, address recipient)[] contents) payable",
1312
"function getAirdrop() view returns (address airdrop)",
1413
"function getImplementation(bytes32 contractId) view returns ((bytes32 contractId, address implementation, uint8 implementationType, uint8 createHook, bytes createHookData) config)",
1514
"function getReward(address asset) view returns ((address positionManager, uint256 tokenId, address recipient, address referrer, uint16 referrerBps))",
1615
"function getRewardLocker() view returns (address rewardLocker)",
1716
"function getRouter() view returns (address router)",
1817
"function guardSalt(bytes32 salt, address creator, bytes contractInitData, bytes hookInitData) view returns (bytes32)",
1918
"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)",
2119
"function owner() view returns (address result)",
2220
"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)",
21+
"function predictAddress(bytes32 contractId, address creator, (address referrer, bytes32 salt, bytes data, bytes hookData) params) view returns (address predicted)",
22+
"function predictAddressByConfig((bytes32 contractId, address implementation, uint8 implementationType, uint8 createHook, bytes createHookData) config, address creator, (address referrer, bytes32 salt, bytes data, bytes hookData) params) view returns (address predicted)",
2523
"function proxiableUUID() view returns (bytes32)",
2624
"function renounceOwnership() payable",
2725
"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)",
26+
"function sell(address asset, (address recipient, address tokenOut, uint256 amountIn, uint256 minAmountOut, uint256 deadline, bytes hookData) params) returns (uint256 amountIn, uint256 amountOut)",
2927
"function setAirdrop(address airdrop)",
3028
"function setRewardLocker(address rewardLocker)",
3129
"function setRouter(address router)",
3230
"function transferOwnership(address newOwner) payable",
3331
"function upgradeToAndCall(address newImplementation, bytes data) payable",
3432
"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 AssetRewardClaimed(address asset, address claimer)",
33+
"event Created(bytes32 contractId, address indexed creator, address indexed asset, address referrer, bytes aux)",
34+
"event Distributed(address asset, uint256 recipientCount, uint256 totalAmount)",
3835
"event ImplementationAdded(bytes32 contractId, address indexed implementation, uint8 implementationType, uint8 createHook, bytes createHookData)",
3936
"event Initialized(uint64 version)",
4037
"event OwnershipHandoverCanceled(address indexed pendingOwner)",
4138
"event OwnershipHandoverRequested(address indexed pendingOwner)",
4239
"event OwnershipTransferred(address indexed oldOwner, address indexed newOwner)",
40+
"event RewardClaimed(address asset, address claimer)",
4341
"event RewardLockerUpdated(address locker)",
4442
"event RouterUpdated(address router)",
4543
"event Upgraded(address indexed implementation)",
4644
"error AlreadyInitialized()",
4745
"error ArrayLengthMismatch()",
48-
"error AssetNotRegistered()",
49-
"error CreateHookFailed()",
50-
"error CreateHookReverted(string reason)",
5146
"error ImplementationAlreadyExists()",
47+
"error InvalidAmount()",
5248
"error InvalidContractId()",
5349
"error InvalidCreateHook()",
5450
"error InvalidCreator()",
55-
"error InvalidDeploymentArgs()",
51+
"error InvalidDeploymentCall()",
5652
"error InvalidImplementation()",
5753
"error InvalidInitialization()",
58-
"error InvalidInitializer()",
54+
"error InvalidPoolAmount()",
5955
"error InvalidSaltFlags()",
6056
"error InvalidValue()",
6157
"error NewOwnerIsZeroAddress()",
6258
"error NoHandoverRequest()",
6359
"error NotInitializing()",
60+
"error NotRegistered()",
6461
"error Unauthorized()",
6562
"error UnauthorizedCallContext()",
6663
"error UpgradeFailed()",

packages/thirdweb/scripts/generate/abis/assets/Router.json renamed to packages/thirdweb/scripts/generate/abis/tokens/Router.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"function NATIVE_TOKEN() view returns (address)",
44
"function cancelOwnershipHandover() payable",
55
"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)",
76
"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)",
87
"function disableAdapter(uint8 adapterType)",
98
"function enableAdapter(uint8 adapterType, bytes config)",
@@ -27,18 +26,17 @@
2726
"error AdapterNotFound()",
2827
"error AlreadyInitialized()",
2928
"error DeadlineExceeded()",
30-
"error ExcessiveInput()",
31-
"error InsufficientOutput()",
29+
"error InvalidAdapterType()",
3230
"error InvalidAmount()",
3331
"error InvalidConfiguration()",
32+
"error InvalidETHAmount()",
3433
"error InvalidFee()",
3534
"error InvalidFee()",
3635
"error InvalidInitialization()",
3736
"error InvalidPoolConfig()",
3837
"error InvalidTick()",
3938
"error InvalidTick()",
4039
"error NewOwnerIsZeroAddress()",
41-
"error NoAvailableRoute()",
4240
"error NoHandoverRequest()",
4341
"error NotInitializing()",
4442
"error PoolAlreadyExists()",

packages/thirdweb/src/assets/create-token-by-impl-config.ts

Lines changed: 0 additions & 137 deletions
This file was deleted.

packages/thirdweb/src/assets/create-token.test.ts

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)