@flaunch/sdk 0.8.3-beta.0 → 0.8.3-beta.1
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/dist/abi/FlaunchZap.d.ts +26 -0
- package/dist/abi/FlaunchZap.d.ts.map +1 -1
- package/dist/abi/TreasuryManagerFactory.d.ts +0 -26
- package/dist/abi/TreasuryManagerFactory.d.ts.map +1 -1
- package/dist/abi/index.cjs +22 -22
- package/dist/abi/index.cjs.map +1 -1
- package/dist/abi/index.js +22 -22
- package/dist/abi/index.js.map +1 -1
- package/dist/addresses/index.cjs +3 -3
- package/dist/addresses/index.js +3 -3
- package/dist/clients/FlaunchZapClient.d.ts +36 -0
- package/dist/clients/FlaunchZapClient.d.ts.map +1 -1
- package/dist/clients/TreasuryManagerFactoryClient.d.ts +0 -37
- package/dist/clients/TreasuryManagerFactoryClient.d.ts.map +1 -1
- package/dist/index.cjs.js +98 -98
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +98 -98
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/sdk/FlaunchSDK.d.ts +2 -2
- package/dist/sdk/FlaunchSDK.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/addresses/index.cjs
CHANGED
|
@@ -5413,11 +5413,11 @@ const FastFlaunchZapAddress = {
|
|
|
5413
5413
|
};
|
|
5414
5414
|
const FlaunchZapAddress = {
|
|
5415
5415
|
[base.id]: "0xfa9e8528ee95eb109bffd1a2d59cb95b300a672a", // TODO: update mainnet address with permissions param
|
|
5416
|
-
[baseSepolia.id]: "
|
|
5416
|
+
[baseSepolia.id]: "0x2871a184410F03F4e2C7C5257d839FB34169496A",
|
|
5417
5417
|
};
|
|
5418
5418
|
const TreasuryManagerFactoryAddress = {
|
|
5419
|
-
[base.id]: "0x48af8b28DDC5e5A86c4906212fc35Fa808CA8763",
|
|
5420
|
-
[baseSepolia.id]: "
|
|
5419
|
+
[base.id]: "0x48af8b28DDC5e5A86c4906212fc35Fa808CA8763",
|
|
5420
|
+
[baseSepolia.id]: "0xD2F3C6185e06925dCBE794C6574315b2202E9CcD",
|
|
5421
5421
|
};
|
|
5422
5422
|
const RevenueManagerAddress = {
|
|
5423
5423
|
[base.id]: "0x712fa8ddc7347b4b6b029aa21710f365cd02d898",
|
package/dist/addresses/index.js
CHANGED
|
@@ -5409,11 +5409,11 @@ const FastFlaunchZapAddress = {
|
|
|
5409
5409
|
};
|
|
5410
5410
|
const FlaunchZapAddress = {
|
|
5411
5411
|
[base.id]: "0xfa9e8528ee95eb109bffd1a2d59cb95b300a672a", // TODO: update mainnet address with permissions param
|
|
5412
|
-
[baseSepolia.id]: "
|
|
5412
|
+
[baseSepolia.id]: "0x2871a184410F03F4e2C7C5257d839FB34169496A",
|
|
5413
5413
|
};
|
|
5414
5414
|
const TreasuryManagerFactoryAddress = {
|
|
5415
|
-
[base.id]: "0x48af8b28DDC5e5A86c4906212fc35Fa808CA8763",
|
|
5416
|
-
[baseSepolia.id]: "
|
|
5415
|
+
[base.id]: "0x48af8b28DDC5e5A86c4906212fc35Fa808CA8763",
|
|
5416
|
+
[baseSepolia.id]: "0xD2F3C6185e06925dCBE794C6574315b2202E9CcD",
|
|
5417
5417
|
};
|
|
5418
5418
|
const RevenueManagerAddress = {
|
|
5419
5419
|
[base.id]: "0x712fa8ddc7347b4b6b029aa21710f365cd02d898",
|
|
@@ -43,6 +43,20 @@ export interface FlaunchWithSplitManagerParams extends Omit<FlaunchParams, "trea
|
|
|
43
43
|
}
|
|
44
44
|
export interface FlaunchWithSplitManagerIPFSParams extends Omit<FlaunchWithSplitManagerParams, "tokenUri">, IPFSParams {
|
|
45
45
|
}
|
|
46
|
+
export interface DeployRevenueManagerParams {
|
|
47
|
+
protocolRecipient: Address;
|
|
48
|
+
protocolFeePercent: number;
|
|
49
|
+
permissions?: Permissions;
|
|
50
|
+
}
|
|
51
|
+
export interface DeployStakingManagerParams {
|
|
52
|
+
managerOwner: Address;
|
|
53
|
+
stakingToken: Address;
|
|
54
|
+
minEscrowDuration: bigint;
|
|
55
|
+
minStakeDuration: bigint;
|
|
56
|
+
creatorSharePercent: number;
|
|
57
|
+
ownerSharePercent: number;
|
|
58
|
+
permissions?: Permissions;
|
|
59
|
+
}
|
|
46
60
|
/**
|
|
47
61
|
* Base client for interacting with the FlaunchZap contract in read-only mode
|
|
48
62
|
* Provides basic contract initialization
|
|
@@ -143,5 +157,27 @@ export declare class ReadWriteFlaunchZap extends ReadFlaunchZap {
|
|
|
143
157
|
* @returns Promise resolving to the transaction response for the flaunch creation
|
|
144
158
|
*/
|
|
145
159
|
flaunchIPFSWithSplitManager(params: FlaunchWithSplitManagerIPFSParams): Promise<`0x${string}`>;
|
|
160
|
+
/**
|
|
161
|
+
* Deploys a new revenue manager
|
|
162
|
+
* @param params - Parameters for deploying the revenue manager
|
|
163
|
+
* @param params.protocolRecipient - The address of the protocol recipient
|
|
164
|
+
* @param params.protocolFeePercent - The percentage of the protocol fee
|
|
165
|
+
* @param params.permissions - The permissions for the revenue manager
|
|
166
|
+
* @returns Transaction response
|
|
167
|
+
*/
|
|
168
|
+
deployRevenueManager(params: DeployRevenueManagerParams): Promise<`0x${string}`>;
|
|
169
|
+
/**
|
|
170
|
+
* Deploys a new staking manager
|
|
171
|
+
* @param params - Parameters for deploying the staking manager
|
|
172
|
+
* @param params.managerOwner - The address of the manager owner
|
|
173
|
+
* @param params.stakingToken - The address of the token to be staked
|
|
174
|
+
* @param params.minEscrowDuration - The minimum duration (in seconds) that the creator's NFT is locked for
|
|
175
|
+
* @param params.minStakeDuration - The minimum duration (in seconds) that the user's tokens are locked for
|
|
176
|
+
* @param params.creatorSharePercent - The % share that a creator will earn from their token
|
|
177
|
+
* @param params.ownerSharePercent - The % share that the manager owner will earn from their token
|
|
178
|
+
* @param params.permissions - The permissions for the staking manager
|
|
179
|
+
* @returns Transaction response
|
|
180
|
+
*/
|
|
181
|
+
deployStakingManager(params: DeployStakingManagerParams): Promise<`0x${string}`>;
|
|
146
182
|
}
|
|
147
183
|
//# sourceMappingURL=FlaunchZapClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FlaunchZapClient.d.ts","sourceRoot":"","sources":["../../src/clients/FlaunchZapClient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,KAAK,EAEV,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,SAAS,EAEf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAKlD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"FlaunchZapClient.d.ts","sourceRoot":"","sources":["../../src/clients/FlaunchZapClient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,KAAK,EAEV,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,SAAS,EAEf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAKlD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEnD,OAAO,EAAE,8BAA8B,EAAE,MAAM,oCAAoC,CAAC;AAQpF,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC;AAEjD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,OAAO,EAAE,OAAO,CAAC;IACjB,2BAA2B,EAAE,MAAM,CAAC;IACpC,SAAS,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M,EAAE,+BAA+B;IAoEvE;;;;OAIG;IACG,6BAA6B,CACjC,MAAM,EAAE,mCAAmC;IAa7C;;;;;;;;;;;;;;;;;;OAkBG;IACG,uBAAuB,CAAC,MAAM,EAAE,6BAA6B;IAiHnE;;;;OAIG;IACG,2BAA2B,CAAC,MAAM,EAAE,iCAAiC;IAY3E;;;;;;;OAOG;IACH,oBAAoB,CAAC,MAAM,EAAE,0BAA0B;IA8BvD;;;;;;;;;;;OAWG;IACH,oBAAoB,CAAC,MAAM,EAAE,0BAA0B;CAuCxD"}
|
|
@@ -1,21 +1,6 @@
|
|
|
1
1
|
import { type ReadContract, type Address, type Drift, type ReadWriteContract, type HexString } from "@delvtech/drift";
|
|
2
2
|
import { TreasuryManagerFactoryAbi } from "../abi/TreasuryManagerFactory";
|
|
3
|
-
import { Permissions } from "types";
|
|
4
3
|
export type TreasuryManagerFactoryABI = typeof TreasuryManagerFactoryAbi;
|
|
5
|
-
export interface DeployRevenueManagerParams {
|
|
6
|
-
protocolRecipient: Address;
|
|
7
|
-
protocolFeePercent: number;
|
|
8
|
-
permissions?: Permissions;
|
|
9
|
-
}
|
|
10
|
-
export interface DeployStakingManagerParams {
|
|
11
|
-
managerOwner: Address;
|
|
12
|
-
stakingToken: Address;
|
|
13
|
-
minEscrowDuration: bigint;
|
|
14
|
-
minStakeDuration: bigint;
|
|
15
|
-
creatorSharePercent: number;
|
|
16
|
-
ownerSharePercent: number;
|
|
17
|
-
permissions?: Permissions;
|
|
18
|
-
}
|
|
19
4
|
export declare class ReadTreasuryManagerFactory {
|
|
20
5
|
chainId: number;
|
|
21
6
|
readonly contract: ReadContract<TreasuryManagerFactoryABI>;
|
|
@@ -25,27 +10,5 @@ export declare class ReadTreasuryManagerFactory {
|
|
|
25
10
|
export declare class ReadWriteTreasuryManagerFactory extends ReadTreasuryManagerFactory {
|
|
26
11
|
contract: ReadWriteContract<TreasuryManagerFactoryABI>;
|
|
27
12
|
constructor(chainId: number, address: Address, drift?: Drift);
|
|
28
|
-
/**
|
|
29
|
-
* Deploys a new revenue manager
|
|
30
|
-
* @param params - Parameters for deploying the revenue manager
|
|
31
|
-
* @param params.protocolRecipient - The address of the protocol recipient
|
|
32
|
-
* @param params.protocolFeePercent - The percentage of the protocol fee
|
|
33
|
-
* @param params.permissions - The permissions for the revenue manager
|
|
34
|
-
* @returns Transaction response
|
|
35
|
-
*/
|
|
36
|
-
deployRevenueManager(params: DeployRevenueManagerParams): Promise<`0x${string}`>;
|
|
37
|
-
/**
|
|
38
|
-
* Deploys a new staking manager
|
|
39
|
-
* @param params - Parameters for deploying the staking manager
|
|
40
|
-
* @param params.managerOwner - The address of the manager owner
|
|
41
|
-
* @param params.stakingToken - The address of the token to be staked
|
|
42
|
-
* @param params.minEscrowDuration - The minimum duration (in seconds) that the creator's NFT is locked for
|
|
43
|
-
* @param params.minStakeDuration - The minimum duration (in seconds) that the user's tokens are locked for
|
|
44
|
-
* @param params.creatorSharePercent - The % share that a creator will earn from their token
|
|
45
|
-
* @param params.ownerSharePercent - The % share that the manager owner will earn from their token
|
|
46
|
-
* @param params.permissions - The permissions for the staking manager
|
|
47
|
-
* @returns Transaction response
|
|
48
|
-
*/
|
|
49
|
-
deployStakingManager(params: DeployStakingManagerParams): Promise<`0x${string}`>;
|
|
50
13
|
}
|
|
51
14
|
//# sourceMappingURL=TreasuryManagerFactoryClient.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TreasuryManagerFactoryClient.d.ts","sourceRoot":"","sources":["../../src/clients/TreasuryManagerFactoryClient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,KAAK,EAEV,KAAK,iBAAiB,EAEtB,KAAK,SAAS,EAEf,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"TreasuryManagerFactoryClient.d.ts","sourceRoot":"","sources":["../../src/clients/TreasuryManagerFactoryClient.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,KAAK,EAEV,KAAK,iBAAiB,EAEtB,KAAK,SAAS,EAEf,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAG1E,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAC;AAEzE,qBAAa,0BAA0B;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAgB,QAAQ,EAAE,YAAY,CAAC,yBAAyB,CAAC,CAAC;gBAEtD,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,GAAE,KAAqB;IAWrE,+BAA+B,CAAC,IAAI,EAAE,SAAS;CA2BtD;AAED,qBAAa,+BAAgC,SAAQ,0BAA0B;IACrE,QAAQ,EAAE,iBAAiB,CAAC,yBAAyB,CAAC,CAAC;gBAEnD,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,GAAE,KAAqB;CAG5E"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -5421,11 +5421,11 @@ const FastFlaunchZapAddress = {
|
|
|
5421
5421
|
};
|
|
5422
5422
|
const FlaunchZapAddress = {
|
|
5423
5423
|
[base.id]: "0xfa9e8528ee95eb109bffd1a2d59cb95b300a672a", // TODO: update mainnet address with permissions param
|
|
5424
|
-
[baseSepolia.id]: "
|
|
5424
|
+
[baseSepolia.id]: "0x2871a184410F03F4e2C7C5257d839FB34169496A",
|
|
5425
5425
|
};
|
|
5426
5426
|
const TreasuryManagerFactoryAddress = {
|
|
5427
|
-
[base.id]: "0x48af8b28DDC5e5A86c4906212fc35Fa808CA8763",
|
|
5428
|
-
[baseSepolia.id]: "
|
|
5427
|
+
[base.id]: "0x48af8b28DDC5e5A86c4906212fc35Fa808CA8763",
|
|
5428
|
+
[baseSepolia.id]: "0xD2F3C6185e06925dCBE794C6574315b2202E9CcD",
|
|
5429
5429
|
};
|
|
5430
5430
|
const RevenueManagerAddress = {
|
|
5431
5431
|
[base.id]: "0x712fa8ddc7347b4b6b029aa21710f365cd02d898",
|
|
@@ -10887,6 +10887,28 @@ const FlaunchZapAbi = [
|
|
|
10887
10887
|
],
|
|
10888
10888
|
stateMutability: "view",
|
|
10889
10889
|
},
|
|
10890
|
+
{
|
|
10891
|
+
type: "function",
|
|
10892
|
+
name: "deployAndInitializeManager",
|
|
10893
|
+
inputs: [
|
|
10894
|
+
{
|
|
10895
|
+
name: "_managerImplementation",
|
|
10896
|
+
type: "address",
|
|
10897
|
+
internalType: "address",
|
|
10898
|
+
},
|
|
10899
|
+
{ name: "_owner", type: "address", internalType: "address" },
|
|
10900
|
+
{ name: "_data", type: "bytes", internalType: "bytes" },
|
|
10901
|
+
{ name: "_permissions", type: "address", internalType: "address" },
|
|
10902
|
+
],
|
|
10903
|
+
outputs: [
|
|
10904
|
+
{
|
|
10905
|
+
name: "manager_",
|
|
10906
|
+
type: "address",
|
|
10907
|
+
internalType: "address payable",
|
|
10908
|
+
},
|
|
10909
|
+
],
|
|
10910
|
+
stateMutability: "nonpayable",
|
|
10911
|
+
},
|
|
10890
10912
|
{
|
|
10891
10913
|
type: "function",
|
|
10892
10914
|
name: "flETH",
|
|
@@ -13383,6 +13405,77 @@ class ReadWriteFlaunchZap extends ReadFlaunchZap {
|
|
|
13383
13405
|
tokenUri,
|
|
13384
13406
|
});
|
|
13385
13407
|
}
|
|
13408
|
+
/**
|
|
13409
|
+
* Deploys a new revenue manager
|
|
13410
|
+
* @param params - Parameters for deploying the revenue manager
|
|
13411
|
+
* @param params.protocolRecipient - The address of the protocol recipient
|
|
13412
|
+
* @param params.protocolFeePercent - The percentage of the protocol fee
|
|
13413
|
+
* @param params.permissions - The permissions for the revenue manager
|
|
13414
|
+
* @returns Transaction response
|
|
13415
|
+
*/
|
|
13416
|
+
deployRevenueManager(params) {
|
|
13417
|
+
const permissionsAddress = getPermissionsAddress(params.permissions ?? exports.Permissions.OPEN, this.chainId);
|
|
13418
|
+
return this.contract.write("deployAndInitializeManager", {
|
|
13419
|
+
_managerImplementation: RevenueManagerAddress[this.chainId],
|
|
13420
|
+
_owner: params.protocolRecipient,
|
|
13421
|
+
_data: viem.encodeAbiParameters([
|
|
13422
|
+
{
|
|
13423
|
+
type: "tuple",
|
|
13424
|
+
components: [
|
|
13425
|
+
{ type: "address", name: "protocolRecipient" },
|
|
13426
|
+
{ type: "uint256", name: "protocolFee" },
|
|
13427
|
+
],
|
|
13428
|
+
},
|
|
13429
|
+
], [
|
|
13430
|
+
{
|
|
13431
|
+
protocolRecipient: params.protocolRecipient,
|
|
13432
|
+
protocolFee: BigInt(params.protocolFeePercent * 100), // Convert percentage to basis points
|
|
13433
|
+
},
|
|
13434
|
+
]),
|
|
13435
|
+
_permissions: permissionsAddress,
|
|
13436
|
+
});
|
|
13437
|
+
}
|
|
13438
|
+
/**
|
|
13439
|
+
* Deploys a new staking manager
|
|
13440
|
+
* @param params - Parameters for deploying the staking manager
|
|
13441
|
+
* @param params.managerOwner - The address of the manager owner
|
|
13442
|
+
* @param params.stakingToken - The address of the token to be staked
|
|
13443
|
+
* @param params.minEscrowDuration - The minimum duration (in seconds) that the creator's NFT is locked for
|
|
13444
|
+
* @param params.minStakeDuration - The minimum duration (in seconds) that the user's tokens are locked for
|
|
13445
|
+
* @param params.creatorSharePercent - The % share that a creator will earn from their token
|
|
13446
|
+
* @param params.ownerSharePercent - The % share that the manager owner will earn from their token
|
|
13447
|
+
* @param params.permissions - The permissions for the staking manager
|
|
13448
|
+
* @returns Transaction response
|
|
13449
|
+
*/
|
|
13450
|
+
deployStakingManager(params) {
|
|
13451
|
+
const permissionsAddress = getPermissionsAddress(params.permissions ?? exports.Permissions.OPEN, this.chainId);
|
|
13452
|
+
const VALID_SHARE_TOTAL = 10000000n; // 5 decimals as BigInt
|
|
13453
|
+
return this.contract.write("deployAndInitializeManager", {
|
|
13454
|
+
_managerImplementation: StakingManagerAddress[this.chainId],
|
|
13455
|
+
_owner: params.managerOwner,
|
|
13456
|
+
_data: viem.encodeAbiParameters([
|
|
13457
|
+
{
|
|
13458
|
+
type: "tuple",
|
|
13459
|
+
components: [
|
|
13460
|
+
{ type: "address", name: "stakingToken" },
|
|
13461
|
+
{ type: "uint256", name: "minEscrowDuration" },
|
|
13462
|
+
{ type: "uint256", name: "minStakeDuration" },
|
|
13463
|
+
{ type: "uint256", name: "creatorShare" },
|
|
13464
|
+
{ type: "uint256", name: "ownerShare" },
|
|
13465
|
+
],
|
|
13466
|
+
},
|
|
13467
|
+
], [
|
|
13468
|
+
{
|
|
13469
|
+
stakingToken: params.stakingToken,
|
|
13470
|
+
minEscrowDuration: params.minEscrowDuration,
|
|
13471
|
+
minStakeDuration: params.minStakeDuration,
|
|
13472
|
+
creatorShare: (BigInt(params.creatorSharePercent) * VALID_SHARE_TOTAL) / 100n,
|
|
13473
|
+
ownerShare: (BigInt(params.ownerSharePercent) * VALID_SHARE_TOTAL) / 100n,
|
|
13474
|
+
},
|
|
13475
|
+
]),
|
|
13476
|
+
_permissions: permissionsAddress,
|
|
13477
|
+
});
|
|
13478
|
+
}
|
|
13386
13479
|
}
|
|
13387
13480
|
|
|
13388
13481
|
const FlaunchAbi = [
|
|
@@ -20086,28 +20179,6 @@ const TreasuryManagerFactoryAbi = [
|
|
|
20086
20179
|
],
|
|
20087
20180
|
stateMutability: "nonpayable",
|
|
20088
20181
|
},
|
|
20089
|
-
{
|
|
20090
|
-
type: "function",
|
|
20091
|
-
name: "deployAndInitializeManager",
|
|
20092
|
-
inputs: [
|
|
20093
|
-
{
|
|
20094
|
-
name: "_managerImplementation",
|
|
20095
|
-
type: "address",
|
|
20096
|
-
internalType: "address",
|
|
20097
|
-
},
|
|
20098
|
-
{ name: "_owner", type: "address", internalType: "address" },
|
|
20099
|
-
{ name: "_data", type: "bytes", internalType: "bytes" },
|
|
20100
|
-
{ name: "_permissions", type: "address", internalType: "address" },
|
|
20101
|
-
],
|
|
20102
|
-
outputs: [
|
|
20103
|
-
{
|
|
20104
|
-
name: "manager_",
|
|
20105
|
-
type: "address",
|
|
20106
|
-
internalType: "address payable",
|
|
20107
|
-
},
|
|
20108
|
-
],
|
|
20109
|
-
stateMutability: "nonpayable",
|
|
20110
|
-
},
|
|
20111
20182
|
{
|
|
20112
20183
|
type: "function",
|
|
20113
20184
|
name: "deployManager",
|
|
@@ -20482,77 +20553,6 @@ class ReadWriteTreasuryManagerFactory extends ReadTreasuryManagerFactory {
|
|
|
20482
20553
|
constructor(chainId, address, drift$1 = drift.createDrift()) {
|
|
20483
20554
|
super(chainId, address, drift$1);
|
|
20484
20555
|
}
|
|
20485
|
-
/**
|
|
20486
|
-
* Deploys a new revenue manager
|
|
20487
|
-
* @param params - Parameters for deploying the revenue manager
|
|
20488
|
-
* @param params.protocolRecipient - The address of the protocol recipient
|
|
20489
|
-
* @param params.protocolFeePercent - The percentage of the protocol fee
|
|
20490
|
-
* @param params.permissions - The permissions for the revenue manager
|
|
20491
|
-
* @returns Transaction response
|
|
20492
|
-
*/
|
|
20493
|
-
deployRevenueManager(params) {
|
|
20494
|
-
const permissionsAddress = getPermissionsAddress(params.permissions ?? exports.Permissions.OPEN, this.chainId);
|
|
20495
|
-
return this.contract.write("deployAndInitializeManager", {
|
|
20496
|
-
_managerImplementation: RevenueManagerAddress[this.chainId],
|
|
20497
|
-
_owner: params.protocolRecipient,
|
|
20498
|
-
_data: viem.encodeAbiParameters([
|
|
20499
|
-
{
|
|
20500
|
-
type: "tuple",
|
|
20501
|
-
components: [
|
|
20502
|
-
{ type: "address", name: "protocolRecipient" },
|
|
20503
|
-
{ type: "uint256", name: "protocolFee" },
|
|
20504
|
-
],
|
|
20505
|
-
},
|
|
20506
|
-
], [
|
|
20507
|
-
{
|
|
20508
|
-
protocolRecipient: params.protocolRecipient,
|
|
20509
|
-
protocolFee: BigInt(params.protocolFeePercent * 100), // Convert percentage to basis points
|
|
20510
|
-
},
|
|
20511
|
-
]),
|
|
20512
|
-
_permissions: permissionsAddress,
|
|
20513
|
-
});
|
|
20514
|
-
}
|
|
20515
|
-
/**
|
|
20516
|
-
* Deploys a new staking manager
|
|
20517
|
-
* @param params - Parameters for deploying the staking manager
|
|
20518
|
-
* @param params.managerOwner - The address of the manager owner
|
|
20519
|
-
* @param params.stakingToken - The address of the token to be staked
|
|
20520
|
-
* @param params.minEscrowDuration - The minimum duration (in seconds) that the creator's NFT is locked for
|
|
20521
|
-
* @param params.minStakeDuration - The minimum duration (in seconds) that the user's tokens are locked for
|
|
20522
|
-
* @param params.creatorSharePercent - The % share that a creator will earn from their token
|
|
20523
|
-
* @param params.ownerSharePercent - The % share that the manager owner will earn from their token
|
|
20524
|
-
* @param params.permissions - The permissions for the staking manager
|
|
20525
|
-
* @returns Transaction response
|
|
20526
|
-
*/
|
|
20527
|
-
deployStakingManager(params) {
|
|
20528
|
-
const permissionsAddress = getPermissionsAddress(params.permissions ?? exports.Permissions.OPEN, this.chainId);
|
|
20529
|
-
const VALID_SHARE_TOTAL = 10000000n; // 5 decimals as BigInt
|
|
20530
|
-
return this.contract.write("deployAndInitializeManager", {
|
|
20531
|
-
_managerImplementation: StakingManagerAddress[this.chainId],
|
|
20532
|
-
_owner: params.managerOwner,
|
|
20533
|
-
_data: viem.encodeAbiParameters([
|
|
20534
|
-
{
|
|
20535
|
-
type: "tuple",
|
|
20536
|
-
components: [
|
|
20537
|
-
{ type: "address", name: "stakingToken" },
|
|
20538
|
-
{ type: "uint256", name: "minEscrowDuration" },
|
|
20539
|
-
{ type: "uint256", name: "minStakeDuration" },
|
|
20540
|
-
{ type: "uint256", name: "creatorShare" },
|
|
20541
|
-
{ type: "uint256", name: "ownerShare" },
|
|
20542
|
-
],
|
|
20543
|
-
},
|
|
20544
|
-
], [
|
|
20545
|
-
{
|
|
20546
|
-
stakingToken: params.stakingToken,
|
|
20547
|
-
minEscrowDuration: params.minEscrowDuration,
|
|
20548
|
-
minStakeDuration: params.minStakeDuration,
|
|
20549
|
-
creatorShare: (BigInt(params.creatorSharePercent) * VALID_SHARE_TOTAL) / 100n,
|
|
20550
|
-
ownerShare: (BigInt(params.ownerSharePercent) * VALID_SHARE_TOTAL) / 100n,
|
|
20551
|
-
},
|
|
20552
|
-
]),
|
|
20553
|
-
_permissions: permissionsAddress,
|
|
20554
|
-
});
|
|
20555
|
-
}
|
|
20556
20556
|
}
|
|
20557
20557
|
|
|
20558
20558
|
const RevenueManagerAbi = [
|
|
@@ -22850,7 +22850,7 @@ class ReadWriteFlaunchSDK extends ReadFlaunchSDK {
|
|
|
22850
22850
|
* @returns Address of the deployed revenue manager
|
|
22851
22851
|
*/
|
|
22852
22852
|
async deployRevenueManager(params) {
|
|
22853
|
-
const hash = await this.
|
|
22853
|
+
const hash = await this.readWriteFlaunchZap.deployRevenueManager(params);
|
|
22854
22854
|
return await this.readWriteTreasuryManagerFactory.getManagerDeployedAddressFromTx(hash);
|
|
22855
22855
|
}
|
|
22856
22856
|
/**
|
|
@@ -22866,7 +22866,7 @@ class ReadWriteFlaunchSDK extends ReadFlaunchSDK {
|
|
|
22866
22866
|
* @returns Address of the deployed staking manager
|
|
22867
22867
|
*/
|
|
22868
22868
|
async deployStakingManager(params) {
|
|
22869
|
-
const hash = await this.
|
|
22869
|
+
const hash = await this.readWriteFlaunchZap.deployStakingManager(params);
|
|
22870
22870
|
return await this.readWriteTreasuryManagerFactory.getManagerDeployedAddressFromTx(hash);
|
|
22871
22871
|
}
|
|
22872
22872
|
/**
|