tempo.ts 0.1.5 → 0.2.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/README.md +33 -2
- package/dist/chains.d.ts +509 -115
- package/dist/chains.d.ts.map +1 -1
- package/dist/chains.js +20 -9
- package/dist/chains.js.map +1 -1
- package/dist/ox/Order.d.ts +92 -0
- package/dist/ox/Order.d.ts.map +1 -0
- package/dist/ox/Order.js +88 -0
- package/dist/ox/Order.js.map +1 -0
- package/dist/ox/OrdersFilters.d.ts +72 -0
- package/dist/ox/OrdersFilters.d.ts.map +1 -0
- package/dist/ox/OrdersFilters.js +100 -0
- package/dist/ox/OrdersFilters.js.map +1 -0
- package/dist/ox/Pagination.d.ts +128 -0
- package/dist/ox/Pagination.d.ts.map +1 -0
- package/dist/ox/Pagination.js +78 -0
- package/dist/ox/Pagination.js.map +1 -0
- package/dist/ox/PoolId.d.ts +18 -0
- package/dist/ox/PoolId.d.ts.map +1 -0
- package/dist/ox/PoolId.js +13 -0
- package/dist/ox/PoolId.js.map +1 -0
- package/dist/ox/RpcSchema.d.ts +32 -0
- package/dist/ox/RpcSchema.d.ts.map +1 -0
- package/dist/ox/RpcSchema.js +2 -0
- package/dist/ox/RpcSchema.js.map +1 -0
- package/dist/ox/SignatureEnvelope.d.ts +1 -1
- package/dist/ox/SignatureEnvelope.d.ts.map +1 -1
- package/dist/ox/SignatureEnvelope.js.map +1 -1
- package/dist/{viem → ox}/Tick.d.ts +4 -0
- package/dist/ox/Tick.d.ts.map +1 -0
- package/dist/ox/Tick.js.map +1 -0
- package/dist/ox/Transaction.d.ts.map +1 -1
- package/dist/ox/Transaction.js +2 -1
- package/dist/ox/Transaction.js.map +1 -1
- package/dist/ox/TransactionEnvelopeAA.d.ts +6 -6
- package/dist/ox/TransactionEnvelopeAA.d.ts.map +1 -1
- package/dist/ox/TransactionEnvelopeAA.js +4 -2
- package/dist/ox/TransactionEnvelopeAA.js.map +1 -1
- package/dist/ox/TransactionRequest.d.ts +4 -0
- package/dist/ox/TransactionRequest.d.ts.map +1 -1
- package/dist/ox/TransactionRequest.js.map +1 -1
- package/dist/ox/index.d.ts +6 -0
- package/dist/ox/index.d.ts.map +1 -1
- package/dist/ox/index.js +6 -0
- package/dist/ox/index.js.map +1 -1
- package/dist/prool/Instance.d.ts.map +1 -1
- package/dist/prool/Instance.js +20 -4
- package/dist/prool/Instance.js.map +1 -1
- package/dist/viem/Abis.d.ts +1469 -1082
- package/dist/viem/Abis.d.ts.map +1 -1
- package/dist/viem/Abis.js +932 -671
- package/dist/viem/Abis.js.map +1 -1
- package/dist/viem/Account.d.ts +150 -0
- package/dist/viem/Account.d.ts.map +1 -0
- package/dist/viem/Account.js +221 -0
- package/dist/viem/Account.js.map +1 -0
- package/dist/viem/Actions/amm.d.ts +144 -161
- package/dist/viem/Actions/amm.d.ts.map +1 -1
- package/dist/viem/Actions/amm.js +109 -163
- package/dist/viem/Actions/amm.js.map +1 -1
- package/dist/viem/Actions/dex.d.ts +920 -664
- package/dist/viem/Actions/dex.d.ts.map +1 -1
- package/dist/viem/Actions/dex.js +129 -30
- package/dist/viem/Actions/dex.js.map +1 -1
- package/dist/viem/Actions/faucet.d.ts +34 -0
- package/dist/viem/Actions/faucet.d.ts.map +1 -0
- package/dist/viem/Actions/faucet.js +33 -0
- package/dist/viem/Actions/faucet.js.map +1 -0
- package/dist/viem/Actions/fee.d.ts +16 -30
- package/dist/viem/Actions/fee.d.ts.map +1 -1
- package/dist/viem/Actions/fee.js +13 -13
- package/dist/viem/Actions/fee.js.map +1 -1
- package/dist/viem/Actions/index.d.ts +2 -0
- package/dist/viem/Actions/index.d.ts.map +1 -1
- package/dist/viem/Actions/index.js +2 -0
- package/dist/viem/Actions/index.js.map +1 -1
- package/dist/viem/Actions/policy.d.ts +46 -46
- package/dist/viem/Actions/policy.js +46 -46
- package/dist/viem/Actions/reward.d.ts +3236 -0
- package/dist/viem/Actions/reward.d.ts.map +1 -0
- package/dist/viem/Actions/reward.js +725 -0
- package/dist/viem/Actions/reward.js.map +1 -0
- package/dist/viem/Actions/token.d.ts +4399 -2750
- package/dist/viem/Actions/token.d.ts.map +1 -1
- package/dist/viem/Actions/token.js +361 -482
- package/dist/viem/Actions/token.js.map +1 -1
- package/dist/viem/Addresses.d.ts +1 -2
- package/dist/viem/Addresses.d.ts.map +1 -1
- package/dist/viem/Addresses.js +1 -2
- package/dist/viem/Addresses.js.map +1 -1
- package/dist/viem/Chain.d.ts +38 -12
- package/dist/viem/Chain.d.ts.map +1 -1
- package/dist/viem/Chain.js +27 -18
- package/dist/viem/Chain.js.map +1 -1
- package/dist/viem/Decorator.d.ts +1009 -428
- package/dist/viem/Decorator.d.ts.map +1 -1
- package/dist/viem/Decorator.js +17 -5
- package/dist/viem/Decorator.js.map +1 -1
- package/dist/viem/Formatters.d.ts +8 -1
- package/dist/viem/Formatters.d.ts.map +1 -1
- package/dist/viem/Formatters.js +17 -0
- package/dist/viem/Formatters.js.map +1 -1
- package/dist/viem/P256.d.ts +2 -0
- package/dist/viem/P256.d.ts.map +1 -0
- package/dist/viem/P256.js +2 -0
- package/dist/viem/P256.js.map +1 -0
- package/dist/viem/Secp256k1.d.ts +2 -0
- package/dist/viem/Secp256k1.d.ts.map +1 -0
- package/dist/viem/Secp256k1.js +2 -0
- package/dist/viem/Secp256k1.js.map +1 -0
- package/dist/viem/TokenIds.d.ts +1 -2
- package/dist/viem/TokenIds.d.ts.map +1 -1
- package/dist/viem/TokenIds.js +1 -2
- package/dist/viem/TokenIds.js.map +1 -1
- package/dist/viem/Transaction.d.ts +1 -1
- package/dist/viem/Transaction.d.ts.map +1 -1
- package/dist/viem/Transaction.js +46 -5
- package/dist/viem/Transaction.js.map +1 -1
- package/dist/viem/WebAuthnP256.d.ts +79 -0
- package/dist/viem/WebAuthnP256.d.ts.map +1 -0
- package/dist/viem/WebAuthnP256.js +95 -0
- package/dist/viem/WebAuthnP256.js.map +1 -0
- package/dist/viem/WebCryptoP256.d.ts +2 -0
- package/dist/viem/WebCryptoP256.d.ts.map +1 -0
- package/dist/viem/WebCryptoP256.js +2 -0
- package/dist/viem/WebCryptoP256.js.map +1 -0
- package/dist/viem/index.d.ts +6 -3
- package/dist/viem/index.d.ts.map +1 -1
- package/dist/viem/index.js +6 -3
- package/dist/viem/index.js.map +1 -1
- package/dist/viem/internal/account.d.ts +24 -0
- package/dist/viem/internal/account.d.ts.map +1 -0
- package/dist/viem/internal/account.js +68 -0
- package/dist/viem/internal/account.js.map +1 -0
- package/dist/viem/internal/types.d.ts +10 -0
- package/dist/viem/internal/types.d.ts.map +1 -1
- package/dist/wagmi/Actions/amm.d.ts +428 -0
- package/dist/wagmi/Actions/amm.d.ts.map +1 -0
- package/dist/wagmi/Actions/amm.js +472 -0
- package/dist/wagmi/Actions/amm.js.map +1 -0
- package/dist/wagmi/Actions/dex.d.ts +908 -0
- package/dist/wagmi/Actions/dex.d.ts.map +1 -0
- package/dist/wagmi/Actions/dex.js +1023 -0
- package/dist/wagmi/Actions/dex.js.map +1 -0
- package/dist/wagmi/Actions/faucet.d.ts +35 -0
- package/dist/wagmi/Actions/faucet.d.ts.map +1 -0
- package/dist/wagmi/Actions/faucet.js +33 -0
- package/dist/wagmi/Actions/faucet.js.map +1 -0
- package/dist/wagmi/Actions/fee.d.ts +111 -0
- package/dist/wagmi/Actions/fee.d.ts.map +1 -0
- package/dist/wagmi/Actions/fee.js +126 -0
- package/dist/wagmi/Actions/fee.js.map +1 -0
- package/dist/wagmi/Actions/index.d.ts +7 -0
- package/dist/wagmi/Actions/index.d.ts.map +1 -0
- package/dist/wagmi/Actions/index.js +7 -0
- package/dist/wagmi/Actions/index.js.map +1 -0
- package/dist/wagmi/Actions/reward.d.ts +348 -0
- package/dist/wagmi/Actions/reward.d.ts.map +1 -0
- package/dist/wagmi/Actions/reward.js +388 -0
- package/dist/wagmi/Actions/reward.js.map +1 -0
- package/dist/wagmi/Actions/token.d.ts +1546 -0
- package/dist/wagmi/Actions/token.d.ts.map +1 -0
- package/dist/wagmi/Actions/token.js +1712 -0
- package/dist/wagmi/Actions/token.js.map +1 -0
- package/dist/wagmi/Connector.d.ts +81 -0
- package/dist/wagmi/Connector.d.ts.map +1 -0
- package/dist/wagmi/Connector.js +261 -0
- package/dist/wagmi/Connector.js.map +1 -0
- package/dist/wagmi/Hooks/amm.d.ts +421 -0
- package/dist/wagmi/Hooks/amm.d.ts.map +1 -0
- package/dist/wagmi/Hooks/amm.js +504 -0
- package/dist/wagmi/Hooks/amm.js.map +1 -0
- package/dist/wagmi/Hooks/dex.d.ts +816 -0
- package/dist/wagmi/Hooks/dex.d.ts.map +1 -0
- package/dist/wagmi/Hooks/dex.js +973 -0
- package/dist/wagmi/Hooks/dex.js.map +1 -0
- package/dist/wagmi/Hooks/faucet.d.ts +39 -0
- package/dist/wagmi/Hooks/faucet.d.ts.map +1 -0
- package/dist/wagmi/Hooks/faucet.js +40 -0
- package/dist/wagmi/Hooks/faucet.js.map +1 -0
- package/dist/wagmi/Hooks/fee.d.ts +97 -0
- package/dist/wagmi/Hooks/fee.d.ts.map +1 -0
- package/dist/wagmi/Hooks/fee.js +109 -0
- package/dist/wagmi/Hooks/fee.js.map +1 -0
- package/dist/wagmi/Hooks/index.d.ts +7 -0
- package/dist/wagmi/Hooks/index.d.ts.map +1 -0
- package/dist/wagmi/Hooks/index.js +7 -0
- package/dist/wagmi/Hooks/index.js.map +1 -0
- package/dist/wagmi/Hooks/reward.d.ts +307 -0
- package/dist/wagmi/Hooks/reward.d.ts.map +1 -0
- package/dist/wagmi/Hooks/reward.js +349 -0
- package/dist/wagmi/Hooks/reward.js.map +1 -0
- package/dist/wagmi/Hooks/token.d.ts +1388 -0
- package/dist/wagmi/Hooks/token.d.ts.map +1 -0
- package/dist/wagmi/Hooks/token.js +1657 -0
- package/dist/wagmi/Hooks/token.js.map +1 -0
- package/dist/wagmi/index.d.ts +4 -0
- package/dist/wagmi/index.d.ts.map +1 -0
- package/dist/wagmi/index.js +4 -0
- package/dist/wagmi/index.js.map +1 -0
- package/package.json +54 -10
- package/src/chains.ts +21 -9
- package/src/ox/Order.test.ts +78 -0
- package/src/ox/Order.ts +125 -0
- package/src/ox/OrdersFilters.test.ts +182 -0
- package/src/ox/OrdersFilters.ts +125 -0
- package/src/ox/Pagination.test.ts +162 -0
- package/src/ox/Pagination.ts +164 -0
- package/src/ox/PoolId.test.ts +33 -0
- package/src/ox/PoolId.ts +27 -0
- package/src/ox/RpcSchema.ts +35 -0
- package/src/ox/SignatureEnvelope.ts +3 -1
- package/src/{viem → ox}/Tick.test.ts +1 -1
- package/src/{viem → ox}/Tick.ts +5 -0
- package/src/ox/Transaction.test.ts +1 -1
- package/src/ox/Transaction.ts +2 -1
- package/src/ox/TransactionEnvelopeAA.test.ts +239 -96
- package/src/ox/TransactionEnvelopeAA.ts +9 -7
- package/src/ox/TransactionRequest.ts +4 -0
- package/src/ox/index.ts +6 -0
- package/src/prool/Instance.ts +51 -37
- package/src/prool/internal/chain.json +104 -52
- package/src/tsconfig.json +9 -0
- package/src/viem/Abis.ts +972 -710
- package/src/viem/Account.ts +279 -0
- package/src/viem/Actions/__snapshots__/dex.test.ts.snap +850 -0
- package/src/viem/Actions/amm.test.ts +173 -169
- package/src/viem/Actions/amm.ts +131 -203
- package/src/viem/Actions/dex.test.ts +563 -484
- package/src/viem/Actions/dex.ts +203 -30
- package/src/viem/Actions/faucet.ts +50 -0
- package/src/viem/Actions/fee.test.ts +23 -34
- package/src/viem/Actions/fee.ts +20 -13
- package/src/viem/Actions/index.ts +2 -0
- package/src/viem/Actions/policy.test.ts +19 -33
- package/src/viem/Actions/policy.ts +46 -46
- package/src/viem/Actions/reward.test.ts +457 -0
- package/src/viem/Actions/reward.ts +999 -0
- package/src/viem/Actions/token.test.ts +453 -287
- package/src/viem/Actions/token.ts +605 -693
- package/src/viem/Addresses.ts +1 -2
- package/src/viem/Chain.bench-d.ts +12 -0
- package/src/viem/Chain.ts +70 -20
- package/src/viem/Decorator.bench-d.ts +1 -1
- package/src/viem/Decorator.test.ts +3 -1
- package/src/viem/Decorator.ts +1049 -442
- package/src/viem/Formatters.ts +31 -5
- package/src/viem/P256.ts +1 -0
- package/src/viem/Secp256k1.ts +1 -0
- package/src/viem/TokenIds.ts +1 -2
- package/src/viem/Transaction.ts +53 -7
- package/src/viem/WebAuthnP256.ts +140 -0
- package/src/viem/WebCryptoP256.ts +1 -0
- package/src/viem/e2e.test.ts +1126 -297
- package/src/viem/index.ts +6 -3
- package/src/viem/internal/account.ts +107 -0
- package/src/viem/internal/types.ts +9 -0
- package/src/wagmi/Actions/__snapshots__/dex.test.ts.snap +310 -0
- package/src/wagmi/Actions/amm.test.ts +198 -0
- package/src/wagmi/Actions/amm.ts +691 -0
- package/src/wagmi/Actions/dex.test.ts +1507 -0
- package/src/wagmi/Actions/dex.ts +1640 -0
- package/src/wagmi/Actions/faucet.ts +46 -0
- package/src/wagmi/Actions/fee.test.ts +63 -0
- package/src/wagmi/Actions/fee.ts +208 -0
- package/src/wagmi/Actions/index.ts +6 -0
- package/src/wagmi/Actions/reward.test.ts +210 -0
- package/src/wagmi/Actions/reward.ts +632 -0
- package/src/wagmi/Actions/token.test.ts +1308 -0
- package/src/wagmi/Actions/token.ts +2613 -0
- package/src/wagmi/Connector.test.ts +53 -0
- package/src/wagmi/Connector.ts +390 -0
- package/src/wagmi/Hooks/__snapshots__/dex.test.ts.snap +457 -0
- package/src/wagmi/Hooks/amm.test.ts +424 -0
- package/src/wagmi/Hooks/amm.ts +806 -0
- package/src/wagmi/Hooks/dex.test.ts +1017 -0
- package/src/wagmi/Hooks/dex.ts +1685 -0
- package/src/wagmi/Hooks/faucet.ts +76 -0
- package/src/wagmi/Hooks/fee.test.ts +166 -0
- package/src/wagmi/Hooks/fee.ts +206 -0
- package/src/wagmi/Hooks/index.ts +6 -0
- package/src/wagmi/Hooks/reward.test.ts +219 -0
- package/src/wagmi/Hooks/reward.ts +672 -0
- package/src/wagmi/Hooks/token.test.ts +1670 -0
- package/src/wagmi/Hooks/token.ts +2906 -0
- package/src/wagmi/index.ts +3 -0
- package/src/wagmi/internal/types.ts +16 -0
- package/dist/viem/Client.d.ts +0 -27
- package/dist/viem/Client.d.ts.map +0 -1
- package/dist/viem/Client.js +0 -28
- package/dist/viem/Client.js.map +0 -1
- package/dist/viem/Tick.d.ts.map +0 -1
- package/dist/viem/Tick.js.map +0 -1
- package/src/viem/Client.bench-d.ts +0 -8
- package/src/viem/Client.test.ts +0 -178
- package/src/viem/Client.ts +0 -91
- /package/dist/{viem → ox}/Tick.js +0 -0
|
@@ -0,0 +1,3236 @@
|
|
|
1
|
+
import { type Account, type Address, type BaseErrorType, type Chain, type Client, type Log, type ReadContractReturnType, type Transport, type WriteContractReturnType } from 'viem';
|
|
2
|
+
import { writeContract, writeContractSync } from 'viem/actions';
|
|
3
|
+
import * as Abis from '../Abis.js';
|
|
4
|
+
import type { ReadParameters, WriteParameters } from '../internal/types.js';
|
|
5
|
+
/**
|
|
6
|
+
* Cancels an active reward stream and refunds remaining tokens.
|
|
7
|
+
*
|
|
8
|
+
* - Callable only by the stream's funder.
|
|
9
|
+
* - Stops future emission for the stream at the current block timestamp.
|
|
10
|
+
* - Computes the refund as `amountTotal - distributedSoFar` and attempts to transfer it back to the funder.
|
|
11
|
+
* - If the refund transfer is forbidden by TIP-403, the stream is still canceled but `refund` will be 0 in the event.
|
|
12
|
+
* - Reverts with `StreamInactive` if the stream doesn't exist, is already canceled, or has already ended.
|
|
13
|
+
* - Reverts with `NotStreamFunder` if the caller is not the stream's funder.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* import { createClient, http } from 'viem'
|
|
18
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
19
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
20
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
21
|
+
*
|
|
22
|
+
* const client = createClient({
|
|
23
|
+
* account: privateKeyToAccount('0x...'),
|
|
24
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
25
|
+
* transport: http(),
|
|
26
|
+
* })
|
|
27
|
+
*
|
|
28
|
+
* const hash = await Actions.rewards.cancel(client, {
|
|
29
|
+
* id: 1n,
|
|
30
|
+
* token: '0x20c0000000000000000000000000000000000001',
|
|
31
|
+
* })
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* @param client - Client.
|
|
35
|
+
* @param parameters - Parameters.
|
|
36
|
+
* @returns The transaction hash.
|
|
37
|
+
*/
|
|
38
|
+
export declare function cancel<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters: cancel.Parameters<chain, account>): Promise<cancel.ReturnValue>;
|
|
39
|
+
/**
|
|
40
|
+
* Cancels an active reward stream and waits for confirmation.
|
|
41
|
+
*
|
|
42
|
+
* - Callable only by the stream's funder.
|
|
43
|
+
* - Stops future emission for the stream at the current block timestamp.
|
|
44
|
+
* - Computes the refund as `amountTotal - distributedSoFar` and attempts to transfer it back to the funder.
|
|
45
|
+
* - If the refund transfer is forbidden by TIP-403, the stream is still canceled but `refund` will be 0.
|
|
46
|
+
* - Reverts with `StreamInactive` if the stream doesn't exist, is already canceled, or has already ended.
|
|
47
|
+
* - Reverts with `NotStreamFunder` if the caller is not the stream's funder.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* import { createClient, http } from 'viem'
|
|
52
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
53
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
54
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
55
|
+
*
|
|
56
|
+
* const client = createClient({
|
|
57
|
+
* account: privateKeyToAccount('0x...'),
|
|
58
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
59
|
+
* transport: http(),
|
|
60
|
+
* })
|
|
61
|
+
*
|
|
62
|
+
* const { funder, id, refund, receipt } = await Actions.rewards.cancelSync(client, {
|
|
63
|
+
* id: 1n,
|
|
64
|
+
* token: '0x20c0000000000000000000000000000000000001',
|
|
65
|
+
* })
|
|
66
|
+
* ```
|
|
67
|
+
*
|
|
68
|
+
* @param client - Client.
|
|
69
|
+
* @param parameters - Parameters.
|
|
70
|
+
* @returns The funder, stream ID, refund amount, and transaction receipt.
|
|
71
|
+
*/
|
|
72
|
+
export declare function cancelSync<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters: cancelSync.Parameters<chain, account>): Promise<cancelSync.ReturnValue>;
|
|
73
|
+
export declare namespace cancel {
|
|
74
|
+
type Args = {
|
|
75
|
+
/** The unique stream ID to cancel (must be owned by the caller) */
|
|
76
|
+
id: bigint;
|
|
77
|
+
/** The TIP20 token address containing the reward stream */
|
|
78
|
+
token: Address;
|
|
79
|
+
};
|
|
80
|
+
type Parameters<chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined> = WriteParameters<chain, account> & Args;
|
|
81
|
+
type ReturnValue = WriteContractReturnType;
|
|
82
|
+
type ErrorType = BaseErrorType;
|
|
83
|
+
/** @internal */
|
|
84
|
+
function inner<action extends typeof writeContract | typeof writeContractSync, chain extends Chain | undefined, account extends Account | undefined>(action: action, client: Client<Transport, chain, account>, parameters: Parameters<chain, account>): Promise<ReturnType<action>>;
|
|
85
|
+
/**
|
|
86
|
+
* Defines a call to the `cancel` function.
|
|
87
|
+
*
|
|
88
|
+
* Can be passed as a parameter to:
|
|
89
|
+
* - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call
|
|
90
|
+
* - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call
|
|
91
|
+
* - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls
|
|
92
|
+
*
|
|
93
|
+
* @example
|
|
94
|
+
* ```ts
|
|
95
|
+
* import { createClient, http, walletActions } from 'viem'
|
|
96
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
97
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
98
|
+
*
|
|
99
|
+
* const client = createClient({
|
|
100
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
101
|
+
* transport: http(),
|
|
102
|
+
* }).extend(walletActions)
|
|
103
|
+
*
|
|
104
|
+
* const hash = await client.sendTransaction({
|
|
105
|
+
* calls: [actions.rewards.cancel.call({
|
|
106
|
+
* id: 1n,
|
|
107
|
+
* token: '0x20c0000000000000000000000000000000000001',
|
|
108
|
+
* })],
|
|
109
|
+
* })
|
|
110
|
+
* ```
|
|
111
|
+
*
|
|
112
|
+
* @param args - Arguments.
|
|
113
|
+
* @returns The call.
|
|
114
|
+
*/
|
|
115
|
+
function call(args: Args): {
|
|
116
|
+
abi: [{
|
|
117
|
+
readonly name: "cancelReward";
|
|
118
|
+
readonly type: "function";
|
|
119
|
+
readonly stateMutability: "nonpayable";
|
|
120
|
+
readonly inputs: readonly [{
|
|
121
|
+
readonly type: "uint64";
|
|
122
|
+
readonly name: "id";
|
|
123
|
+
}];
|
|
124
|
+
readonly outputs: readonly [{
|
|
125
|
+
readonly type: "uint256";
|
|
126
|
+
}];
|
|
127
|
+
}];
|
|
128
|
+
functionName: "cancelReward";
|
|
129
|
+
args?: readonly [bigint] | undefined;
|
|
130
|
+
} & {
|
|
131
|
+
args: readonly [bigint];
|
|
132
|
+
} & {
|
|
133
|
+
address: Address;
|
|
134
|
+
} & {
|
|
135
|
+
data: import("viem").Hex;
|
|
136
|
+
to: Address;
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* Extracts the `RewardCanceled` event from logs.
|
|
140
|
+
*
|
|
141
|
+
* @param logs - The logs.
|
|
142
|
+
* @returns The `RewardCanceled` event.
|
|
143
|
+
*/
|
|
144
|
+
function extractEvent(logs: Log[]): Log<bigint, number, false, undefined, true, readonly [{
|
|
145
|
+
readonly name: "name";
|
|
146
|
+
readonly type: "function";
|
|
147
|
+
readonly stateMutability: "view";
|
|
148
|
+
readonly inputs: readonly [];
|
|
149
|
+
readonly outputs: readonly [{
|
|
150
|
+
readonly type: "string";
|
|
151
|
+
}];
|
|
152
|
+
}, {
|
|
153
|
+
readonly name: "symbol";
|
|
154
|
+
readonly type: "function";
|
|
155
|
+
readonly stateMutability: "view";
|
|
156
|
+
readonly inputs: readonly [];
|
|
157
|
+
readonly outputs: readonly [{
|
|
158
|
+
readonly type: "string";
|
|
159
|
+
}];
|
|
160
|
+
}, {
|
|
161
|
+
readonly name: "decimals";
|
|
162
|
+
readonly type: "function";
|
|
163
|
+
readonly stateMutability: "view";
|
|
164
|
+
readonly inputs: readonly [];
|
|
165
|
+
readonly outputs: readonly [{
|
|
166
|
+
readonly type: "uint8";
|
|
167
|
+
}];
|
|
168
|
+
}, {
|
|
169
|
+
readonly name: "totalSupply";
|
|
170
|
+
readonly type: "function";
|
|
171
|
+
readonly stateMutability: "view";
|
|
172
|
+
readonly inputs: readonly [];
|
|
173
|
+
readonly outputs: readonly [{
|
|
174
|
+
readonly type: "uint256";
|
|
175
|
+
}];
|
|
176
|
+
}, {
|
|
177
|
+
readonly name: "quoteToken";
|
|
178
|
+
readonly type: "function";
|
|
179
|
+
readonly stateMutability: "view";
|
|
180
|
+
readonly inputs: readonly [];
|
|
181
|
+
readonly outputs: readonly [{
|
|
182
|
+
readonly type: "address";
|
|
183
|
+
}];
|
|
184
|
+
}, {
|
|
185
|
+
readonly name: "nextQuoteToken";
|
|
186
|
+
readonly type: "function";
|
|
187
|
+
readonly stateMutability: "view";
|
|
188
|
+
readonly inputs: readonly [];
|
|
189
|
+
readonly outputs: readonly [{
|
|
190
|
+
readonly type: "address";
|
|
191
|
+
}];
|
|
192
|
+
}, {
|
|
193
|
+
readonly name: "balanceOf";
|
|
194
|
+
readonly type: "function";
|
|
195
|
+
readonly stateMutability: "view";
|
|
196
|
+
readonly inputs: readonly [{
|
|
197
|
+
readonly type: "address";
|
|
198
|
+
readonly name: "account";
|
|
199
|
+
}];
|
|
200
|
+
readonly outputs: readonly [{
|
|
201
|
+
readonly type: "uint256";
|
|
202
|
+
}];
|
|
203
|
+
}, {
|
|
204
|
+
readonly name: "transfer";
|
|
205
|
+
readonly type: "function";
|
|
206
|
+
readonly stateMutability: "nonpayable";
|
|
207
|
+
readonly inputs: readonly [{
|
|
208
|
+
readonly type: "address";
|
|
209
|
+
readonly name: "to";
|
|
210
|
+
}, {
|
|
211
|
+
readonly type: "uint256";
|
|
212
|
+
readonly name: "amount";
|
|
213
|
+
}];
|
|
214
|
+
readonly outputs: readonly [{
|
|
215
|
+
readonly type: "bool";
|
|
216
|
+
}];
|
|
217
|
+
}, {
|
|
218
|
+
readonly name: "approve";
|
|
219
|
+
readonly type: "function";
|
|
220
|
+
readonly stateMutability: "nonpayable";
|
|
221
|
+
readonly inputs: readonly [{
|
|
222
|
+
readonly type: "address";
|
|
223
|
+
readonly name: "spender";
|
|
224
|
+
}, {
|
|
225
|
+
readonly type: "uint256";
|
|
226
|
+
readonly name: "amount";
|
|
227
|
+
}];
|
|
228
|
+
readonly outputs: readonly [{
|
|
229
|
+
readonly type: "bool";
|
|
230
|
+
}];
|
|
231
|
+
}, {
|
|
232
|
+
readonly name: "allowance";
|
|
233
|
+
readonly type: "function";
|
|
234
|
+
readonly stateMutability: "view";
|
|
235
|
+
readonly inputs: readonly [{
|
|
236
|
+
readonly type: "address";
|
|
237
|
+
readonly name: "owner";
|
|
238
|
+
}, {
|
|
239
|
+
readonly type: "address";
|
|
240
|
+
readonly name: "spender";
|
|
241
|
+
}];
|
|
242
|
+
readonly outputs: readonly [{
|
|
243
|
+
readonly type: "uint256";
|
|
244
|
+
}];
|
|
245
|
+
}, {
|
|
246
|
+
readonly name: "transferFrom";
|
|
247
|
+
readonly type: "function";
|
|
248
|
+
readonly stateMutability: "nonpayable";
|
|
249
|
+
readonly inputs: readonly [{
|
|
250
|
+
readonly type: "address";
|
|
251
|
+
readonly name: "from";
|
|
252
|
+
}, {
|
|
253
|
+
readonly type: "address";
|
|
254
|
+
readonly name: "to";
|
|
255
|
+
}, {
|
|
256
|
+
readonly type: "uint256";
|
|
257
|
+
readonly name: "amount";
|
|
258
|
+
}];
|
|
259
|
+
readonly outputs: readonly [{
|
|
260
|
+
readonly type: "bool";
|
|
261
|
+
}];
|
|
262
|
+
}, {
|
|
263
|
+
readonly name: "mint";
|
|
264
|
+
readonly type: "function";
|
|
265
|
+
readonly stateMutability: "nonpayable";
|
|
266
|
+
readonly inputs: readonly [{
|
|
267
|
+
readonly type: "address";
|
|
268
|
+
readonly name: "to";
|
|
269
|
+
}, {
|
|
270
|
+
readonly type: "uint256";
|
|
271
|
+
readonly name: "amount";
|
|
272
|
+
}];
|
|
273
|
+
readonly outputs: readonly [];
|
|
274
|
+
}, {
|
|
275
|
+
readonly name: "burn";
|
|
276
|
+
readonly type: "function";
|
|
277
|
+
readonly stateMutability: "nonpayable";
|
|
278
|
+
readonly inputs: readonly [{
|
|
279
|
+
readonly type: "uint256";
|
|
280
|
+
readonly name: "amount";
|
|
281
|
+
}];
|
|
282
|
+
readonly outputs: readonly [];
|
|
283
|
+
}, {
|
|
284
|
+
readonly name: "currency";
|
|
285
|
+
readonly type: "function";
|
|
286
|
+
readonly stateMutability: "view";
|
|
287
|
+
readonly inputs: readonly [];
|
|
288
|
+
readonly outputs: readonly [{
|
|
289
|
+
readonly type: "string";
|
|
290
|
+
}];
|
|
291
|
+
}, {
|
|
292
|
+
readonly name: "supplyCap";
|
|
293
|
+
readonly type: "function";
|
|
294
|
+
readonly stateMutability: "view";
|
|
295
|
+
readonly inputs: readonly [];
|
|
296
|
+
readonly outputs: readonly [{
|
|
297
|
+
readonly type: "uint256";
|
|
298
|
+
}];
|
|
299
|
+
}, {
|
|
300
|
+
readonly name: "paused";
|
|
301
|
+
readonly type: "function";
|
|
302
|
+
readonly stateMutability: "view";
|
|
303
|
+
readonly inputs: readonly [];
|
|
304
|
+
readonly outputs: readonly [{
|
|
305
|
+
readonly type: "bool";
|
|
306
|
+
}];
|
|
307
|
+
}, {
|
|
308
|
+
readonly name: "transferPolicyId";
|
|
309
|
+
readonly type: "function";
|
|
310
|
+
readonly stateMutability: "view";
|
|
311
|
+
readonly inputs: readonly [];
|
|
312
|
+
readonly outputs: readonly [{
|
|
313
|
+
readonly type: "uint64";
|
|
314
|
+
}];
|
|
315
|
+
}, {
|
|
316
|
+
readonly name: "burnBlocked";
|
|
317
|
+
readonly type: "function";
|
|
318
|
+
readonly stateMutability: "nonpayable";
|
|
319
|
+
readonly inputs: readonly [{
|
|
320
|
+
readonly type: "address";
|
|
321
|
+
readonly name: "from";
|
|
322
|
+
}, {
|
|
323
|
+
readonly type: "uint256";
|
|
324
|
+
readonly name: "amount";
|
|
325
|
+
}];
|
|
326
|
+
readonly outputs: readonly [];
|
|
327
|
+
}, {
|
|
328
|
+
readonly name: "mintWithMemo";
|
|
329
|
+
readonly type: "function";
|
|
330
|
+
readonly stateMutability: "nonpayable";
|
|
331
|
+
readonly inputs: readonly [{
|
|
332
|
+
readonly type: "address";
|
|
333
|
+
readonly name: "to";
|
|
334
|
+
}, {
|
|
335
|
+
readonly type: "uint256";
|
|
336
|
+
readonly name: "amount";
|
|
337
|
+
}, {
|
|
338
|
+
readonly type: "bytes32";
|
|
339
|
+
readonly name: "memo";
|
|
340
|
+
}];
|
|
341
|
+
readonly outputs: readonly [];
|
|
342
|
+
}, {
|
|
343
|
+
readonly name: "burnWithMemo";
|
|
344
|
+
readonly type: "function";
|
|
345
|
+
readonly stateMutability: "nonpayable";
|
|
346
|
+
readonly inputs: readonly [{
|
|
347
|
+
readonly type: "uint256";
|
|
348
|
+
readonly name: "amount";
|
|
349
|
+
}, {
|
|
350
|
+
readonly type: "bytes32";
|
|
351
|
+
readonly name: "memo";
|
|
352
|
+
}];
|
|
353
|
+
readonly outputs: readonly [];
|
|
354
|
+
}, {
|
|
355
|
+
readonly name: "transferWithMemo";
|
|
356
|
+
readonly type: "function";
|
|
357
|
+
readonly stateMutability: "nonpayable";
|
|
358
|
+
readonly inputs: readonly [{
|
|
359
|
+
readonly type: "address";
|
|
360
|
+
readonly name: "to";
|
|
361
|
+
}, {
|
|
362
|
+
readonly type: "uint256";
|
|
363
|
+
readonly name: "amount";
|
|
364
|
+
}, {
|
|
365
|
+
readonly type: "bytes32";
|
|
366
|
+
readonly name: "memo";
|
|
367
|
+
}];
|
|
368
|
+
readonly outputs: readonly [];
|
|
369
|
+
}, {
|
|
370
|
+
readonly name: "transferFromWithMemo";
|
|
371
|
+
readonly type: "function";
|
|
372
|
+
readonly stateMutability: "nonpayable";
|
|
373
|
+
readonly inputs: readonly [{
|
|
374
|
+
readonly type: "address";
|
|
375
|
+
readonly name: "from";
|
|
376
|
+
}, {
|
|
377
|
+
readonly type: "address";
|
|
378
|
+
readonly name: "to";
|
|
379
|
+
}, {
|
|
380
|
+
readonly type: "uint256";
|
|
381
|
+
readonly name: "amount";
|
|
382
|
+
}, {
|
|
383
|
+
readonly type: "bytes32";
|
|
384
|
+
readonly name: "memo";
|
|
385
|
+
}];
|
|
386
|
+
readonly outputs: readonly [{
|
|
387
|
+
readonly type: "bool";
|
|
388
|
+
}];
|
|
389
|
+
}, {
|
|
390
|
+
readonly name: "changeTransferPolicyId";
|
|
391
|
+
readonly type: "function";
|
|
392
|
+
readonly stateMutability: "nonpayable";
|
|
393
|
+
readonly inputs: readonly [{
|
|
394
|
+
readonly type: "uint64";
|
|
395
|
+
readonly name: "newPolicyId";
|
|
396
|
+
}];
|
|
397
|
+
readonly outputs: readonly [];
|
|
398
|
+
}, {
|
|
399
|
+
readonly name: "setSupplyCap";
|
|
400
|
+
readonly type: "function";
|
|
401
|
+
readonly stateMutability: "nonpayable";
|
|
402
|
+
readonly inputs: readonly [{
|
|
403
|
+
readonly type: "uint256";
|
|
404
|
+
readonly name: "newSupplyCap";
|
|
405
|
+
}];
|
|
406
|
+
readonly outputs: readonly [];
|
|
407
|
+
}, {
|
|
408
|
+
readonly name: "pause";
|
|
409
|
+
readonly type: "function";
|
|
410
|
+
readonly stateMutability: "nonpayable";
|
|
411
|
+
readonly inputs: readonly [];
|
|
412
|
+
readonly outputs: readonly [];
|
|
413
|
+
}, {
|
|
414
|
+
readonly name: "unpause";
|
|
415
|
+
readonly type: "function";
|
|
416
|
+
readonly stateMutability: "nonpayable";
|
|
417
|
+
readonly inputs: readonly [];
|
|
418
|
+
readonly outputs: readonly [];
|
|
419
|
+
}, {
|
|
420
|
+
readonly name: "setNextQuoteToken";
|
|
421
|
+
readonly type: "function";
|
|
422
|
+
readonly stateMutability: "nonpayable";
|
|
423
|
+
readonly inputs: readonly [{
|
|
424
|
+
readonly type: "address";
|
|
425
|
+
readonly name: "newQuoteToken";
|
|
426
|
+
}];
|
|
427
|
+
readonly outputs: readonly [];
|
|
428
|
+
}, {
|
|
429
|
+
readonly name: "completeQuoteTokenUpdate";
|
|
430
|
+
readonly type: "function";
|
|
431
|
+
readonly stateMutability: "nonpayable";
|
|
432
|
+
readonly inputs: readonly [];
|
|
433
|
+
readonly outputs: readonly [];
|
|
434
|
+
}, {
|
|
435
|
+
readonly name: "PAUSE_ROLE";
|
|
436
|
+
readonly type: "function";
|
|
437
|
+
readonly stateMutability: "view";
|
|
438
|
+
readonly inputs: readonly [];
|
|
439
|
+
readonly outputs: readonly [{
|
|
440
|
+
readonly type: "bytes32";
|
|
441
|
+
}];
|
|
442
|
+
}, {
|
|
443
|
+
readonly name: "UNPAUSE_ROLE";
|
|
444
|
+
readonly type: "function";
|
|
445
|
+
readonly stateMutability: "view";
|
|
446
|
+
readonly inputs: readonly [];
|
|
447
|
+
readonly outputs: readonly [{
|
|
448
|
+
readonly type: "bytes32";
|
|
449
|
+
}];
|
|
450
|
+
}, {
|
|
451
|
+
readonly name: "ISSUER_ROLE";
|
|
452
|
+
readonly type: "function";
|
|
453
|
+
readonly stateMutability: "view";
|
|
454
|
+
readonly inputs: readonly [];
|
|
455
|
+
readonly outputs: readonly [{
|
|
456
|
+
readonly type: "bytes32";
|
|
457
|
+
}];
|
|
458
|
+
}, {
|
|
459
|
+
readonly name: "BURN_BLOCKED_ROLE";
|
|
460
|
+
readonly type: "function";
|
|
461
|
+
readonly stateMutability: "view";
|
|
462
|
+
readonly inputs: readonly [];
|
|
463
|
+
readonly outputs: readonly [{
|
|
464
|
+
readonly type: "bytes32";
|
|
465
|
+
}];
|
|
466
|
+
}, {
|
|
467
|
+
readonly name: "startReward";
|
|
468
|
+
readonly type: "function";
|
|
469
|
+
readonly stateMutability: "nonpayable";
|
|
470
|
+
readonly inputs: readonly [{
|
|
471
|
+
readonly type: "uint256";
|
|
472
|
+
readonly name: "amount";
|
|
473
|
+
}, {
|
|
474
|
+
readonly type: "uint32";
|
|
475
|
+
readonly name: "secs";
|
|
476
|
+
}];
|
|
477
|
+
readonly outputs: readonly [{
|
|
478
|
+
readonly type: "uint64";
|
|
479
|
+
}];
|
|
480
|
+
}, {
|
|
481
|
+
readonly name: "setRewardRecipient";
|
|
482
|
+
readonly type: "function";
|
|
483
|
+
readonly stateMutability: "nonpayable";
|
|
484
|
+
readonly inputs: readonly [{
|
|
485
|
+
readonly type: "address";
|
|
486
|
+
readonly name: "recipient";
|
|
487
|
+
}];
|
|
488
|
+
readonly outputs: readonly [];
|
|
489
|
+
}, {
|
|
490
|
+
readonly name: "cancelReward";
|
|
491
|
+
readonly type: "function";
|
|
492
|
+
readonly stateMutability: "nonpayable";
|
|
493
|
+
readonly inputs: readonly [{
|
|
494
|
+
readonly type: "uint64";
|
|
495
|
+
readonly name: "id";
|
|
496
|
+
}];
|
|
497
|
+
readonly outputs: readonly [{
|
|
498
|
+
readonly type: "uint256";
|
|
499
|
+
}];
|
|
500
|
+
}, {
|
|
501
|
+
readonly name: "claimRewards";
|
|
502
|
+
readonly type: "function";
|
|
503
|
+
readonly stateMutability: "nonpayable";
|
|
504
|
+
readonly inputs: readonly [];
|
|
505
|
+
readonly outputs: readonly [{
|
|
506
|
+
readonly type: "uint256";
|
|
507
|
+
}];
|
|
508
|
+
}, {
|
|
509
|
+
readonly name: "finalizeStreams";
|
|
510
|
+
readonly type: "function";
|
|
511
|
+
readonly stateMutability: "nonpayable";
|
|
512
|
+
readonly inputs: readonly [{
|
|
513
|
+
readonly type: "uint64";
|
|
514
|
+
readonly name: "timestamp";
|
|
515
|
+
}];
|
|
516
|
+
readonly outputs: readonly [];
|
|
517
|
+
}, {
|
|
518
|
+
readonly name: "getStream";
|
|
519
|
+
readonly type: "function";
|
|
520
|
+
readonly stateMutability: "view";
|
|
521
|
+
readonly inputs: readonly [{
|
|
522
|
+
readonly type: "uint64";
|
|
523
|
+
readonly name: "id";
|
|
524
|
+
}];
|
|
525
|
+
readonly outputs: readonly [{
|
|
526
|
+
readonly type: "tuple";
|
|
527
|
+
readonly components: readonly [{
|
|
528
|
+
readonly type: "address";
|
|
529
|
+
readonly name: "funder";
|
|
530
|
+
}, {
|
|
531
|
+
readonly type: "uint64";
|
|
532
|
+
readonly name: "startTime";
|
|
533
|
+
}, {
|
|
534
|
+
readonly type: "uint64";
|
|
535
|
+
readonly name: "endTime";
|
|
536
|
+
}, {
|
|
537
|
+
readonly type: "uint256";
|
|
538
|
+
readonly name: "ratePerSecondScaled";
|
|
539
|
+
}, {
|
|
540
|
+
readonly type: "uint256";
|
|
541
|
+
readonly name: "amountTotal";
|
|
542
|
+
}];
|
|
543
|
+
}];
|
|
544
|
+
}, {
|
|
545
|
+
readonly name: "totalRewardPerSecond";
|
|
546
|
+
readonly type: "function";
|
|
547
|
+
readonly stateMutability: "view";
|
|
548
|
+
readonly inputs: readonly [];
|
|
549
|
+
readonly outputs: readonly [{
|
|
550
|
+
readonly type: "uint256";
|
|
551
|
+
}];
|
|
552
|
+
}, {
|
|
553
|
+
readonly name: "optedInSupply";
|
|
554
|
+
readonly type: "function";
|
|
555
|
+
readonly stateMutability: "view";
|
|
556
|
+
readonly inputs: readonly [];
|
|
557
|
+
readonly outputs: readonly [{
|
|
558
|
+
readonly type: "uint128";
|
|
559
|
+
}];
|
|
560
|
+
}, {
|
|
561
|
+
readonly name: "nextStreamId";
|
|
562
|
+
readonly type: "function";
|
|
563
|
+
readonly stateMutability: "view";
|
|
564
|
+
readonly inputs: readonly [];
|
|
565
|
+
readonly outputs: readonly [{
|
|
566
|
+
readonly type: "uint64";
|
|
567
|
+
}];
|
|
568
|
+
}, {
|
|
569
|
+
readonly name: "userRewardInfo";
|
|
570
|
+
readonly type: "function";
|
|
571
|
+
readonly stateMutability: "view";
|
|
572
|
+
readonly inputs: readonly [{
|
|
573
|
+
readonly type: "address";
|
|
574
|
+
readonly name: "account";
|
|
575
|
+
}];
|
|
576
|
+
readonly outputs: readonly [{
|
|
577
|
+
readonly type: "tuple";
|
|
578
|
+
readonly components: readonly [{
|
|
579
|
+
readonly type: "address";
|
|
580
|
+
readonly name: "delegatedRecipient";
|
|
581
|
+
}, {
|
|
582
|
+
readonly type: "uint256";
|
|
583
|
+
readonly name: "rewardPerToken";
|
|
584
|
+
}, {
|
|
585
|
+
readonly type: "uint256";
|
|
586
|
+
readonly name: "rewardBalance";
|
|
587
|
+
}];
|
|
588
|
+
}];
|
|
589
|
+
}, {
|
|
590
|
+
readonly name: "Transfer";
|
|
591
|
+
readonly type: "event";
|
|
592
|
+
readonly inputs: readonly [{
|
|
593
|
+
readonly type: "address";
|
|
594
|
+
readonly name: "from";
|
|
595
|
+
readonly indexed: true;
|
|
596
|
+
}, {
|
|
597
|
+
readonly type: "address";
|
|
598
|
+
readonly name: "to";
|
|
599
|
+
readonly indexed: true;
|
|
600
|
+
}, {
|
|
601
|
+
readonly type: "uint256";
|
|
602
|
+
readonly name: "amount";
|
|
603
|
+
}];
|
|
604
|
+
}, {
|
|
605
|
+
readonly name: "Approval";
|
|
606
|
+
readonly type: "event";
|
|
607
|
+
readonly inputs: readonly [{
|
|
608
|
+
readonly type: "address";
|
|
609
|
+
readonly name: "owner";
|
|
610
|
+
readonly indexed: true;
|
|
611
|
+
}, {
|
|
612
|
+
readonly type: "address";
|
|
613
|
+
readonly name: "spender";
|
|
614
|
+
readonly indexed: true;
|
|
615
|
+
}, {
|
|
616
|
+
readonly type: "uint256";
|
|
617
|
+
readonly name: "amount";
|
|
618
|
+
}];
|
|
619
|
+
}, {
|
|
620
|
+
readonly name: "Mint";
|
|
621
|
+
readonly type: "event";
|
|
622
|
+
readonly inputs: readonly [{
|
|
623
|
+
readonly type: "address";
|
|
624
|
+
readonly name: "to";
|
|
625
|
+
readonly indexed: true;
|
|
626
|
+
}, {
|
|
627
|
+
readonly type: "uint256";
|
|
628
|
+
readonly name: "amount";
|
|
629
|
+
}];
|
|
630
|
+
}, {
|
|
631
|
+
readonly name: "Burn";
|
|
632
|
+
readonly type: "event";
|
|
633
|
+
readonly inputs: readonly [{
|
|
634
|
+
readonly type: "address";
|
|
635
|
+
readonly name: "from";
|
|
636
|
+
readonly indexed: true;
|
|
637
|
+
}, {
|
|
638
|
+
readonly type: "uint256";
|
|
639
|
+
readonly name: "amount";
|
|
640
|
+
}];
|
|
641
|
+
}, {
|
|
642
|
+
readonly name: "BurnBlocked";
|
|
643
|
+
readonly type: "event";
|
|
644
|
+
readonly inputs: readonly [{
|
|
645
|
+
readonly type: "address";
|
|
646
|
+
readonly name: "from";
|
|
647
|
+
readonly indexed: true;
|
|
648
|
+
}, {
|
|
649
|
+
readonly type: "uint256";
|
|
650
|
+
readonly name: "amount";
|
|
651
|
+
}];
|
|
652
|
+
}, {
|
|
653
|
+
readonly name: "TransferWithMemo";
|
|
654
|
+
readonly type: "event";
|
|
655
|
+
readonly inputs: readonly [{
|
|
656
|
+
readonly type: "address";
|
|
657
|
+
readonly name: "from";
|
|
658
|
+
readonly indexed: true;
|
|
659
|
+
}, {
|
|
660
|
+
readonly type: "address";
|
|
661
|
+
readonly name: "to";
|
|
662
|
+
readonly indexed: true;
|
|
663
|
+
}, {
|
|
664
|
+
readonly type: "uint256";
|
|
665
|
+
readonly name: "amount";
|
|
666
|
+
}, {
|
|
667
|
+
readonly type: "bytes32";
|
|
668
|
+
readonly name: "memo";
|
|
669
|
+
readonly indexed: true;
|
|
670
|
+
}];
|
|
671
|
+
}, {
|
|
672
|
+
readonly name: "TransferPolicyUpdate";
|
|
673
|
+
readonly type: "event";
|
|
674
|
+
readonly inputs: readonly [{
|
|
675
|
+
readonly type: "address";
|
|
676
|
+
readonly name: "updater";
|
|
677
|
+
readonly indexed: true;
|
|
678
|
+
}, {
|
|
679
|
+
readonly type: "uint64";
|
|
680
|
+
readonly name: "newPolicyId";
|
|
681
|
+
readonly indexed: true;
|
|
682
|
+
}];
|
|
683
|
+
}, {
|
|
684
|
+
readonly name: "SupplyCapUpdate";
|
|
685
|
+
readonly type: "event";
|
|
686
|
+
readonly inputs: readonly [{
|
|
687
|
+
readonly type: "address";
|
|
688
|
+
readonly name: "updater";
|
|
689
|
+
readonly indexed: true;
|
|
690
|
+
}, {
|
|
691
|
+
readonly type: "uint256";
|
|
692
|
+
readonly name: "newSupplyCap";
|
|
693
|
+
readonly indexed: true;
|
|
694
|
+
}];
|
|
695
|
+
}, {
|
|
696
|
+
readonly name: "PauseStateUpdate";
|
|
697
|
+
readonly type: "event";
|
|
698
|
+
readonly inputs: readonly [{
|
|
699
|
+
readonly type: "address";
|
|
700
|
+
readonly name: "updater";
|
|
701
|
+
readonly indexed: true;
|
|
702
|
+
}, {
|
|
703
|
+
readonly type: "bool";
|
|
704
|
+
readonly name: "isPaused";
|
|
705
|
+
}];
|
|
706
|
+
}, {
|
|
707
|
+
readonly name: "NextQuoteTokenSet";
|
|
708
|
+
readonly type: "event";
|
|
709
|
+
readonly inputs: readonly [{
|
|
710
|
+
readonly type: "address";
|
|
711
|
+
readonly name: "updater";
|
|
712
|
+
readonly indexed: true;
|
|
713
|
+
}, {
|
|
714
|
+
readonly type: "address";
|
|
715
|
+
readonly name: "nextQuoteToken";
|
|
716
|
+
readonly indexed: true;
|
|
717
|
+
}];
|
|
718
|
+
}, {
|
|
719
|
+
readonly name: "QuoteTokenUpdate";
|
|
720
|
+
readonly type: "event";
|
|
721
|
+
readonly inputs: readonly [{
|
|
722
|
+
readonly type: "address";
|
|
723
|
+
readonly name: "updater";
|
|
724
|
+
readonly indexed: true;
|
|
725
|
+
}, {
|
|
726
|
+
readonly type: "address";
|
|
727
|
+
readonly name: "newQuoteToken";
|
|
728
|
+
readonly indexed: true;
|
|
729
|
+
}];
|
|
730
|
+
}, {
|
|
731
|
+
readonly name: "RewardScheduled";
|
|
732
|
+
readonly type: "event";
|
|
733
|
+
readonly inputs: readonly [{
|
|
734
|
+
readonly type: "address";
|
|
735
|
+
readonly name: "funder";
|
|
736
|
+
readonly indexed: true;
|
|
737
|
+
}, {
|
|
738
|
+
readonly type: "uint64";
|
|
739
|
+
readonly name: "id";
|
|
740
|
+
readonly indexed: true;
|
|
741
|
+
}, {
|
|
742
|
+
readonly type: "uint256";
|
|
743
|
+
readonly name: "amount";
|
|
744
|
+
}, {
|
|
745
|
+
readonly type: "uint32";
|
|
746
|
+
readonly name: "durationSeconds";
|
|
747
|
+
}];
|
|
748
|
+
}, {
|
|
749
|
+
readonly name: "RewardCanceled";
|
|
750
|
+
readonly type: "event";
|
|
751
|
+
readonly inputs: readonly [{
|
|
752
|
+
readonly type: "address";
|
|
753
|
+
readonly name: "funder";
|
|
754
|
+
readonly indexed: true;
|
|
755
|
+
}, {
|
|
756
|
+
readonly type: "uint64";
|
|
757
|
+
readonly name: "id";
|
|
758
|
+
readonly indexed: true;
|
|
759
|
+
}, {
|
|
760
|
+
readonly type: "uint256";
|
|
761
|
+
readonly name: "refund";
|
|
762
|
+
}];
|
|
763
|
+
}, {
|
|
764
|
+
readonly name: "RewardRecipientSet";
|
|
765
|
+
readonly type: "event";
|
|
766
|
+
readonly inputs: readonly [{
|
|
767
|
+
readonly type: "address";
|
|
768
|
+
readonly name: "holder";
|
|
769
|
+
readonly indexed: true;
|
|
770
|
+
}, {
|
|
771
|
+
readonly type: "address";
|
|
772
|
+
readonly name: "recipient";
|
|
773
|
+
readonly indexed: true;
|
|
774
|
+
}];
|
|
775
|
+
}, {
|
|
776
|
+
readonly name: "InsufficientBalance";
|
|
777
|
+
readonly type: "error";
|
|
778
|
+
readonly inputs: readonly [{
|
|
779
|
+
readonly type: "uint256";
|
|
780
|
+
readonly name: "available";
|
|
781
|
+
}, {
|
|
782
|
+
readonly type: "uint256";
|
|
783
|
+
readonly name: "required";
|
|
784
|
+
}, {
|
|
785
|
+
readonly type: "address";
|
|
786
|
+
readonly name: "token";
|
|
787
|
+
}];
|
|
788
|
+
}, {
|
|
789
|
+
readonly name: "InsufficientAllowance";
|
|
790
|
+
readonly type: "error";
|
|
791
|
+
readonly inputs: readonly [];
|
|
792
|
+
}, {
|
|
793
|
+
readonly name: "SupplyCapExceeded";
|
|
794
|
+
readonly type: "error";
|
|
795
|
+
readonly inputs: readonly [];
|
|
796
|
+
}, {
|
|
797
|
+
readonly name: "InvalidSupplyCap";
|
|
798
|
+
readonly type: "error";
|
|
799
|
+
readonly inputs: readonly [];
|
|
800
|
+
}, {
|
|
801
|
+
readonly name: "InvalidPayload";
|
|
802
|
+
readonly type: "error";
|
|
803
|
+
readonly inputs: readonly [];
|
|
804
|
+
}, {
|
|
805
|
+
readonly name: "StringTooLong";
|
|
806
|
+
readonly type: "error";
|
|
807
|
+
readonly inputs: readonly [];
|
|
808
|
+
}, {
|
|
809
|
+
readonly name: "PolicyForbids";
|
|
810
|
+
readonly type: "error";
|
|
811
|
+
readonly inputs: readonly [];
|
|
812
|
+
}, {
|
|
813
|
+
readonly name: "InvalidRecipient";
|
|
814
|
+
readonly type: "error";
|
|
815
|
+
readonly inputs: readonly [];
|
|
816
|
+
}, {
|
|
817
|
+
readonly name: "ContractPaused";
|
|
818
|
+
readonly type: "error";
|
|
819
|
+
readonly inputs: readonly [];
|
|
820
|
+
}, {
|
|
821
|
+
readonly name: "InvalidCurrency";
|
|
822
|
+
readonly type: "error";
|
|
823
|
+
readonly inputs: readonly [];
|
|
824
|
+
}, {
|
|
825
|
+
readonly name: "InvalidQuoteToken";
|
|
826
|
+
readonly type: "error";
|
|
827
|
+
readonly inputs: readonly [];
|
|
828
|
+
}, {
|
|
829
|
+
readonly name: "TransfersDisabled";
|
|
830
|
+
readonly type: "error";
|
|
831
|
+
readonly inputs: readonly [];
|
|
832
|
+
}, {
|
|
833
|
+
readonly name: "InvalidAmount";
|
|
834
|
+
readonly type: "error";
|
|
835
|
+
readonly inputs: readonly [];
|
|
836
|
+
}, {
|
|
837
|
+
readonly name: "NotStreamFunder";
|
|
838
|
+
readonly type: "error";
|
|
839
|
+
readonly inputs: readonly [];
|
|
840
|
+
}, {
|
|
841
|
+
readonly name: "StreamInactive";
|
|
842
|
+
readonly type: "error";
|
|
843
|
+
readonly inputs: readonly [];
|
|
844
|
+
}, {
|
|
845
|
+
readonly name: "NoOptedInSupply";
|
|
846
|
+
readonly type: "error";
|
|
847
|
+
readonly inputs: readonly [];
|
|
848
|
+
}, {
|
|
849
|
+
readonly name: "Unauthorized";
|
|
850
|
+
readonly type: "error";
|
|
851
|
+
readonly inputs: readonly [];
|
|
852
|
+
}, {
|
|
853
|
+
readonly name: "hasRole";
|
|
854
|
+
readonly type: "function";
|
|
855
|
+
readonly stateMutability: "view";
|
|
856
|
+
readonly inputs: readonly [{
|
|
857
|
+
readonly type: "address";
|
|
858
|
+
readonly name: "account";
|
|
859
|
+
}, {
|
|
860
|
+
readonly type: "bytes32";
|
|
861
|
+
readonly name: "role";
|
|
862
|
+
}];
|
|
863
|
+
readonly outputs: readonly [{
|
|
864
|
+
readonly type: "bool";
|
|
865
|
+
}];
|
|
866
|
+
}, {
|
|
867
|
+
readonly name: "getRoleAdmin";
|
|
868
|
+
readonly type: "function";
|
|
869
|
+
readonly stateMutability: "view";
|
|
870
|
+
readonly inputs: readonly [{
|
|
871
|
+
readonly type: "bytes32";
|
|
872
|
+
readonly name: "role";
|
|
873
|
+
}];
|
|
874
|
+
readonly outputs: readonly [{
|
|
875
|
+
readonly type: "bytes32";
|
|
876
|
+
}];
|
|
877
|
+
}, {
|
|
878
|
+
readonly name: "grantRole";
|
|
879
|
+
readonly type: "function";
|
|
880
|
+
readonly stateMutability: "nonpayable";
|
|
881
|
+
readonly inputs: readonly [{
|
|
882
|
+
readonly type: "bytes32";
|
|
883
|
+
readonly name: "role";
|
|
884
|
+
}, {
|
|
885
|
+
readonly type: "address";
|
|
886
|
+
readonly name: "account";
|
|
887
|
+
}];
|
|
888
|
+
readonly outputs: readonly [];
|
|
889
|
+
}, {
|
|
890
|
+
readonly name: "revokeRole";
|
|
891
|
+
readonly type: "function";
|
|
892
|
+
readonly stateMutability: "nonpayable";
|
|
893
|
+
readonly inputs: readonly [{
|
|
894
|
+
readonly type: "bytes32";
|
|
895
|
+
readonly name: "role";
|
|
896
|
+
}, {
|
|
897
|
+
readonly type: "address";
|
|
898
|
+
readonly name: "account";
|
|
899
|
+
}];
|
|
900
|
+
readonly outputs: readonly [];
|
|
901
|
+
}, {
|
|
902
|
+
readonly name: "renounceRole";
|
|
903
|
+
readonly type: "function";
|
|
904
|
+
readonly stateMutability: "nonpayable";
|
|
905
|
+
readonly inputs: readonly [{
|
|
906
|
+
readonly type: "bytes32";
|
|
907
|
+
readonly name: "role";
|
|
908
|
+
}];
|
|
909
|
+
readonly outputs: readonly [];
|
|
910
|
+
}, {
|
|
911
|
+
readonly name: "setRoleAdmin";
|
|
912
|
+
readonly type: "function";
|
|
913
|
+
readonly stateMutability: "nonpayable";
|
|
914
|
+
readonly inputs: readonly [{
|
|
915
|
+
readonly type: "bytes32";
|
|
916
|
+
readonly name: "role";
|
|
917
|
+
}, {
|
|
918
|
+
readonly type: "bytes32";
|
|
919
|
+
readonly name: "adminRole";
|
|
920
|
+
}];
|
|
921
|
+
readonly outputs: readonly [];
|
|
922
|
+
}, {
|
|
923
|
+
readonly name: "RoleMembershipUpdated";
|
|
924
|
+
readonly type: "event";
|
|
925
|
+
readonly inputs: readonly [{
|
|
926
|
+
readonly type: "bytes32";
|
|
927
|
+
readonly name: "role";
|
|
928
|
+
readonly indexed: true;
|
|
929
|
+
}, {
|
|
930
|
+
readonly type: "address";
|
|
931
|
+
readonly name: "account";
|
|
932
|
+
readonly indexed: true;
|
|
933
|
+
}, {
|
|
934
|
+
readonly type: "address";
|
|
935
|
+
readonly name: "sender";
|
|
936
|
+
readonly indexed: true;
|
|
937
|
+
}, {
|
|
938
|
+
readonly type: "bool";
|
|
939
|
+
readonly name: "hasRole";
|
|
940
|
+
}];
|
|
941
|
+
}, {
|
|
942
|
+
readonly name: "RoleAdminUpdated";
|
|
943
|
+
readonly type: "event";
|
|
944
|
+
readonly inputs: readonly [{
|
|
945
|
+
readonly type: "bytes32";
|
|
946
|
+
readonly name: "role";
|
|
947
|
+
readonly indexed: true;
|
|
948
|
+
}, {
|
|
949
|
+
readonly type: "bytes32";
|
|
950
|
+
readonly name: "newAdminRole";
|
|
951
|
+
readonly indexed: true;
|
|
952
|
+
}, {
|
|
953
|
+
readonly type: "address";
|
|
954
|
+
readonly name: "sender";
|
|
955
|
+
readonly indexed: true;
|
|
956
|
+
}];
|
|
957
|
+
}, {
|
|
958
|
+
readonly name: "Unauthorized";
|
|
959
|
+
readonly type: "error";
|
|
960
|
+
readonly inputs: readonly [];
|
|
961
|
+
}], "RewardCanceled">;
|
|
962
|
+
}
|
|
963
|
+
export declare namespace cancelSync {
|
|
964
|
+
type Parameters<chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined> = WriteParameters<chain, account> & cancel.Args;
|
|
965
|
+
type ReturnValue = {
|
|
966
|
+
/** The address that funded the stream */
|
|
967
|
+
funder: Address;
|
|
968
|
+
/** The stream ID that was canceled */
|
|
969
|
+
id: bigint;
|
|
970
|
+
/** The transaction receipt */
|
|
971
|
+
receipt: Awaited<ReturnType<typeof writeContractSync>>;
|
|
972
|
+
/** The amount refunded to the funder (0 if TIP-403 policy forbids the refund transfer) */
|
|
973
|
+
refund: bigint;
|
|
974
|
+
};
|
|
975
|
+
type ErrorType = cancel.ErrorType;
|
|
976
|
+
}
|
|
977
|
+
/**
|
|
978
|
+
* Claims accumulated rewards for a recipient.
|
|
979
|
+
*
|
|
980
|
+
* This function allows a reward recipient to claim their accumulated rewards
|
|
981
|
+
* and receive them as token transfers to their own balance.
|
|
982
|
+
*
|
|
983
|
+
* - Accrues all pending rewards up to the current block timestamp.
|
|
984
|
+
* - Updates the caller's reward accounting.
|
|
985
|
+
* - Transfers the caller's accumulated `rewardBalance` from the token contract to the caller.
|
|
986
|
+
* - If the contract's balance is insufficient, claims up to the available amount.
|
|
987
|
+
* - Returns the actual amount claimed.
|
|
988
|
+
*
|
|
989
|
+
* Notes:
|
|
990
|
+
* - Reverts with `Paused` if the token is paused.
|
|
991
|
+
* - Reverts with `PolicyForbids` if the caller is not authorized to receive tokens under TIP-403.
|
|
992
|
+
* - If opted in, the claimed amount is added back to `optedInSupply` since it goes to the recipient's balance.
|
|
993
|
+
*
|
|
994
|
+
* @example
|
|
995
|
+
* ```ts
|
|
996
|
+
* import { createClient, http } from 'viem'
|
|
997
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
998
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
999
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
1000
|
+
*
|
|
1001
|
+
* const client = createClient({
|
|
1002
|
+
* account: privateKeyToAccount('0x...'),
|
|
1003
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1004
|
+
* transport: http(),
|
|
1005
|
+
* })
|
|
1006
|
+
*
|
|
1007
|
+
* const hash = await Actions.reward.claim(client, {
|
|
1008
|
+
* token: '0x20c0000000000000000000000000000000000001',
|
|
1009
|
+
* })
|
|
1010
|
+
* ```
|
|
1011
|
+
*
|
|
1012
|
+
* @param client - Client.
|
|
1013
|
+
* @param parameters - Parameters.
|
|
1014
|
+
* @returns The transaction hash.
|
|
1015
|
+
*/
|
|
1016
|
+
export declare function claim<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters: claim.Parameters<chain, account>): Promise<claim.ReturnValue>;
|
|
1017
|
+
export declare namespace claim {
|
|
1018
|
+
type Args = {
|
|
1019
|
+
/** The TIP20 token address */
|
|
1020
|
+
token: Address;
|
|
1021
|
+
};
|
|
1022
|
+
type Parameters<chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined> = WriteParameters<chain, account> & Args;
|
|
1023
|
+
type ReturnValue = WriteContractReturnType;
|
|
1024
|
+
type ErrorType = BaseErrorType;
|
|
1025
|
+
/** @internal */
|
|
1026
|
+
function inner<action extends typeof writeContract | typeof writeContractSync, chain extends Chain | undefined, account extends Account | undefined>(action: action, client: Client<Transport, chain, account>, parameters: Parameters<chain, account>): Promise<ReturnType<action>>;
|
|
1027
|
+
/**
|
|
1028
|
+
* Defines a call to the `claimRewards` function.
|
|
1029
|
+
*
|
|
1030
|
+
* Can be passed as a parameter to:
|
|
1031
|
+
* - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call
|
|
1032
|
+
* - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call
|
|
1033
|
+
* - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls
|
|
1034
|
+
*
|
|
1035
|
+
* @example
|
|
1036
|
+
* ```ts
|
|
1037
|
+
* import { createClient, http, walletActions } from 'viem'
|
|
1038
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
1039
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1040
|
+
*
|
|
1041
|
+
* const client = createClient({
|
|
1042
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1043
|
+
* transport: http(),
|
|
1044
|
+
* }).extend(walletActions)
|
|
1045
|
+
*
|
|
1046
|
+
* const hash = await client.sendTransaction({
|
|
1047
|
+
* calls: [actions.reward.claim.call({
|
|
1048
|
+
* token: '0x20c0000000000000000000000000000000000001',
|
|
1049
|
+
* })],
|
|
1050
|
+
* })
|
|
1051
|
+
* ```
|
|
1052
|
+
*
|
|
1053
|
+
* @param args - Arguments.
|
|
1054
|
+
* @returns The call.
|
|
1055
|
+
*/
|
|
1056
|
+
function call(args: Args): {
|
|
1057
|
+
abi: [{
|
|
1058
|
+
readonly name: "claimRewards";
|
|
1059
|
+
readonly type: "function";
|
|
1060
|
+
readonly stateMutability: "nonpayable";
|
|
1061
|
+
readonly inputs: readonly [];
|
|
1062
|
+
readonly outputs: readonly [{
|
|
1063
|
+
readonly type: "uint256";
|
|
1064
|
+
}];
|
|
1065
|
+
}];
|
|
1066
|
+
functionName: "claimRewards";
|
|
1067
|
+
args?: readonly [] | undefined;
|
|
1068
|
+
} & {
|
|
1069
|
+
address: Address;
|
|
1070
|
+
} & {
|
|
1071
|
+
data: import("viem").Hex;
|
|
1072
|
+
to: Address;
|
|
1073
|
+
};
|
|
1074
|
+
}
|
|
1075
|
+
/**
|
|
1076
|
+
* Claims accumulated rewards for a recipient and waits for confirmation.
|
|
1077
|
+
*
|
|
1078
|
+
* This function allows a reward recipient to claim their accumulated rewards
|
|
1079
|
+
* and receive them as token transfers to their own balance.
|
|
1080
|
+
*
|
|
1081
|
+
* Behavior:
|
|
1082
|
+
* - Accrues all pending rewards up to the current block timestamp.
|
|
1083
|
+
* - Updates the caller's reward accounting.
|
|
1084
|
+
* - Transfers the caller's accumulated `rewardBalance` from the token contract to the caller.
|
|
1085
|
+
* - If the contract's balance is insufficient, claims up to the available amount.
|
|
1086
|
+
*
|
|
1087
|
+
* Notes:
|
|
1088
|
+
* - Reverts with `Paused` if the token is paused.
|
|
1089
|
+
* - Reverts with `PolicyForbids` if the caller is not authorized to receive tokens under TIP-403.
|
|
1090
|
+
* - If opted in, the claimed amount is added back to `optedInSupply` since it goes to the recipient's balance.
|
|
1091
|
+
*
|
|
1092
|
+
* @example
|
|
1093
|
+
* ```ts
|
|
1094
|
+
* import { createClient, http } from 'viem'
|
|
1095
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
1096
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1097
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
1098
|
+
*
|
|
1099
|
+
* const client = createClient({
|
|
1100
|
+
* account: privateKeyToAccount('0x...'),
|
|
1101
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1102
|
+
* transport: http(),
|
|
1103
|
+
* })
|
|
1104
|
+
*
|
|
1105
|
+
* const { receipt } = await Actions.reward.claimSync(client, {
|
|
1106
|
+
* token: '0x20c0000000000000000000000000000000000001',
|
|
1107
|
+
* })
|
|
1108
|
+
* ```
|
|
1109
|
+
*
|
|
1110
|
+
* @param client - Client.
|
|
1111
|
+
* @param parameters - Parameters.
|
|
1112
|
+
* @returns The amount claimed and transaction receipt.
|
|
1113
|
+
*/
|
|
1114
|
+
export declare function claimSync<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters: claimSync.Parameters<chain, account>): Promise<claimSync.ReturnValue>;
|
|
1115
|
+
export declare namespace claimSync {
|
|
1116
|
+
type Parameters<chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined> = WriteParameters<chain, account> & claim.Args;
|
|
1117
|
+
type ReturnValue = {
|
|
1118
|
+
/** The transaction receipt */
|
|
1119
|
+
receipt: Awaited<ReturnType<typeof writeContractSync>>;
|
|
1120
|
+
};
|
|
1121
|
+
type ErrorType = claim.ErrorType;
|
|
1122
|
+
}
|
|
1123
|
+
/**
|
|
1124
|
+
* Gets a reward stream by its ID.
|
|
1125
|
+
*
|
|
1126
|
+
* Returns the stream details including:
|
|
1127
|
+
* - `funder`: The address that funded the stream
|
|
1128
|
+
* - `startTime`: When the stream started (block timestamp)
|
|
1129
|
+
* - `endTime`: When the stream is scheduled to end
|
|
1130
|
+
* - `ratePerSecondScaled`: The per-second emission rate (scaled by ACC_PRECISION = 1e18)
|
|
1131
|
+
* - `amountTotal`: The total amount allocated to the stream
|
|
1132
|
+
*
|
|
1133
|
+
* Note: If the stream has been canceled or doesn't exist, `funder` will be the zero address.
|
|
1134
|
+
*
|
|
1135
|
+
* @example
|
|
1136
|
+
* ```ts
|
|
1137
|
+
* import { createClient, http } from 'viem'
|
|
1138
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
1139
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1140
|
+
*
|
|
1141
|
+
* const client = createClient({
|
|
1142
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1143
|
+
* transport: http(),
|
|
1144
|
+
* })
|
|
1145
|
+
*
|
|
1146
|
+
* const stream = await Actions.rewards.getStream(client, {
|
|
1147
|
+
* id: 1n,
|
|
1148
|
+
* token: '0x20c0000000000000000000000000000000000001',
|
|
1149
|
+
* })
|
|
1150
|
+
* ```
|
|
1151
|
+
*
|
|
1152
|
+
* @param client - Client.
|
|
1153
|
+
* @param parameters - Parameters.
|
|
1154
|
+
* @returns The reward stream details.
|
|
1155
|
+
*/
|
|
1156
|
+
export declare function getStream<chain extends Chain | undefined>(client: Client<Transport, chain>, parameters: getStream.Parameters): Promise<getStream.ReturnValue>;
|
|
1157
|
+
export declare namespace getStream {
|
|
1158
|
+
type Parameters = ReadParameters & Args;
|
|
1159
|
+
type Args = {
|
|
1160
|
+
/** The stream ID to query (0 is never used for streams, only for immediate distributions) */
|
|
1161
|
+
id: bigint;
|
|
1162
|
+
/** The TIP20 token address */
|
|
1163
|
+
token: Address;
|
|
1164
|
+
};
|
|
1165
|
+
type ReturnValue = ReadContractReturnType<typeof Abis.tip20, 'getStream', never>;
|
|
1166
|
+
/**
|
|
1167
|
+
* Defines a call to the `getStream` function.
|
|
1168
|
+
*
|
|
1169
|
+
* @param args - Arguments.
|
|
1170
|
+
* @returns The call.
|
|
1171
|
+
*/
|
|
1172
|
+
function call(args: Args): {
|
|
1173
|
+
abi: [{
|
|
1174
|
+
readonly name: "getStream";
|
|
1175
|
+
readonly type: "function";
|
|
1176
|
+
readonly stateMutability: "view";
|
|
1177
|
+
readonly inputs: readonly [{
|
|
1178
|
+
readonly type: "uint64";
|
|
1179
|
+
readonly name: "id";
|
|
1180
|
+
}];
|
|
1181
|
+
readonly outputs: readonly [{
|
|
1182
|
+
readonly type: "tuple";
|
|
1183
|
+
readonly components: readonly [{
|
|
1184
|
+
readonly type: "address";
|
|
1185
|
+
readonly name: "funder";
|
|
1186
|
+
}, {
|
|
1187
|
+
readonly type: "uint64";
|
|
1188
|
+
readonly name: "startTime";
|
|
1189
|
+
}, {
|
|
1190
|
+
readonly type: "uint64";
|
|
1191
|
+
readonly name: "endTime";
|
|
1192
|
+
}, {
|
|
1193
|
+
readonly type: "uint256";
|
|
1194
|
+
readonly name: "ratePerSecondScaled";
|
|
1195
|
+
}, {
|
|
1196
|
+
readonly type: "uint256";
|
|
1197
|
+
readonly name: "amountTotal";
|
|
1198
|
+
}];
|
|
1199
|
+
}];
|
|
1200
|
+
}];
|
|
1201
|
+
functionName: "getStream";
|
|
1202
|
+
args?: readonly [bigint] | undefined;
|
|
1203
|
+
} & {
|
|
1204
|
+
args: readonly [bigint];
|
|
1205
|
+
} & {
|
|
1206
|
+
address: Address;
|
|
1207
|
+
} & {
|
|
1208
|
+
data: import("viem").Hex;
|
|
1209
|
+
to: Address;
|
|
1210
|
+
};
|
|
1211
|
+
}
|
|
1212
|
+
/**
|
|
1213
|
+
* Gets the total reward per second rate for all active streams.
|
|
1214
|
+
*
|
|
1215
|
+
* Returns the current aggregate per-second emission rate scaled by `ACC_PRECISION` (1e18).
|
|
1216
|
+
* This value represents the sum of all active reward streams' emission rates.
|
|
1217
|
+
* The rate decreases when streams end (via `finalizeStreams`) or are canceled.
|
|
1218
|
+
*
|
|
1219
|
+
* @example
|
|
1220
|
+
* ```ts
|
|
1221
|
+
* import { createClient, http } from 'viem'
|
|
1222
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
1223
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1224
|
+
*
|
|
1225
|
+
* const client = createClient({
|
|
1226
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1227
|
+
* transport: http(),
|
|
1228
|
+
* })
|
|
1229
|
+
*
|
|
1230
|
+
* const rate = await Actions.rewards.getTotalPerSecond(client, {
|
|
1231
|
+
* token: '0x20c0000000000000000000000000000000000001',
|
|
1232
|
+
* })
|
|
1233
|
+
* ```
|
|
1234
|
+
*
|
|
1235
|
+
* @param client - Client.
|
|
1236
|
+
* @param parameters - Parameters.
|
|
1237
|
+
* @returns The total reward per second (scaled by 1e18).
|
|
1238
|
+
*/
|
|
1239
|
+
export declare function getTotalPerSecond<chain extends Chain | undefined>(client: Client<Transport, chain>, parameters: getTotalPerSecond.Parameters): Promise<getTotalPerSecond.ReturnValue>;
|
|
1240
|
+
export declare namespace getTotalPerSecond {
|
|
1241
|
+
type Parameters = ReadParameters & Args;
|
|
1242
|
+
type Args = {
|
|
1243
|
+
/** The TIP20 token address */
|
|
1244
|
+
token: Address;
|
|
1245
|
+
};
|
|
1246
|
+
type ReturnValue = ReadContractReturnType<typeof Abis.tip20, 'totalRewardPerSecond', never>;
|
|
1247
|
+
/**
|
|
1248
|
+
* Defines a call to the `totalRewardPerSecond` function.
|
|
1249
|
+
*
|
|
1250
|
+
* @param args - Arguments.
|
|
1251
|
+
* @returns The call.
|
|
1252
|
+
*/
|
|
1253
|
+
function call(args: Args): {
|
|
1254
|
+
abi: [{
|
|
1255
|
+
readonly name: "totalRewardPerSecond";
|
|
1256
|
+
readonly type: "function";
|
|
1257
|
+
readonly stateMutability: "view";
|
|
1258
|
+
readonly inputs: readonly [];
|
|
1259
|
+
readonly outputs: readonly [{
|
|
1260
|
+
readonly type: "uint256";
|
|
1261
|
+
}];
|
|
1262
|
+
}];
|
|
1263
|
+
functionName: "totalRewardPerSecond";
|
|
1264
|
+
args?: readonly [] | undefined;
|
|
1265
|
+
} & {
|
|
1266
|
+
address: Address;
|
|
1267
|
+
} & {
|
|
1268
|
+
data: import("viem").Hex;
|
|
1269
|
+
to: Address;
|
|
1270
|
+
};
|
|
1271
|
+
}
|
|
1272
|
+
/**
|
|
1273
|
+
* Sets or changes the reward recipient for a token holder.
|
|
1274
|
+
*
|
|
1275
|
+
* This function allows a token holder to designate who should receive their share of rewards:
|
|
1276
|
+
* - If `recipient` is the zero address, opts out from rewards distribution.
|
|
1277
|
+
* - Otherwise, opts in and sets `recipient` as the address that will receive accrued rewards.
|
|
1278
|
+
* - Can be called with `recipient == msg.sender` to receive rewards directly.
|
|
1279
|
+
* - Automatically distributes any accrued rewards to the current recipient before changing.
|
|
1280
|
+
*
|
|
1281
|
+
* TIP-403 Policy:
|
|
1282
|
+
* - Reverts with `PolicyForbids` if `recipient` is not the zero address and either the holder or recipient is not authorized to receive tokens under the token's transfer policy.
|
|
1283
|
+
*
|
|
1284
|
+
* @example
|
|
1285
|
+
* ```ts
|
|
1286
|
+
* import { createClient, http } from 'viem'
|
|
1287
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
1288
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1289
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
1290
|
+
*
|
|
1291
|
+
* const client = createClient({
|
|
1292
|
+
* account: privateKeyToAccount('0x...'),
|
|
1293
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1294
|
+
* transport: http(),
|
|
1295
|
+
* })
|
|
1296
|
+
*
|
|
1297
|
+
* const hash = await Actions.rewards.setRecipient(client, {
|
|
1298
|
+
* recipient: '0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC',
|
|
1299
|
+
* token: '0x20c0000000000000000000000000000000000001',
|
|
1300
|
+
* })
|
|
1301
|
+
* ```
|
|
1302
|
+
*
|
|
1303
|
+
* @param client - Client.
|
|
1304
|
+
* @param parameters - Parameters.
|
|
1305
|
+
* @returns The transaction hash.
|
|
1306
|
+
*/
|
|
1307
|
+
export declare function setRecipient<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters: setRecipient.Parameters<chain, account>): Promise<setRecipient.ReturnValue>;
|
|
1308
|
+
/**
|
|
1309
|
+
* Sets or changes the reward recipient for a token holder and waits for confirmation.
|
|
1310
|
+
*
|
|
1311
|
+
* This function allows a token holder to designate who should receive their share of rewards:
|
|
1312
|
+
* - If `recipient` is the zero address, opts out from rewards distribution.
|
|
1313
|
+
* - Otherwise, opts in and sets `recipient` as the address that will receive accrued rewards.
|
|
1314
|
+
* - Can be called with `recipient == msg.sender` to receive rewards directly.
|
|
1315
|
+
* - Automatically distributes any accrued rewards to the current recipient before changing.
|
|
1316
|
+
*
|
|
1317
|
+
* TIP-403 Policy:
|
|
1318
|
+
* - Reverts with `PolicyForbids` if `recipient` is not the zero address and either the holder or recipient is not authorized to receive tokens under the token's transfer policy.
|
|
1319
|
+
*
|
|
1320
|
+
* @example
|
|
1321
|
+
* ```ts
|
|
1322
|
+
* import { createClient, http } from 'viem'
|
|
1323
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
1324
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1325
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
1326
|
+
*
|
|
1327
|
+
* const client = createClient({
|
|
1328
|
+
* account: privateKeyToAccount('0x...'),
|
|
1329
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1330
|
+
* transport: http(),
|
|
1331
|
+
* })
|
|
1332
|
+
*
|
|
1333
|
+
* const { holder, recipient, receipt } = await Actions.rewards.setRecipientSync(client, {
|
|
1334
|
+
* recipient: '0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC',
|
|
1335
|
+
* token: '0x20c0000000000000000000000000000000000001',
|
|
1336
|
+
* })
|
|
1337
|
+
* ```
|
|
1338
|
+
*
|
|
1339
|
+
* @param client - Client.
|
|
1340
|
+
* @param parameters - Parameters.
|
|
1341
|
+
* @returns The holder, recipient, and transaction receipt.
|
|
1342
|
+
*/
|
|
1343
|
+
export declare function setRecipientSync<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters: setRecipientSync.Parameters<chain, account>): Promise<setRecipientSync.ReturnValue>;
|
|
1344
|
+
export declare namespace setRecipient {
|
|
1345
|
+
type Args = {
|
|
1346
|
+
/** The reward recipient address (use zero address to opt out of rewards) */
|
|
1347
|
+
recipient: Address;
|
|
1348
|
+
/** The TIP20 token address */
|
|
1349
|
+
token: Address;
|
|
1350
|
+
};
|
|
1351
|
+
type Parameters<chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined> = WriteParameters<chain, account> & Args;
|
|
1352
|
+
type ReturnValue = WriteContractReturnType;
|
|
1353
|
+
type ErrorType = BaseErrorType;
|
|
1354
|
+
/** @internal */
|
|
1355
|
+
function inner<action extends typeof writeContract | typeof writeContractSync, chain extends Chain | undefined, account extends Account | undefined>(action: action, client: Client<Transport, chain, account>, parameters: Parameters<chain, account>): Promise<ReturnType<action>>;
|
|
1356
|
+
/**
|
|
1357
|
+
* Defines a call to the `setRecipient` function.
|
|
1358
|
+
*
|
|
1359
|
+
* Can be passed as a parameter to:
|
|
1360
|
+
* - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call
|
|
1361
|
+
* - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call
|
|
1362
|
+
* - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls
|
|
1363
|
+
*
|
|
1364
|
+
* @example
|
|
1365
|
+
* ```ts
|
|
1366
|
+
* import { createClient, http, walletActions } from 'viem'
|
|
1367
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
1368
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
1369
|
+
*
|
|
1370
|
+
* const client = createClient({
|
|
1371
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
1372
|
+
* transport: http(),
|
|
1373
|
+
* }).extend(walletActions)
|
|
1374
|
+
*
|
|
1375
|
+
* const hash = await client.sendTransaction({
|
|
1376
|
+
* calls: [actions.rewards.setRecipient.call({
|
|
1377
|
+
* recipient: '0xa5cc3c03994DB5b0d9A5eEdD10CabaB0813678AC',
|
|
1378
|
+
* token: '0x20c0000000000000000000000000000000000001',
|
|
1379
|
+
* })],
|
|
1380
|
+
* })
|
|
1381
|
+
* ```
|
|
1382
|
+
*
|
|
1383
|
+
* @param args - Arguments.
|
|
1384
|
+
* @returns The call.
|
|
1385
|
+
*/
|
|
1386
|
+
function call(args: Args): {
|
|
1387
|
+
abi: [{
|
|
1388
|
+
readonly name: "setRewardRecipient";
|
|
1389
|
+
readonly type: "function";
|
|
1390
|
+
readonly stateMutability: "nonpayable";
|
|
1391
|
+
readonly inputs: readonly [{
|
|
1392
|
+
readonly type: "address";
|
|
1393
|
+
readonly name: "recipient";
|
|
1394
|
+
}];
|
|
1395
|
+
readonly outputs: readonly [];
|
|
1396
|
+
}];
|
|
1397
|
+
functionName: "setRewardRecipient";
|
|
1398
|
+
args?: readonly [`0x${string}`] | undefined;
|
|
1399
|
+
} & {
|
|
1400
|
+
args: readonly [`0x${string}`];
|
|
1401
|
+
} & {
|
|
1402
|
+
address: Address;
|
|
1403
|
+
} & {
|
|
1404
|
+
data: import("viem").Hex;
|
|
1405
|
+
to: Address;
|
|
1406
|
+
};
|
|
1407
|
+
/**
|
|
1408
|
+
* Extracts the `RewardRecipientSet` event from logs.
|
|
1409
|
+
*
|
|
1410
|
+
* @param logs - The logs.
|
|
1411
|
+
* @returns The `RewardRecipientSet` event.
|
|
1412
|
+
*/
|
|
1413
|
+
function extractEvent(logs: Log[]): Log<bigint, number, false, undefined, true, readonly [{
|
|
1414
|
+
readonly name: "name";
|
|
1415
|
+
readonly type: "function";
|
|
1416
|
+
readonly stateMutability: "view";
|
|
1417
|
+
readonly inputs: readonly [];
|
|
1418
|
+
readonly outputs: readonly [{
|
|
1419
|
+
readonly type: "string";
|
|
1420
|
+
}];
|
|
1421
|
+
}, {
|
|
1422
|
+
readonly name: "symbol";
|
|
1423
|
+
readonly type: "function";
|
|
1424
|
+
readonly stateMutability: "view";
|
|
1425
|
+
readonly inputs: readonly [];
|
|
1426
|
+
readonly outputs: readonly [{
|
|
1427
|
+
readonly type: "string";
|
|
1428
|
+
}];
|
|
1429
|
+
}, {
|
|
1430
|
+
readonly name: "decimals";
|
|
1431
|
+
readonly type: "function";
|
|
1432
|
+
readonly stateMutability: "view";
|
|
1433
|
+
readonly inputs: readonly [];
|
|
1434
|
+
readonly outputs: readonly [{
|
|
1435
|
+
readonly type: "uint8";
|
|
1436
|
+
}];
|
|
1437
|
+
}, {
|
|
1438
|
+
readonly name: "totalSupply";
|
|
1439
|
+
readonly type: "function";
|
|
1440
|
+
readonly stateMutability: "view";
|
|
1441
|
+
readonly inputs: readonly [];
|
|
1442
|
+
readonly outputs: readonly [{
|
|
1443
|
+
readonly type: "uint256";
|
|
1444
|
+
}];
|
|
1445
|
+
}, {
|
|
1446
|
+
readonly name: "quoteToken";
|
|
1447
|
+
readonly type: "function";
|
|
1448
|
+
readonly stateMutability: "view";
|
|
1449
|
+
readonly inputs: readonly [];
|
|
1450
|
+
readonly outputs: readonly [{
|
|
1451
|
+
readonly type: "address";
|
|
1452
|
+
}];
|
|
1453
|
+
}, {
|
|
1454
|
+
readonly name: "nextQuoteToken";
|
|
1455
|
+
readonly type: "function";
|
|
1456
|
+
readonly stateMutability: "view";
|
|
1457
|
+
readonly inputs: readonly [];
|
|
1458
|
+
readonly outputs: readonly [{
|
|
1459
|
+
readonly type: "address";
|
|
1460
|
+
}];
|
|
1461
|
+
}, {
|
|
1462
|
+
readonly name: "balanceOf";
|
|
1463
|
+
readonly type: "function";
|
|
1464
|
+
readonly stateMutability: "view";
|
|
1465
|
+
readonly inputs: readonly [{
|
|
1466
|
+
readonly type: "address";
|
|
1467
|
+
readonly name: "account";
|
|
1468
|
+
}];
|
|
1469
|
+
readonly outputs: readonly [{
|
|
1470
|
+
readonly type: "uint256";
|
|
1471
|
+
}];
|
|
1472
|
+
}, {
|
|
1473
|
+
readonly name: "transfer";
|
|
1474
|
+
readonly type: "function";
|
|
1475
|
+
readonly stateMutability: "nonpayable";
|
|
1476
|
+
readonly inputs: readonly [{
|
|
1477
|
+
readonly type: "address";
|
|
1478
|
+
readonly name: "to";
|
|
1479
|
+
}, {
|
|
1480
|
+
readonly type: "uint256";
|
|
1481
|
+
readonly name: "amount";
|
|
1482
|
+
}];
|
|
1483
|
+
readonly outputs: readonly [{
|
|
1484
|
+
readonly type: "bool";
|
|
1485
|
+
}];
|
|
1486
|
+
}, {
|
|
1487
|
+
readonly name: "approve";
|
|
1488
|
+
readonly type: "function";
|
|
1489
|
+
readonly stateMutability: "nonpayable";
|
|
1490
|
+
readonly inputs: readonly [{
|
|
1491
|
+
readonly type: "address";
|
|
1492
|
+
readonly name: "spender";
|
|
1493
|
+
}, {
|
|
1494
|
+
readonly type: "uint256";
|
|
1495
|
+
readonly name: "amount";
|
|
1496
|
+
}];
|
|
1497
|
+
readonly outputs: readonly [{
|
|
1498
|
+
readonly type: "bool";
|
|
1499
|
+
}];
|
|
1500
|
+
}, {
|
|
1501
|
+
readonly name: "allowance";
|
|
1502
|
+
readonly type: "function";
|
|
1503
|
+
readonly stateMutability: "view";
|
|
1504
|
+
readonly inputs: readonly [{
|
|
1505
|
+
readonly type: "address";
|
|
1506
|
+
readonly name: "owner";
|
|
1507
|
+
}, {
|
|
1508
|
+
readonly type: "address";
|
|
1509
|
+
readonly name: "spender";
|
|
1510
|
+
}];
|
|
1511
|
+
readonly outputs: readonly [{
|
|
1512
|
+
readonly type: "uint256";
|
|
1513
|
+
}];
|
|
1514
|
+
}, {
|
|
1515
|
+
readonly name: "transferFrom";
|
|
1516
|
+
readonly type: "function";
|
|
1517
|
+
readonly stateMutability: "nonpayable";
|
|
1518
|
+
readonly inputs: readonly [{
|
|
1519
|
+
readonly type: "address";
|
|
1520
|
+
readonly name: "from";
|
|
1521
|
+
}, {
|
|
1522
|
+
readonly type: "address";
|
|
1523
|
+
readonly name: "to";
|
|
1524
|
+
}, {
|
|
1525
|
+
readonly type: "uint256";
|
|
1526
|
+
readonly name: "amount";
|
|
1527
|
+
}];
|
|
1528
|
+
readonly outputs: readonly [{
|
|
1529
|
+
readonly type: "bool";
|
|
1530
|
+
}];
|
|
1531
|
+
}, {
|
|
1532
|
+
readonly name: "mint";
|
|
1533
|
+
readonly type: "function";
|
|
1534
|
+
readonly stateMutability: "nonpayable";
|
|
1535
|
+
readonly inputs: readonly [{
|
|
1536
|
+
readonly type: "address";
|
|
1537
|
+
readonly name: "to";
|
|
1538
|
+
}, {
|
|
1539
|
+
readonly type: "uint256";
|
|
1540
|
+
readonly name: "amount";
|
|
1541
|
+
}];
|
|
1542
|
+
readonly outputs: readonly [];
|
|
1543
|
+
}, {
|
|
1544
|
+
readonly name: "burn";
|
|
1545
|
+
readonly type: "function";
|
|
1546
|
+
readonly stateMutability: "nonpayable";
|
|
1547
|
+
readonly inputs: readonly [{
|
|
1548
|
+
readonly type: "uint256";
|
|
1549
|
+
readonly name: "amount";
|
|
1550
|
+
}];
|
|
1551
|
+
readonly outputs: readonly [];
|
|
1552
|
+
}, {
|
|
1553
|
+
readonly name: "currency";
|
|
1554
|
+
readonly type: "function";
|
|
1555
|
+
readonly stateMutability: "view";
|
|
1556
|
+
readonly inputs: readonly [];
|
|
1557
|
+
readonly outputs: readonly [{
|
|
1558
|
+
readonly type: "string";
|
|
1559
|
+
}];
|
|
1560
|
+
}, {
|
|
1561
|
+
readonly name: "supplyCap";
|
|
1562
|
+
readonly type: "function";
|
|
1563
|
+
readonly stateMutability: "view";
|
|
1564
|
+
readonly inputs: readonly [];
|
|
1565
|
+
readonly outputs: readonly [{
|
|
1566
|
+
readonly type: "uint256";
|
|
1567
|
+
}];
|
|
1568
|
+
}, {
|
|
1569
|
+
readonly name: "paused";
|
|
1570
|
+
readonly type: "function";
|
|
1571
|
+
readonly stateMutability: "view";
|
|
1572
|
+
readonly inputs: readonly [];
|
|
1573
|
+
readonly outputs: readonly [{
|
|
1574
|
+
readonly type: "bool";
|
|
1575
|
+
}];
|
|
1576
|
+
}, {
|
|
1577
|
+
readonly name: "transferPolicyId";
|
|
1578
|
+
readonly type: "function";
|
|
1579
|
+
readonly stateMutability: "view";
|
|
1580
|
+
readonly inputs: readonly [];
|
|
1581
|
+
readonly outputs: readonly [{
|
|
1582
|
+
readonly type: "uint64";
|
|
1583
|
+
}];
|
|
1584
|
+
}, {
|
|
1585
|
+
readonly name: "burnBlocked";
|
|
1586
|
+
readonly type: "function";
|
|
1587
|
+
readonly stateMutability: "nonpayable";
|
|
1588
|
+
readonly inputs: readonly [{
|
|
1589
|
+
readonly type: "address";
|
|
1590
|
+
readonly name: "from";
|
|
1591
|
+
}, {
|
|
1592
|
+
readonly type: "uint256";
|
|
1593
|
+
readonly name: "amount";
|
|
1594
|
+
}];
|
|
1595
|
+
readonly outputs: readonly [];
|
|
1596
|
+
}, {
|
|
1597
|
+
readonly name: "mintWithMemo";
|
|
1598
|
+
readonly type: "function";
|
|
1599
|
+
readonly stateMutability: "nonpayable";
|
|
1600
|
+
readonly inputs: readonly [{
|
|
1601
|
+
readonly type: "address";
|
|
1602
|
+
readonly name: "to";
|
|
1603
|
+
}, {
|
|
1604
|
+
readonly type: "uint256";
|
|
1605
|
+
readonly name: "amount";
|
|
1606
|
+
}, {
|
|
1607
|
+
readonly type: "bytes32";
|
|
1608
|
+
readonly name: "memo";
|
|
1609
|
+
}];
|
|
1610
|
+
readonly outputs: readonly [];
|
|
1611
|
+
}, {
|
|
1612
|
+
readonly name: "burnWithMemo";
|
|
1613
|
+
readonly type: "function";
|
|
1614
|
+
readonly stateMutability: "nonpayable";
|
|
1615
|
+
readonly inputs: readonly [{
|
|
1616
|
+
readonly type: "uint256";
|
|
1617
|
+
readonly name: "amount";
|
|
1618
|
+
}, {
|
|
1619
|
+
readonly type: "bytes32";
|
|
1620
|
+
readonly name: "memo";
|
|
1621
|
+
}];
|
|
1622
|
+
readonly outputs: readonly [];
|
|
1623
|
+
}, {
|
|
1624
|
+
readonly name: "transferWithMemo";
|
|
1625
|
+
readonly type: "function";
|
|
1626
|
+
readonly stateMutability: "nonpayable";
|
|
1627
|
+
readonly inputs: readonly [{
|
|
1628
|
+
readonly type: "address";
|
|
1629
|
+
readonly name: "to";
|
|
1630
|
+
}, {
|
|
1631
|
+
readonly type: "uint256";
|
|
1632
|
+
readonly name: "amount";
|
|
1633
|
+
}, {
|
|
1634
|
+
readonly type: "bytes32";
|
|
1635
|
+
readonly name: "memo";
|
|
1636
|
+
}];
|
|
1637
|
+
readonly outputs: readonly [];
|
|
1638
|
+
}, {
|
|
1639
|
+
readonly name: "transferFromWithMemo";
|
|
1640
|
+
readonly type: "function";
|
|
1641
|
+
readonly stateMutability: "nonpayable";
|
|
1642
|
+
readonly inputs: readonly [{
|
|
1643
|
+
readonly type: "address";
|
|
1644
|
+
readonly name: "from";
|
|
1645
|
+
}, {
|
|
1646
|
+
readonly type: "address";
|
|
1647
|
+
readonly name: "to";
|
|
1648
|
+
}, {
|
|
1649
|
+
readonly type: "uint256";
|
|
1650
|
+
readonly name: "amount";
|
|
1651
|
+
}, {
|
|
1652
|
+
readonly type: "bytes32";
|
|
1653
|
+
readonly name: "memo";
|
|
1654
|
+
}];
|
|
1655
|
+
readonly outputs: readonly [{
|
|
1656
|
+
readonly type: "bool";
|
|
1657
|
+
}];
|
|
1658
|
+
}, {
|
|
1659
|
+
readonly name: "changeTransferPolicyId";
|
|
1660
|
+
readonly type: "function";
|
|
1661
|
+
readonly stateMutability: "nonpayable";
|
|
1662
|
+
readonly inputs: readonly [{
|
|
1663
|
+
readonly type: "uint64";
|
|
1664
|
+
readonly name: "newPolicyId";
|
|
1665
|
+
}];
|
|
1666
|
+
readonly outputs: readonly [];
|
|
1667
|
+
}, {
|
|
1668
|
+
readonly name: "setSupplyCap";
|
|
1669
|
+
readonly type: "function";
|
|
1670
|
+
readonly stateMutability: "nonpayable";
|
|
1671
|
+
readonly inputs: readonly [{
|
|
1672
|
+
readonly type: "uint256";
|
|
1673
|
+
readonly name: "newSupplyCap";
|
|
1674
|
+
}];
|
|
1675
|
+
readonly outputs: readonly [];
|
|
1676
|
+
}, {
|
|
1677
|
+
readonly name: "pause";
|
|
1678
|
+
readonly type: "function";
|
|
1679
|
+
readonly stateMutability: "nonpayable";
|
|
1680
|
+
readonly inputs: readonly [];
|
|
1681
|
+
readonly outputs: readonly [];
|
|
1682
|
+
}, {
|
|
1683
|
+
readonly name: "unpause";
|
|
1684
|
+
readonly type: "function";
|
|
1685
|
+
readonly stateMutability: "nonpayable";
|
|
1686
|
+
readonly inputs: readonly [];
|
|
1687
|
+
readonly outputs: readonly [];
|
|
1688
|
+
}, {
|
|
1689
|
+
readonly name: "setNextQuoteToken";
|
|
1690
|
+
readonly type: "function";
|
|
1691
|
+
readonly stateMutability: "nonpayable";
|
|
1692
|
+
readonly inputs: readonly [{
|
|
1693
|
+
readonly type: "address";
|
|
1694
|
+
readonly name: "newQuoteToken";
|
|
1695
|
+
}];
|
|
1696
|
+
readonly outputs: readonly [];
|
|
1697
|
+
}, {
|
|
1698
|
+
readonly name: "completeQuoteTokenUpdate";
|
|
1699
|
+
readonly type: "function";
|
|
1700
|
+
readonly stateMutability: "nonpayable";
|
|
1701
|
+
readonly inputs: readonly [];
|
|
1702
|
+
readonly outputs: readonly [];
|
|
1703
|
+
}, {
|
|
1704
|
+
readonly name: "PAUSE_ROLE";
|
|
1705
|
+
readonly type: "function";
|
|
1706
|
+
readonly stateMutability: "view";
|
|
1707
|
+
readonly inputs: readonly [];
|
|
1708
|
+
readonly outputs: readonly [{
|
|
1709
|
+
readonly type: "bytes32";
|
|
1710
|
+
}];
|
|
1711
|
+
}, {
|
|
1712
|
+
readonly name: "UNPAUSE_ROLE";
|
|
1713
|
+
readonly type: "function";
|
|
1714
|
+
readonly stateMutability: "view";
|
|
1715
|
+
readonly inputs: readonly [];
|
|
1716
|
+
readonly outputs: readonly [{
|
|
1717
|
+
readonly type: "bytes32";
|
|
1718
|
+
}];
|
|
1719
|
+
}, {
|
|
1720
|
+
readonly name: "ISSUER_ROLE";
|
|
1721
|
+
readonly type: "function";
|
|
1722
|
+
readonly stateMutability: "view";
|
|
1723
|
+
readonly inputs: readonly [];
|
|
1724
|
+
readonly outputs: readonly [{
|
|
1725
|
+
readonly type: "bytes32";
|
|
1726
|
+
}];
|
|
1727
|
+
}, {
|
|
1728
|
+
readonly name: "BURN_BLOCKED_ROLE";
|
|
1729
|
+
readonly type: "function";
|
|
1730
|
+
readonly stateMutability: "view";
|
|
1731
|
+
readonly inputs: readonly [];
|
|
1732
|
+
readonly outputs: readonly [{
|
|
1733
|
+
readonly type: "bytes32";
|
|
1734
|
+
}];
|
|
1735
|
+
}, {
|
|
1736
|
+
readonly name: "startReward";
|
|
1737
|
+
readonly type: "function";
|
|
1738
|
+
readonly stateMutability: "nonpayable";
|
|
1739
|
+
readonly inputs: readonly [{
|
|
1740
|
+
readonly type: "uint256";
|
|
1741
|
+
readonly name: "amount";
|
|
1742
|
+
}, {
|
|
1743
|
+
readonly type: "uint32";
|
|
1744
|
+
readonly name: "secs";
|
|
1745
|
+
}];
|
|
1746
|
+
readonly outputs: readonly [{
|
|
1747
|
+
readonly type: "uint64";
|
|
1748
|
+
}];
|
|
1749
|
+
}, {
|
|
1750
|
+
readonly name: "setRewardRecipient";
|
|
1751
|
+
readonly type: "function";
|
|
1752
|
+
readonly stateMutability: "nonpayable";
|
|
1753
|
+
readonly inputs: readonly [{
|
|
1754
|
+
readonly type: "address";
|
|
1755
|
+
readonly name: "recipient";
|
|
1756
|
+
}];
|
|
1757
|
+
readonly outputs: readonly [];
|
|
1758
|
+
}, {
|
|
1759
|
+
readonly name: "cancelReward";
|
|
1760
|
+
readonly type: "function";
|
|
1761
|
+
readonly stateMutability: "nonpayable";
|
|
1762
|
+
readonly inputs: readonly [{
|
|
1763
|
+
readonly type: "uint64";
|
|
1764
|
+
readonly name: "id";
|
|
1765
|
+
}];
|
|
1766
|
+
readonly outputs: readonly [{
|
|
1767
|
+
readonly type: "uint256";
|
|
1768
|
+
}];
|
|
1769
|
+
}, {
|
|
1770
|
+
readonly name: "claimRewards";
|
|
1771
|
+
readonly type: "function";
|
|
1772
|
+
readonly stateMutability: "nonpayable";
|
|
1773
|
+
readonly inputs: readonly [];
|
|
1774
|
+
readonly outputs: readonly [{
|
|
1775
|
+
readonly type: "uint256";
|
|
1776
|
+
}];
|
|
1777
|
+
}, {
|
|
1778
|
+
readonly name: "finalizeStreams";
|
|
1779
|
+
readonly type: "function";
|
|
1780
|
+
readonly stateMutability: "nonpayable";
|
|
1781
|
+
readonly inputs: readonly [{
|
|
1782
|
+
readonly type: "uint64";
|
|
1783
|
+
readonly name: "timestamp";
|
|
1784
|
+
}];
|
|
1785
|
+
readonly outputs: readonly [];
|
|
1786
|
+
}, {
|
|
1787
|
+
readonly name: "getStream";
|
|
1788
|
+
readonly type: "function";
|
|
1789
|
+
readonly stateMutability: "view";
|
|
1790
|
+
readonly inputs: readonly [{
|
|
1791
|
+
readonly type: "uint64";
|
|
1792
|
+
readonly name: "id";
|
|
1793
|
+
}];
|
|
1794
|
+
readonly outputs: readonly [{
|
|
1795
|
+
readonly type: "tuple";
|
|
1796
|
+
readonly components: readonly [{
|
|
1797
|
+
readonly type: "address";
|
|
1798
|
+
readonly name: "funder";
|
|
1799
|
+
}, {
|
|
1800
|
+
readonly type: "uint64";
|
|
1801
|
+
readonly name: "startTime";
|
|
1802
|
+
}, {
|
|
1803
|
+
readonly type: "uint64";
|
|
1804
|
+
readonly name: "endTime";
|
|
1805
|
+
}, {
|
|
1806
|
+
readonly type: "uint256";
|
|
1807
|
+
readonly name: "ratePerSecondScaled";
|
|
1808
|
+
}, {
|
|
1809
|
+
readonly type: "uint256";
|
|
1810
|
+
readonly name: "amountTotal";
|
|
1811
|
+
}];
|
|
1812
|
+
}];
|
|
1813
|
+
}, {
|
|
1814
|
+
readonly name: "totalRewardPerSecond";
|
|
1815
|
+
readonly type: "function";
|
|
1816
|
+
readonly stateMutability: "view";
|
|
1817
|
+
readonly inputs: readonly [];
|
|
1818
|
+
readonly outputs: readonly [{
|
|
1819
|
+
readonly type: "uint256";
|
|
1820
|
+
}];
|
|
1821
|
+
}, {
|
|
1822
|
+
readonly name: "optedInSupply";
|
|
1823
|
+
readonly type: "function";
|
|
1824
|
+
readonly stateMutability: "view";
|
|
1825
|
+
readonly inputs: readonly [];
|
|
1826
|
+
readonly outputs: readonly [{
|
|
1827
|
+
readonly type: "uint128";
|
|
1828
|
+
}];
|
|
1829
|
+
}, {
|
|
1830
|
+
readonly name: "nextStreamId";
|
|
1831
|
+
readonly type: "function";
|
|
1832
|
+
readonly stateMutability: "view";
|
|
1833
|
+
readonly inputs: readonly [];
|
|
1834
|
+
readonly outputs: readonly [{
|
|
1835
|
+
readonly type: "uint64";
|
|
1836
|
+
}];
|
|
1837
|
+
}, {
|
|
1838
|
+
readonly name: "userRewardInfo";
|
|
1839
|
+
readonly type: "function";
|
|
1840
|
+
readonly stateMutability: "view";
|
|
1841
|
+
readonly inputs: readonly [{
|
|
1842
|
+
readonly type: "address";
|
|
1843
|
+
readonly name: "account";
|
|
1844
|
+
}];
|
|
1845
|
+
readonly outputs: readonly [{
|
|
1846
|
+
readonly type: "tuple";
|
|
1847
|
+
readonly components: readonly [{
|
|
1848
|
+
readonly type: "address";
|
|
1849
|
+
readonly name: "delegatedRecipient";
|
|
1850
|
+
}, {
|
|
1851
|
+
readonly type: "uint256";
|
|
1852
|
+
readonly name: "rewardPerToken";
|
|
1853
|
+
}, {
|
|
1854
|
+
readonly type: "uint256";
|
|
1855
|
+
readonly name: "rewardBalance";
|
|
1856
|
+
}];
|
|
1857
|
+
}];
|
|
1858
|
+
}, {
|
|
1859
|
+
readonly name: "Transfer";
|
|
1860
|
+
readonly type: "event";
|
|
1861
|
+
readonly inputs: readonly [{
|
|
1862
|
+
readonly type: "address";
|
|
1863
|
+
readonly name: "from";
|
|
1864
|
+
readonly indexed: true;
|
|
1865
|
+
}, {
|
|
1866
|
+
readonly type: "address";
|
|
1867
|
+
readonly name: "to";
|
|
1868
|
+
readonly indexed: true;
|
|
1869
|
+
}, {
|
|
1870
|
+
readonly type: "uint256";
|
|
1871
|
+
readonly name: "amount";
|
|
1872
|
+
}];
|
|
1873
|
+
}, {
|
|
1874
|
+
readonly name: "Approval";
|
|
1875
|
+
readonly type: "event";
|
|
1876
|
+
readonly inputs: readonly [{
|
|
1877
|
+
readonly type: "address";
|
|
1878
|
+
readonly name: "owner";
|
|
1879
|
+
readonly indexed: true;
|
|
1880
|
+
}, {
|
|
1881
|
+
readonly type: "address";
|
|
1882
|
+
readonly name: "spender";
|
|
1883
|
+
readonly indexed: true;
|
|
1884
|
+
}, {
|
|
1885
|
+
readonly type: "uint256";
|
|
1886
|
+
readonly name: "amount";
|
|
1887
|
+
}];
|
|
1888
|
+
}, {
|
|
1889
|
+
readonly name: "Mint";
|
|
1890
|
+
readonly type: "event";
|
|
1891
|
+
readonly inputs: readonly [{
|
|
1892
|
+
readonly type: "address";
|
|
1893
|
+
readonly name: "to";
|
|
1894
|
+
readonly indexed: true;
|
|
1895
|
+
}, {
|
|
1896
|
+
readonly type: "uint256";
|
|
1897
|
+
readonly name: "amount";
|
|
1898
|
+
}];
|
|
1899
|
+
}, {
|
|
1900
|
+
readonly name: "Burn";
|
|
1901
|
+
readonly type: "event";
|
|
1902
|
+
readonly inputs: readonly [{
|
|
1903
|
+
readonly type: "address";
|
|
1904
|
+
readonly name: "from";
|
|
1905
|
+
readonly indexed: true;
|
|
1906
|
+
}, {
|
|
1907
|
+
readonly type: "uint256";
|
|
1908
|
+
readonly name: "amount";
|
|
1909
|
+
}];
|
|
1910
|
+
}, {
|
|
1911
|
+
readonly name: "BurnBlocked";
|
|
1912
|
+
readonly type: "event";
|
|
1913
|
+
readonly inputs: readonly [{
|
|
1914
|
+
readonly type: "address";
|
|
1915
|
+
readonly name: "from";
|
|
1916
|
+
readonly indexed: true;
|
|
1917
|
+
}, {
|
|
1918
|
+
readonly type: "uint256";
|
|
1919
|
+
readonly name: "amount";
|
|
1920
|
+
}];
|
|
1921
|
+
}, {
|
|
1922
|
+
readonly name: "TransferWithMemo";
|
|
1923
|
+
readonly type: "event";
|
|
1924
|
+
readonly inputs: readonly [{
|
|
1925
|
+
readonly type: "address";
|
|
1926
|
+
readonly name: "from";
|
|
1927
|
+
readonly indexed: true;
|
|
1928
|
+
}, {
|
|
1929
|
+
readonly type: "address";
|
|
1930
|
+
readonly name: "to";
|
|
1931
|
+
readonly indexed: true;
|
|
1932
|
+
}, {
|
|
1933
|
+
readonly type: "uint256";
|
|
1934
|
+
readonly name: "amount";
|
|
1935
|
+
}, {
|
|
1936
|
+
readonly type: "bytes32";
|
|
1937
|
+
readonly name: "memo";
|
|
1938
|
+
readonly indexed: true;
|
|
1939
|
+
}];
|
|
1940
|
+
}, {
|
|
1941
|
+
readonly name: "TransferPolicyUpdate";
|
|
1942
|
+
readonly type: "event";
|
|
1943
|
+
readonly inputs: readonly [{
|
|
1944
|
+
readonly type: "address";
|
|
1945
|
+
readonly name: "updater";
|
|
1946
|
+
readonly indexed: true;
|
|
1947
|
+
}, {
|
|
1948
|
+
readonly type: "uint64";
|
|
1949
|
+
readonly name: "newPolicyId";
|
|
1950
|
+
readonly indexed: true;
|
|
1951
|
+
}];
|
|
1952
|
+
}, {
|
|
1953
|
+
readonly name: "SupplyCapUpdate";
|
|
1954
|
+
readonly type: "event";
|
|
1955
|
+
readonly inputs: readonly [{
|
|
1956
|
+
readonly type: "address";
|
|
1957
|
+
readonly name: "updater";
|
|
1958
|
+
readonly indexed: true;
|
|
1959
|
+
}, {
|
|
1960
|
+
readonly type: "uint256";
|
|
1961
|
+
readonly name: "newSupplyCap";
|
|
1962
|
+
readonly indexed: true;
|
|
1963
|
+
}];
|
|
1964
|
+
}, {
|
|
1965
|
+
readonly name: "PauseStateUpdate";
|
|
1966
|
+
readonly type: "event";
|
|
1967
|
+
readonly inputs: readonly [{
|
|
1968
|
+
readonly type: "address";
|
|
1969
|
+
readonly name: "updater";
|
|
1970
|
+
readonly indexed: true;
|
|
1971
|
+
}, {
|
|
1972
|
+
readonly type: "bool";
|
|
1973
|
+
readonly name: "isPaused";
|
|
1974
|
+
}];
|
|
1975
|
+
}, {
|
|
1976
|
+
readonly name: "NextQuoteTokenSet";
|
|
1977
|
+
readonly type: "event";
|
|
1978
|
+
readonly inputs: readonly [{
|
|
1979
|
+
readonly type: "address";
|
|
1980
|
+
readonly name: "updater";
|
|
1981
|
+
readonly indexed: true;
|
|
1982
|
+
}, {
|
|
1983
|
+
readonly type: "address";
|
|
1984
|
+
readonly name: "nextQuoteToken";
|
|
1985
|
+
readonly indexed: true;
|
|
1986
|
+
}];
|
|
1987
|
+
}, {
|
|
1988
|
+
readonly name: "QuoteTokenUpdate";
|
|
1989
|
+
readonly type: "event";
|
|
1990
|
+
readonly inputs: readonly [{
|
|
1991
|
+
readonly type: "address";
|
|
1992
|
+
readonly name: "updater";
|
|
1993
|
+
readonly indexed: true;
|
|
1994
|
+
}, {
|
|
1995
|
+
readonly type: "address";
|
|
1996
|
+
readonly name: "newQuoteToken";
|
|
1997
|
+
readonly indexed: true;
|
|
1998
|
+
}];
|
|
1999
|
+
}, {
|
|
2000
|
+
readonly name: "RewardScheduled";
|
|
2001
|
+
readonly type: "event";
|
|
2002
|
+
readonly inputs: readonly [{
|
|
2003
|
+
readonly type: "address";
|
|
2004
|
+
readonly name: "funder";
|
|
2005
|
+
readonly indexed: true;
|
|
2006
|
+
}, {
|
|
2007
|
+
readonly type: "uint64";
|
|
2008
|
+
readonly name: "id";
|
|
2009
|
+
readonly indexed: true;
|
|
2010
|
+
}, {
|
|
2011
|
+
readonly type: "uint256";
|
|
2012
|
+
readonly name: "amount";
|
|
2013
|
+
}, {
|
|
2014
|
+
readonly type: "uint32";
|
|
2015
|
+
readonly name: "durationSeconds";
|
|
2016
|
+
}];
|
|
2017
|
+
}, {
|
|
2018
|
+
readonly name: "RewardCanceled";
|
|
2019
|
+
readonly type: "event";
|
|
2020
|
+
readonly inputs: readonly [{
|
|
2021
|
+
readonly type: "address";
|
|
2022
|
+
readonly name: "funder";
|
|
2023
|
+
readonly indexed: true;
|
|
2024
|
+
}, {
|
|
2025
|
+
readonly type: "uint64";
|
|
2026
|
+
readonly name: "id";
|
|
2027
|
+
readonly indexed: true;
|
|
2028
|
+
}, {
|
|
2029
|
+
readonly type: "uint256";
|
|
2030
|
+
readonly name: "refund";
|
|
2031
|
+
}];
|
|
2032
|
+
}, {
|
|
2033
|
+
readonly name: "RewardRecipientSet";
|
|
2034
|
+
readonly type: "event";
|
|
2035
|
+
readonly inputs: readonly [{
|
|
2036
|
+
readonly type: "address";
|
|
2037
|
+
readonly name: "holder";
|
|
2038
|
+
readonly indexed: true;
|
|
2039
|
+
}, {
|
|
2040
|
+
readonly type: "address";
|
|
2041
|
+
readonly name: "recipient";
|
|
2042
|
+
readonly indexed: true;
|
|
2043
|
+
}];
|
|
2044
|
+
}, {
|
|
2045
|
+
readonly name: "InsufficientBalance";
|
|
2046
|
+
readonly type: "error";
|
|
2047
|
+
readonly inputs: readonly [{
|
|
2048
|
+
readonly type: "uint256";
|
|
2049
|
+
readonly name: "available";
|
|
2050
|
+
}, {
|
|
2051
|
+
readonly type: "uint256";
|
|
2052
|
+
readonly name: "required";
|
|
2053
|
+
}, {
|
|
2054
|
+
readonly type: "address";
|
|
2055
|
+
readonly name: "token";
|
|
2056
|
+
}];
|
|
2057
|
+
}, {
|
|
2058
|
+
readonly name: "InsufficientAllowance";
|
|
2059
|
+
readonly type: "error";
|
|
2060
|
+
readonly inputs: readonly [];
|
|
2061
|
+
}, {
|
|
2062
|
+
readonly name: "SupplyCapExceeded";
|
|
2063
|
+
readonly type: "error";
|
|
2064
|
+
readonly inputs: readonly [];
|
|
2065
|
+
}, {
|
|
2066
|
+
readonly name: "InvalidSupplyCap";
|
|
2067
|
+
readonly type: "error";
|
|
2068
|
+
readonly inputs: readonly [];
|
|
2069
|
+
}, {
|
|
2070
|
+
readonly name: "InvalidPayload";
|
|
2071
|
+
readonly type: "error";
|
|
2072
|
+
readonly inputs: readonly [];
|
|
2073
|
+
}, {
|
|
2074
|
+
readonly name: "StringTooLong";
|
|
2075
|
+
readonly type: "error";
|
|
2076
|
+
readonly inputs: readonly [];
|
|
2077
|
+
}, {
|
|
2078
|
+
readonly name: "PolicyForbids";
|
|
2079
|
+
readonly type: "error";
|
|
2080
|
+
readonly inputs: readonly [];
|
|
2081
|
+
}, {
|
|
2082
|
+
readonly name: "InvalidRecipient";
|
|
2083
|
+
readonly type: "error";
|
|
2084
|
+
readonly inputs: readonly [];
|
|
2085
|
+
}, {
|
|
2086
|
+
readonly name: "ContractPaused";
|
|
2087
|
+
readonly type: "error";
|
|
2088
|
+
readonly inputs: readonly [];
|
|
2089
|
+
}, {
|
|
2090
|
+
readonly name: "InvalidCurrency";
|
|
2091
|
+
readonly type: "error";
|
|
2092
|
+
readonly inputs: readonly [];
|
|
2093
|
+
}, {
|
|
2094
|
+
readonly name: "InvalidQuoteToken";
|
|
2095
|
+
readonly type: "error";
|
|
2096
|
+
readonly inputs: readonly [];
|
|
2097
|
+
}, {
|
|
2098
|
+
readonly name: "TransfersDisabled";
|
|
2099
|
+
readonly type: "error";
|
|
2100
|
+
readonly inputs: readonly [];
|
|
2101
|
+
}, {
|
|
2102
|
+
readonly name: "InvalidAmount";
|
|
2103
|
+
readonly type: "error";
|
|
2104
|
+
readonly inputs: readonly [];
|
|
2105
|
+
}, {
|
|
2106
|
+
readonly name: "NotStreamFunder";
|
|
2107
|
+
readonly type: "error";
|
|
2108
|
+
readonly inputs: readonly [];
|
|
2109
|
+
}, {
|
|
2110
|
+
readonly name: "StreamInactive";
|
|
2111
|
+
readonly type: "error";
|
|
2112
|
+
readonly inputs: readonly [];
|
|
2113
|
+
}, {
|
|
2114
|
+
readonly name: "NoOptedInSupply";
|
|
2115
|
+
readonly type: "error";
|
|
2116
|
+
readonly inputs: readonly [];
|
|
2117
|
+
}, {
|
|
2118
|
+
readonly name: "Unauthorized";
|
|
2119
|
+
readonly type: "error";
|
|
2120
|
+
readonly inputs: readonly [];
|
|
2121
|
+
}, {
|
|
2122
|
+
readonly name: "hasRole";
|
|
2123
|
+
readonly type: "function";
|
|
2124
|
+
readonly stateMutability: "view";
|
|
2125
|
+
readonly inputs: readonly [{
|
|
2126
|
+
readonly type: "address";
|
|
2127
|
+
readonly name: "account";
|
|
2128
|
+
}, {
|
|
2129
|
+
readonly type: "bytes32";
|
|
2130
|
+
readonly name: "role";
|
|
2131
|
+
}];
|
|
2132
|
+
readonly outputs: readonly [{
|
|
2133
|
+
readonly type: "bool";
|
|
2134
|
+
}];
|
|
2135
|
+
}, {
|
|
2136
|
+
readonly name: "getRoleAdmin";
|
|
2137
|
+
readonly type: "function";
|
|
2138
|
+
readonly stateMutability: "view";
|
|
2139
|
+
readonly inputs: readonly [{
|
|
2140
|
+
readonly type: "bytes32";
|
|
2141
|
+
readonly name: "role";
|
|
2142
|
+
}];
|
|
2143
|
+
readonly outputs: readonly [{
|
|
2144
|
+
readonly type: "bytes32";
|
|
2145
|
+
}];
|
|
2146
|
+
}, {
|
|
2147
|
+
readonly name: "grantRole";
|
|
2148
|
+
readonly type: "function";
|
|
2149
|
+
readonly stateMutability: "nonpayable";
|
|
2150
|
+
readonly inputs: readonly [{
|
|
2151
|
+
readonly type: "bytes32";
|
|
2152
|
+
readonly name: "role";
|
|
2153
|
+
}, {
|
|
2154
|
+
readonly type: "address";
|
|
2155
|
+
readonly name: "account";
|
|
2156
|
+
}];
|
|
2157
|
+
readonly outputs: readonly [];
|
|
2158
|
+
}, {
|
|
2159
|
+
readonly name: "revokeRole";
|
|
2160
|
+
readonly type: "function";
|
|
2161
|
+
readonly stateMutability: "nonpayable";
|
|
2162
|
+
readonly inputs: readonly [{
|
|
2163
|
+
readonly type: "bytes32";
|
|
2164
|
+
readonly name: "role";
|
|
2165
|
+
}, {
|
|
2166
|
+
readonly type: "address";
|
|
2167
|
+
readonly name: "account";
|
|
2168
|
+
}];
|
|
2169
|
+
readonly outputs: readonly [];
|
|
2170
|
+
}, {
|
|
2171
|
+
readonly name: "renounceRole";
|
|
2172
|
+
readonly type: "function";
|
|
2173
|
+
readonly stateMutability: "nonpayable";
|
|
2174
|
+
readonly inputs: readonly [{
|
|
2175
|
+
readonly type: "bytes32";
|
|
2176
|
+
readonly name: "role";
|
|
2177
|
+
}];
|
|
2178
|
+
readonly outputs: readonly [];
|
|
2179
|
+
}, {
|
|
2180
|
+
readonly name: "setRoleAdmin";
|
|
2181
|
+
readonly type: "function";
|
|
2182
|
+
readonly stateMutability: "nonpayable";
|
|
2183
|
+
readonly inputs: readonly [{
|
|
2184
|
+
readonly type: "bytes32";
|
|
2185
|
+
readonly name: "role";
|
|
2186
|
+
}, {
|
|
2187
|
+
readonly type: "bytes32";
|
|
2188
|
+
readonly name: "adminRole";
|
|
2189
|
+
}];
|
|
2190
|
+
readonly outputs: readonly [];
|
|
2191
|
+
}, {
|
|
2192
|
+
readonly name: "RoleMembershipUpdated";
|
|
2193
|
+
readonly type: "event";
|
|
2194
|
+
readonly inputs: readonly [{
|
|
2195
|
+
readonly type: "bytes32";
|
|
2196
|
+
readonly name: "role";
|
|
2197
|
+
readonly indexed: true;
|
|
2198
|
+
}, {
|
|
2199
|
+
readonly type: "address";
|
|
2200
|
+
readonly name: "account";
|
|
2201
|
+
readonly indexed: true;
|
|
2202
|
+
}, {
|
|
2203
|
+
readonly type: "address";
|
|
2204
|
+
readonly name: "sender";
|
|
2205
|
+
readonly indexed: true;
|
|
2206
|
+
}, {
|
|
2207
|
+
readonly type: "bool";
|
|
2208
|
+
readonly name: "hasRole";
|
|
2209
|
+
}];
|
|
2210
|
+
}, {
|
|
2211
|
+
readonly name: "RoleAdminUpdated";
|
|
2212
|
+
readonly type: "event";
|
|
2213
|
+
readonly inputs: readonly [{
|
|
2214
|
+
readonly type: "bytes32";
|
|
2215
|
+
readonly name: "role";
|
|
2216
|
+
readonly indexed: true;
|
|
2217
|
+
}, {
|
|
2218
|
+
readonly type: "bytes32";
|
|
2219
|
+
readonly name: "newAdminRole";
|
|
2220
|
+
readonly indexed: true;
|
|
2221
|
+
}, {
|
|
2222
|
+
readonly type: "address";
|
|
2223
|
+
readonly name: "sender";
|
|
2224
|
+
readonly indexed: true;
|
|
2225
|
+
}];
|
|
2226
|
+
}, {
|
|
2227
|
+
readonly name: "Unauthorized";
|
|
2228
|
+
readonly type: "error";
|
|
2229
|
+
readonly inputs: readonly [];
|
|
2230
|
+
}], "RewardRecipientSet">;
|
|
2231
|
+
}
|
|
2232
|
+
export declare namespace setRecipientSync {
|
|
2233
|
+
type Parameters<chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined> = WriteParameters<chain, account> & setRecipient.Args;
|
|
2234
|
+
type ReturnValue = {
|
|
2235
|
+
/** The token holder address who set their reward recipient */
|
|
2236
|
+
holder: Address;
|
|
2237
|
+
/** The transaction receipt */
|
|
2238
|
+
receipt: Awaited<ReturnType<typeof writeContractSync>>;
|
|
2239
|
+
/** The reward recipient address (zero address indicates opt-out) */
|
|
2240
|
+
recipient: Address;
|
|
2241
|
+
};
|
|
2242
|
+
type ErrorType = setRecipient.ErrorType;
|
|
2243
|
+
}
|
|
2244
|
+
/**
|
|
2245
|
+
* Starts a new reward stream that distributes tokens to opted-in holders.
|
|
2246
|
+
*
|
|
2247
|
+
* Behavior:
|
|
2248
|
+
* - Transfers `amount` of tokens from the caller into the token contract's reward pool.
|
|
2249
|
+
* - If `seconds == 0`: Immediately distributes `amount` to current opted-in holders by increasing `rewardPerTokenStored`.
|
|
2250
|
+
* Returns stream ID `0`. Distribution occurs when holders interact with the token (transfers, etc.).
|
|
2251
|
+
* - If `seconds > 0`: Starts a linear stream that emits evenly from `block.timestamp` to `block.timestamp + seconds`.
|
|
2252
|
+
* Returns a unique stream ID for later cancellation.
|
|
2253
|
+
*
|
|
2254
|
+
* Notes:
|
|
2255
|
+
* - Reverts with `InvalidAmount` if `amount == 0`.
|
|
2256
|
+
* - Allowed even when `optedInSupply == 0` (tokens distributed while no one is opted in are locked permanently).
|
|
2257
|
+
* - The transfer from caller to pool is subject to TIP-403 policy checks.
|
|
2258
|
+
*
|
|
2259
|
+
* @example
|
|
2260
|
+
* ```ts
|
|
2261
|
+
* import { createClient, http } from 'viem'
|
|
2262
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
2263
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
2264
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
2265
|
+
*
|
|
2266
|
+
* const client = createClient({
|
|
2267
|
+
* account: privateKeyToAccount('0x...'),
|
|
2268
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
2269
|
+
* transport: http(),
|
|
2270
|
+
* })
|
|
2271
|
+
*
|
|
2272
|
+
* const hash = await Actions.rewards.start(client, {
|
|
2273
|
+
* amount: 100000000000000000000n,
|
|
2274
|
+
* seconds: 86400,
|
|
2275
|
+
* token: '0x20c0000000000000000000000000000000000001',
|
|
2276
|
+
* })
|
|
2277
|
+
* ```
|
|
2278
|
+
*
|
|
2279
|
+
* @param client - Client.
|
|
2280
|
+
* @param parameters - Parameters.
|
|
2281
|
+
* @returns The transaction hash.
|
|
2282
|
+
*/
|
|
2283
|
+
export declare function start<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters: start.Parameters<chain, account>): Promise<start.ReturnValue>;
|
|
2284
|
+
/**
|
|
2285
|
+
* Starts a new reward stream that distributes tokens to opted-in holders and waits for confirmation.
|
|
2286
|
+
*
|
|
2287
|
+
* Behavior:
|
|
2288
|
+
* - Transfers `amount` of tokens from the caller into the token contract's reward pool.
|
|
2289
|
+
* - If `seconds == 0`: Immediately distributes `amount` to current opted-in holders by increasing `rewardPerTokenStored`.
|
|
2290
|
+
* Returns stream ID `0`. Distribution occurs when holders interact with the token (transfers, etc.).
|
|
2291
|
+
* - If `seconds > 0`: Starts a linear stream that emits evenly from `block.timestamp` to `block.timestamp + seconds`.
|
|
2292
|
+
* Returns a unique stream ID for later cancellation.
|
|
2293
|
+
*
|
|
2294
|
+
* Notes:
|
|
2295
|
+
* - Reverts with `InvalidAmount` if `amount == 0`.
|
|
2296
|
+
* - Allowed even when `optedInSupply == 0` (tokens distributed while no one is opted in are locked permanently).
|
|
2297
|
+
* - The transfer from caller to pool is subject to TIP-403 policy checks.
|
|
2298
|
+
*
|
|
2299
|
+
* @example
|
|
2300
|
+
* ```ts
|
|
2301
|
+
* import { createClient, http } from 'viem'
|
|
2302
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
2303
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
2304
|
+
* import { privateKeyToAccount } from 'viem/accounts'
|
|
2305
|
+
*
|
|
2306
|
+
* const client = createClient({
|
|
2307
|
+
* account: privateKeyToAccount('0x...'),
|
|
2308
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
2309
|
+
* transport: http(),
|
|
2310
|
+
* })
|
|
2311
|
+
*
|
|
2312
|
+
* const { id, receipt } = await Actions.rewards.startSync(client, {
|
|
2313
|
+
* amount: 100000000000000000000n,
|
|
2314
|
+
* seconds: 86400,
|
|
2315
|
+
* token: '0x20c0000000000000000000000000000000000001',
|
|
2316
|
+
* })
|
|
2317
|
+
* ```
|
|
2318
|
+
*
|
|
2319
|
+
* @param client - Client.
|
|
2320
|
+
* @param parameters - Parameters.
|
|
2321
|
+
* @returns The stream ID, funder, amount, duration, and transaction receipt.
|
|
2322
|
+
*/
|
|
2323
|
+
export declare function startSync<chain extends Chain | undefined, account extends Account | undefined>(client: Client<Transport, chain, account>, parameters: startSync.Parameters<chain, account>): Promise<startSync.ReturnValue>;
|
|
2324
|
+
export declare namespace start {
|
|
2325
|
+
type Args = {
|
|
2326
|
+
/** The amount of tokens to distribute (must be > 0) */
|
|
2327
|
+
amount: bigint;
|
|
2328
|
+
/** The duration in seconds (0 for immediate distribution, >0 for linear streaming) */
|
|
2329
|
+
seconds: number;
|
|
2330
|
+
/** The TIP20 token address */
|
|
2331
|
+
token: Address;
|
|
2332
|
+
};
|
|
2333
|
+
type Parameters<chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined> = WriteParameters<chain, account> & Args;
|
|
2334
|
+
type ReturnValue = WriteContractReturnType;
|
|
2335
|
+
type ErrorType = BaseErrorType;
|
|
2336
|
+
/** @internal */
|
|
2337
|
+
function inner<action extends typeof writeContract | typeof writeContractSync, chain extends Chain | undefined, account extends Account | undefined>(action: action, client: Client<Transport, chain, account>, parameters: Parameters<chain, account>): Promise<ReturnType<action>>;
|
|
2338
|
+
/**
|
|
2339
|
+
* Defines a call to the `start` function.
|
|
2340
|
+
*
|
|
2341
|
+
* Can be passed as a parameter to:
|
|
2342
|
+
* - [`estimateContractGas`](https://viem.sh/docs/contract/estimateContractGas): estimate the gas cost of the call
|
|
2343
|
+
* - [`simulateContract`](https://viem.sh/docs/contract/simulateContract): simulate the call
|
|
2344
|
+
* - [`sendCalls`](https://viem.sh/docs/actions/wallet/sendCalls): send multiple calls
|
|
2345
|
+
*
|
|
2346
|
+
* @example
|
|
2347
|
+
* ```ts
|
|
2348
|
+
* import { createClient, http, walletActions } from 'viem'
|
|
2349
|
+
* import { tempo } from 'tempo.ts/chains'
|
|
2350
|
+
* import { Actions } from 'tempo.ts/viem'
|
|
2351
|
+
*
|
|
2352
|
+
* const client = createClient({
|
|
2353
|
+
* chain: tempo({ feeToken: '0x20c0000000000000000000000000000000000001' })
|
|
2354
|
+
* transport: http(),
|
|
2355
|
+
* }).extend(walletActions)
|
|
2356
|
+
*
|
|
2357
|
+
* const hash = await client.sendTransaction({
|
|
2358
|
+
* calls: [actions.rewards.start.call({
|
|
2359
|
+
* amount: 100000000000000000000n,
|
|
2360
|
+
* seconds: 86400,
|
|
2361
|
+
* token: '0x20c0000000000000000000000000000000000001',
|
|
2362
|
+
* })],
|
|
2363
|
+
* })
|
|
2364
|
+
* ```
|
|
2365
|
+
*
|
|
2366
|
+
* @param args - Arguments.
|
|
2367
|
+
* @returns The call.
|
|
2368
|
+
*/
|
|
2369
|
+
function call(args: Args): {
|
|
2370
|
+
abi: [{
|
|
2371
|
+
readonly name: "startReward";
|
|
2372
|
+
readonly type: "function";
|
|
2373
|
+
readonly stateMutability: "nonpayable";
|
|
2374
|
+
readonly inputs: readonly [{
|
|
2375
|
+
readonly type: "uint256";
|
|
2376
|
+
readonly name: "amount";
|
|
2377
|
+
}, {
|
|
2378
|
+
readonly type: "uint32";
|
|
2379
|
+
readonly name: "secs";
|
|
2380
|
+
}];
|
|
2381
|
+
readonly outputs: readonly [{
|
|
2382
|
+
readonly type: "uint64";
|
|
2383
|
+
}];
|
|
2384
|
+
}];
|
|
2385
|
+
functionName: "startReward";
|
|
2386
|
+
args?: readonly [bigint, number] | undefined;
|
|
2387
|
+
} & {
|
|
2388
|
+
args: readonly [bigint, number];
|
|
2389
|
+
} & {
|
|
2390
|
+
address: Address;
|
|
2391
|
+
} & {
|
|
2392
|
+
data: import("viem").Hex;
|
|
2393
|
+
to: Address;
|
|
2394
|
+
};
|
|
2395
|
+
/**
|
|
2396
|
+
* Extracts the `RewardScheduled` event from logs.
|
|
2397
|
+
*
|
|
2398
|
+
* @param logs - The logs.
|
|
2399
|
+
* @returns The `RewardScheduled` event.
|
|
2400
|
+
*/
|
|
2401
|
+
function extractEvent(logs: Log[]): Log<bigint, number, false, undefined, true, readonly [{
|
|
2402
|
+
readonly name: "name";
|
|
2403
|
+
readonly type: "function";
|
|
2404
|
+
readonly stateMutability: "view";
|
|
2405
|
+
readonly inputs: readonly [];
|
|
2406
|
+
readonly outputs: readonly [{
|
|
2407
|
+
readonly type: "string";
|
|
2408
|
+
}];
|
|
2409
|
+
}, {
|
|
2410
|
+
readonly name: "symbol";
|
|
2411
|
+
readonly type: "function";
|
|
2412
|
+
readonly stateMutability: "view";
|
|
2413
|
+
readonly inputs: readonly [];
|
|
2414
|
+
readonly outputs: readonly [{
|
|
2415
|
+
readonly type: "string";
|
|
2416
|
+
}];
|
|
2417
|
+
}, {
|
|
2418
|
+
readonly name: "decimals";
|
|
2419
|
+
readonly type: "function";
|
|
2420
|
+
readonly stateMutability: "view";
|
|
2421
|
+
readonly inputs: readonly [];
|
|
2422
|
+
readonly outputs: readonly [{
|
|
2423
|
+
readonly type: "uint8";
|
|
2424
|
+
}];
|
|
2425
|
+
}, {
|
|
2426
|
+
readonly name: "totalSupply";
|
|
2427
|
+
readonly type: "function";
|
|
2428
|
+
readonly stateMutability: "view";
|
|
2429
|
+
readonly inputs: readonly [];
|
|
2430
|
+
readonly outputs: readonly [{
|
|
2431
|
+
readonly type: "uint256";
|
|
2432
|
+
}];
|
|
2433
|
+
}, {
|
|
2434
|
+
readonly name: "quoteToken";
|
|
2435
|
+
readonly type: "function";
|
|
2436
|
+
readonly stateMutability: "view";
|
|
2437
|
+
readonly inputs: readonly [];
|
|
2438
|
+
readonly outputs: readonly [{
|
|
2439
|
+
readonly type: "address";
|
|
2440
|
+
}];
|
|
2441
|
+
}, {
|
|
2442
|
+
readonly name: "nextQuoteToken";
|
|
2443
|
+
readonly type: "function";
|
|
2444
|
+
readonly stateMutability: "view";
|
|
2445
|
+
readonly inputs: readonly [];
|
|
2446
|
+
readonly outputs: readonly [{
|
|
2447
|
+
readonly type: "address";
|
|
2448
|
+
}];
|
|
2449
|
+
}, {
|
|
2450
|
+
readonly name: "balanceOf";
|
|
2451
|
+
readonly type: "function";
|
|
2452
|
+
readonly stateMutability: "view";
|
|
2453
|
+
readonly inputs: readonly [{
|
|
2454
|
+
readonly type: "address";
|
|
2455
|
+
readonly name: "account";
|
|
2456
|
+
}];
|
|
2457
|
+
readonly outputs: readonly [{
|
|
2458
|
+
readonly type: "uint256";
|
|
2459
|
+
}];
|
|
2460
|
+
}, {
|
|
2461
|
+
readonly name: "transfer";
|
|
2462
|
+
readonly type: "function";
|
|
2463
|
+
readonly stateMutability: "nonpayable";
|
|
2464
|
+
readonly inputs: readonly [{
|
|
2465
|
+
readonly type: "address";
|
|
2466
|
+
readonly name: "to";
|
|
2467
|
+
}, {
|
|
2468
|
+
readonly type: "uint256";
|
|
2469
|
+
readonly name: "amount";
|
|
2470
|
+
}];
|
|
2471
|
+
readonly outputs: readonly [{
|
|
2472
|
+
readonly type: "bool";
|
|
2473
|
+
}];
|
|
2474
|
+
}, {
|
|
2475
|
+
readonly name: "approve";
|
|
2476
|
+
readonly type: "function";
|
|
2477
|
+
readonly stateMutability: "nonpayable";
|
|
2478
|
+
readonly inputs: readonly [{
|
|
2479
|
+
readonly type: "address";
|
|
2480
|
+
readonly name: "spender";
|
|
2481
|
+
}, {
|
|
2482
|
+
readonly type: "uint256";
|
|
2483
|
+
readonly name: "amount";
|
|
2484
|
+
}];
|
|
2485
|
+
readonly outputs: readonly [{
|
|
2486
|
+
readonly type: "bool";
|
|
2487
|
+
}];
|
|
2488
|
+
}, {
|
|
2489
|
+
readonly name: "allowance";
|
|
2490
|
+
readonly type: "function";
|
|
2491
|
+
readonly stateMutability: "view";
|
|
2492
|
+
readonly inputs: readonly [{
|
|
2493
|
+
readonly type: "address";
|
|
2494
|
+
readonly name: "owner";
|
|
2495
|
+
}, {
|
|
2496
|
+
readonly type: "address";
|
|
2497
|
+
readonly name: "spender";
|
|
2498
|
+
}];
|
|
2499
|
+
readonly outputs: readonly [{
|
|
2500
|
+
readonly type: "uint256";
|
|
2501
|
+
}];
|
|
2502
|
+
}, {
|
|
2503
|
+
readonly name: "transferFrom";
|
|
2504
|
+
readonly type: "function";
|
|
2505
|
+
readonly stateMutability: "nonpayable";
|
|
2506
|
+
readonly inputs: readonly [{
|
|
2507
|
+
readonly type: "address";
|
|
2508
|
+
readonly name: "from";
|
|
2509
|
+
}, {
|
|
2510
|
+
readonly type: "address";
|
|
2511
|
+
readonly name: "to";
|
|
2512
|
+
}, {
|
|
2513
|
+
readonly type: "uint256";
|
|
2514
|
+
readonly name: "amount";
|
|
2515
|
+
}];
|
|
2516
|
+
readonly outputs: readonly [{
|
|
2517
|
+
readonly type: "bool";
|
|
2518
|
+
}];
|
|
2519
|
+
}, {
|
|
2520
|
+
readonly name: "mint";
|
|
2521
|
+
readonly type: "function";
|
|
2522
|
+
readonly stateMutability: "nonpayable";
|
|
2523
|
+
readonly inputs: readonly [{
|
|
2524
|
+
readonly type: "address";
|
|
2525
|
+
readonly name: "to";
|
|
2526
|
+
}, {
|
|
2527
|
+
readonly type: "uint256";
|
|
2528
|
+
readonly name: "amount";
|
|
2529
|
+
}];
|
|
2530
|
+
readonly outputs: readonly [];
|
|
2531
|
+
}, {
|
|
2532
|
+
readonly name: "burn";
|
|
2533
|
+
readonly type: "function";
|
|
2534
|
+
readonly stateMutability: "nonpayable";
|
|
2535
|
+
readonly inputs: readonly [{
|
|
2536
|
+
readonly type: "uint256";
|
|
2537
|
+
readonly name: "amount";
|
|
2538
|
+
}];
|
|
2539
|
+
readonly outputs: readonly [];
|
|
2540
|
+
}, {
|
|
2541
|
+
readonly name: "currency";
|
|
2542
|
+
readonly type: "function";
|
|
2543
|
+
readonly stateMutability: "view";
|
|
2544
|
+
readonly inputs: readonly [];
|
|
2545
|
+
readonly outputs: readonly [{
|
|
2546
|
+
readonly type: "string";
|
|
2547
|
+
}];
|
|
2548
|
+
}, {
|
|
2549
|
+
readonly name: "supplyCap";
|
|
2550
|
+
readonly type: "function";
|
|
2551
|
+
readonly stateMutability: "view";
|
|
2552
|
+
readonly inputs: readonly [];
|
|
2553
|
+
readonly outputs: readonly [{
|
|
2554
|
+
readonly type: "uint256";
|
|
2555
|
+
}];
|
|
2556
|
+
}, {
|
|
2557
|
+
readonly name: "paused";
|
|
2558
|
+
readonly type: "function";
|
|
2559
|
+
readonly stateMutability: "view";
|
|
2560
|
+
readonly inputs: readonly [];
|
|
2561
|
+
readonly outputs: readonly [{
|
|
2562
|
+
readonly type: "bool";
|
|
2563
|
+
}];
|
|
2564
|
+
}, {
|
|
2565
|
+
readonly name: "transferPolicyId";
|
|
2566
|
+
readonly type: "function";
|
|
2567
|
+
readonly stateMutability: "view";
|
|
2568
|
+
readonly inputs: readonly [];
|
|
2569
|
+
readonly outputs: readonly [{
|
|
2570
|
+
readonly type: "uint64";
|
|
2571
|
+
}];
|
|
2572
|
+
}, {
|
|
2573
|
+
readonly name: "burnBlocked";
|
|
2574
|
+
readonly type: "function";
|
|
2575
|
+
readonly stateMutability: "nonpayable";
|
|
2576
|
+
readonly inputs: readonly [{
|
|
2577
|
+
readonly type: "address";
|
|
2578
|
+
readonly name: "from";
|
|
2579
|
+
}, {
|
|
2580
|
+
readonly type: "uint256";
|
|
2581
|
+
readonly name: "amount";
|
|
2582
|
+
}];
|
|
2583
|
+
readonly outputs: readonly [];
|
|
2584
|
+
}, {
|
|
2585
|
+
readonly name: "mintWithMemo";
|
|
2586
|
+
readonly type: "function";
|
|
2587
|
+
readonly stateMutability: "nonpayable";
|
|
2588
|
+
readonly inputs: readonly [{
|
|
2589
|
+
readonly type: "address";
|
|
2590
|
+
readonly name: "to";
|
|
2591
|
+
}, {
|
|
2592
|
+
readonly type: "uint256";
|
|
2593
|
+
readonly name: "amount";
|
|
2594
|
+
}, {
|
|
2595
|
+
readonly type: "bytes32";
|
|
2596
|
+
readonly name: "memo";
|
|
2597
|
+
}];
|
|
2598
|
+
readonly outputs: readonly [];
|
|
2599
|
+
}, {
|
|
2600
|
+
readonly name: "burnWithMemo";
|
|
2601
|
+
readonly type: "function";
|
|
2602
|
+
readonly stateMutability: "nonpayable";
|
|
2603
|
+
readonly inputs: readonly [{
|
|
2604
|
+
readonly type: "uint256";
|
|
2605
|
+
readonly name: "amount";
|
|
2606
|
+
}, {
|
|
2607
|
+
readonly type: "bytes32";
|
|
2608
|
+
readonly name: "memo";
|
|
2609
|
+
}];
|
|
2610
|
+
readonly outputs: readonly [];
|
|
2611
|
+
}, {
|
|
2612
|
+
readonly name: "transferWithMemo";
|
|
2613
|
+
readonly type: "function";
|
|
2614
|
+
readonly stateMutability: "nonpayable";
|
|
2615
|
+
readonly inputs: readonly [{
|
|
2616
|
+
readonly type: "address";
|
|
2617
|
+
readonly name: "to";
|
|
2618
|
+
}, {
|
|
2619
|
+
readonly type: "uint256";
|
|
2620
|
+
readonly name: "amount";
|
|
2621
|
+
}, {
|
|
2622
|
+
readonly type: "bytes32";
|
|
2623
|
+
readonly name: "memo";
|
|
2624
|
+
}];
|
|
2625
|
+
readonly outputs: readonly [];
|
|
2626
|
+
}, {
|
|
2627
|
+
readonly name: "transferFromWithMemo";
|
|
2628
|
+
readonly type: "function";
|
|
2629
|
+
readonly stateMutability: "nonpayable";
|
|
2630
|
+
readonly inputs: readonly [{
|
|
2631
|
+
readonly type: "address";
|
|
2632
|
+
readonly name: "from";
|
|
2633
|
+
}, {
|
|
2634
|
+
readonly type: "address";
|
|
2635
|
+
readonly name: "to";
|
|
2636
|
+
}, {
|
|
2637
|
+
readonly type: "uint256";
|
|
2638
|
+
readonly name: "amount";
|
|
2639
|
+
}, {
|
|
2640
|
+
readonly type: "bytes32";
|
|
2641
|
+
readonly name: "memo";
|
|
2642
|
+
}];
|
|
2643
|
+
readonly outputs: readonly [{
|
|
2644
|
+
readonly type: "bool";
|
|
2645
|
+
}];
|
|
2646
|
+
}, {
|
|
2647
|
+
readonly name: "changeTransferPolicyId";
|
|
2648
|
+
readonly type: "function";
|
|
2649
|
+
readonly stateMutability: "nonpayable";
|
|
2650
|
+
readonly inputs: readonly [{
|
|
2651
|
+
readonly type: "uint64";
|
|
2652
|
+
readonly name: "newPolicyId";
|
|
2653
|
+
}];
|
|
2654
|
+
readonly outputs: readonly [];
|
|
2655
|
+
}, {
|
|
2656
|
+
readonly name: "setSupplyCap";
|
|
2657
|
+
readonly type: "function";
|
|
2658
|
+
readonly stateMutability: "nonpayable";
|
|
2659
|
+
readonly inputs: readonly [{
|
|
2660
|
+
readonly type: "uint256";
|
|
2661
|
+
readonly name: "newSupplyCap";
|
|
2662
|
+
}];
|
|
2663
|
+
readonly outputs: readonly [];
|
|
2664
|
+
}, {
|
|
2665
|
+
readonly name: "pause";
|
|
2666
|
+
readonly type: "function";
|
|
2667
|
+
readonly stateMutability: "nonpayable";
|
|
2668
|
+
readonly inputs: readonly [];
|
|
2669
|
+
readonly outputs: readonly [];
|
|
2670
|
+
}, {
|
|
2671
|
+
readonly name: "unpause";
|
|
2672
|
+
readonly type: "function";
|
|
2673
|
+
readonly stateMutability: "nonpayable";
|
|
2674
|
+
readonly inputs: readonly [];
|
|
2675
|
+
readonly outputs: readonly [];
|
|
2676
|
+
}, {
|
|
2677
|
+
readonly name: "setNextQuoteToken";
|
|
2678
|
+
readonly type: "function";
|
|
2679
|
+
readonly stateMutability: "nonpayable";
|
|
2680
|
+
readonly inputs: readonly [{
|
|
2681
|
+
readonly type: "address";
|
|
2682
|
+
readonly name: "newQuoteToken";
|
|
2683
|
+
}];
|
|
2684
|
+
readonly outputs: readonly [];
|
|
2685
|
+
}, {
|
|
2686
|
+
readonly name: "completeQuoteTokenUpdate";
|
|
2687
|
+
readonly type: "function";
|
|
2688
|
+
readonly stateMutability: "nonpayable";
|
|
2689
|
+
readonly inputs: readonly [];
|
|
2690
|
+
readonly outputs: readonly [];
|
|
2691
|
+
}, {
|
|
2692
|
+
readonly name: "PAUSE_ROLE";
|
|
2693
|
+
readonly type: "function";
|
|
2694
|
+
readonly stateMutability: "view";
|
|
2695
|
+
readonly inputs: readonly [];
|
|
2696
|
+
readonly outputs: readonly [{
|
|
2697
|
+
readonly type: "bytes32";
|
|
2698
|
+
}];
|
|
2699
|
+
}, {
|
|
2700
|
+
readonly name: "UNPAUSE_ROLE";
|
|
2701
|
+
readonly type: "function";
|
|
2702
|
+
readonly stateMutability: "view";
|
|
2703
|
+
readonly inputs: readonly [];
|
|
2704
|
+
readonly outputs: readonly [{
|
|
2705
|
+
readonly type: "bytes32";
|
|
2706
|
+
}];
|
|
2707
|
+
}, {
|
|
2708
|
+
readonly name: "ISSUER_ROLE";
|
|
2709
|
+
readonly type: "function";
|
|
2710
|
+
readonly stateMutability: "view";
|
|
2711
|
+
readonly inputs: readonly [];
|
|
2712
|
+
readonly outputs: readonly [{
|
|
2713
|
+
readonly type: "bytes32";
|
|
2714
|
+
}];
|
|
2715
|
+
}, {
|
|
2716
|
+
readonly name: "BURN_BLOCKED_ROLE";
|
|
2717
|
+
readonly type: "function";
|
|
2718
|
+
readonly stateMutability: "view";
|
|
2719
|
+
readonly inputs: readonly [];
|
|
2720
|
+
readonly outputs: readonly [{
|
|
2721
|
+
readonly type: "bytes32";
|
|
2722
|
+
}];
|
|
2723
|
+
}, {
|
|
2724
|
+
readonly name: "startReward";
|
|
2725
|
+
readonly type: "function";
|
|
2726
|
+
readonly stateMutability: "nonpayable";
|
|
2727
|
+
readonly inputs: readonly [{
|
|
2728
|
+
readonly type: "uint256";
|
|
2729
|
+
readonly name: "amount";
|
|
2730
|
+
}, {
|
|
2731
|
+
readonly type: "uint32";
|
|
2732
|
+
readonly name: "secs";
|
|
2733
|
+
}];
|
|
2734
|
+
readonly outputs: readonly [{
|
|
2735
|
+
readonly type: "uint64";
|
|
2736
|
+
}];
|
|
2737
|
+
}, {
|
|
2738
|
+
readonly name: "setRewardRecipient";
|
|
2739
|
+
readonly type: "function";
|
|
2740
|
+
readonly stateMutability: "nonpayable";
|
|
2741
|
+
readonly inputs: readonly [{
|
|
2742
|
+
readonly type: "address";
|
|
2743
|
+
readonly name: "recipient";
|
|
2744
|
+
}];
|
|
2745
|
+
readonly outputs: readonly [];
|
|
2746
|
+
}, {
|
|
2747
|
+
readonly name: "cancelReward";
|
|
2748
|
+
readonly type: "function";
|
|
2749
|
+
readonly stateMutability: "nonpayable";
|
|
2750
|
+
readonly inputs: readonly [{
|
|
2751
|
+
readonly type: "uint64";
|
|
2752
|
+
readonly name: "id";
|
|
2753
|
+
}];
|
|
2754
|
+
readonly outputs: readonly [{
|
|
2755
|
+
readonly type: "uint256";
|
|
2756
|
+
}];
|
|
2757
|
+
}, {
|
|
2758
|
+
readonly name: "claimRewards";
|
|
2759
|
+
readonly type: "function";
|
|
2760
|
+
readonly stateMutability: "nonpayable";
|
|
2761
|
+
readonly inputs: readonly [];
|
|
2762
|
+
readonly outputs: readonly [{
|
|
2763
|
+
readonly type: "uint256";
|
|
2764
|
+
}];
|
|
2765
|
+
}, {
|
|
2766
|
+
readonly name: "finalizeStreams";
|
|
2767
|
+
readonly type: "function";
|
|
2768
|
+
readonly stateMutability: "nonpayable";
|
|
2769
|
+
readonly inputs: readonly [{
|
|
2770
|
+
readonly type: "uint64";
|
|
2771
|
+
readonly name: "timestamp";
|
|
2772
|
+
}];
|
|
2773
|
+
readonly outputs: readonly [];
|
|
2774
|
+
}, {
|
|
2775
|
+
readonly name: "getStream";
|
|
2776
|
+
readonly type: "function";
|
|
2777
|
+
readonly stateMutability: "view";
|
|
2778
|
+
readonly inputs: readonly [{
|
|
2779
|
+
readonly type: "uint64";
|
|
2780
|
+
readonly name: "id";
|
|
2781
|
+
}];
|
|
2782
|
+
readonly outputs: readonly [{
|
|
2783
|
+
readonly type: "tuple";
|
|
2784
|
+
readonly components: readonly [{
|
|
2785
|
+
readonly type: "address";
|
|
2786
|
+
readonly name: "funder";
|
|
2787
|
+
}, {
|
|
2788
|
+
readonly type: "uint64";
|
|
2789
|
+
readonly name: "startTime";
|
|
2790
|
+
}, {
|
|
2791
|
+
readonly type: "uint64";
|
|
2792
|
+
readonly name: "endTime";
|
|
2793
|
+
}, {
|
|
2794
|
+
readonly type: "uint256";
|
|
2795
|
+
readonly name: "ratePerSecondScaled";
|
|
2796
|
+
}, {
|
|
2797
|
+
readonly type: "uint256";
|
|
2798
|
+
readonly name: "amountTotal";
|
|
2799
|
+
}];
|
|
2800
|
+
}];
|
|
2801
|
+
}, {
|
|
2802
|
+
readonly name: "totalRewardPerSecond";
|
|
2803
|
+
readonly type: "function";
|
|
2804
|
+
readonly stateMutability: "view";
|
|
2805
|
+
readonly inputs: readonly [];
|
|
2806
|
+
readonly outputs: readonly [{
|
|
2807
|
+
readonly type: "uint256";
|
|
2808
|
+
}];
|
|
2809
|
+
}, {
|
|
2810
|
+
readonly name: "optedInSupply";
|
|
2811
|
+
readonly type: "function";
|
|
2812
|
+
readonly stateMutability: "view";
|
|
2813
|
+
readonly inputs: readonly [];
|
|
2814
|
+
readonly outputs: readonly [{
|
|
2815
|
+
readonly type: "uint128";
|
|
2816
|
+
}];
|
|
2817
|
+
}, {
|
|
2818
|
+
readonly name: "nextStreamId";
|
|
2819
|
+
readonly type: "function";
|
|
2820
|
+
readonly stateMutability: "view";
|
|
2821
|
+
readonly inputs: readonly [];
|
|
2822
|
+
readonly outputs: readonly [{
|
|
2823
|
+
readonly type: "uint64";
|
|
2824
|
+
}];
|
|
2825
|
+
}, {
|
|
2826
|
+
readonly name: "userRewardInfo";
|
|
2827
|
+
readonly type: "function";
|
|
2828
|
+
readonly stateMutability: "view";
|
|
2829
|
+
readonly inputs: readonly [{
|
|
2830
|
+
readonly type: "address";
|
|
2831
|
+
readonly name: "account";
|
|
2832
|
+
}];
|
|
2833
|
+
readonly outputs: readonly [{
|
|
2834
|
+
readonly type: "tuple";
|
|
2835
|
+
readonly components: readonly [{
|
|
2836
|
+
readonly type: "address";
|
|
2837
|
+
readonly name: "delegatedRecipient";
|
|
2838
|
+
}, {
|
|
2839
|
+
readonly type: "uint256";
|
|
2840
|
+
readonly name: "rewardPerToken";
|
|
2841
|
+
}, {
|
|
2842
|
+
readonly type: "uint256";
|
|
2843
|
+
readonly name: "rewardBalance";
|
|
2844
|
+
}];
|
|
2845
|
+
}];
|
|
2846
|
+
}, {
|
|
2847
|
+
readonly name: "Transfer";
|
|
2848
|
+
readonly type: "event";
|
|
2849
|
+
readonly inputs: readonly [{
|
|
2850
|
+
readonly type: "address";
|
|
2851
|
+
readonly name: "from";
|
|
2852
|
+
readonly indexed: true;
|
|
2853
|
+
}, {
|
|
2854
|
+
readonly type: "address";
|
|
2855
|
+
readonly name: "to";
|
|
2856
|
+
readonly indexed: true;
|
|
2857
|
+
}, {
|
|
2858
|
+
readonly type: "uint256";
|
|
2859
|
+
readonly name: "amount";
|
|
2860
|
+
}];
|
|
2861
|
+
}, {
|
|
2862
|
+
readonly name: "Approval";
|
|
2863
|
+
readonly type: "event";
|
|
2864
|
+
readonly inputs: readonly [{
|
|
2865
|
+
readonly type: "address";
|
|
2866
|
+
readonly name: "owner";
|
|
2867
|
+
readonly indexed: true;
|
|
2868
|
+
}, {
|
|
2869
|
+
readonly type: "address";
|
|
2870
|
+
readonly name: "spender";
|
|
2871
|
+
readonly indexed: true;
|
|
2872
|
+
}, {
|
|
2873
|
+
readonly type: "uint256";
|
|
2874
|
+
readonly name: "amount";
|
|
2875
|
+
}];
|
|
2876
|
+
}, {
|
|
2877
|
+
readonly name: "Mint";
|
|
2878
|
+
readonly type: "event";
|
|
2879
|
+
readonly inputs: readonly [{
|
|
2880
|
+
readonly type: "address";
|
|
2881
|
+
readonly name: "to";
|
|
2882
|
+
readonly indexed: true;
|
|
2883
|
+
}, {
|
|
2884
|
+
readonly type: "uint256";
|
|
2885
|
+
readonly name: "amount";
|
|
2886
|
+
}];
|
|
2887
|
+
}, {
|
|
2888
|
+
readonly name: "Burn";
|
|
2889
|
+
readonly type: "event";
|
|
2890
|
+
readonly inputs: readonly [{
|
|
2891
|
+
readonly type: "address";
|
|
2892
|
+
readonly name: "from";
|
|
2893
|
+
readonly indexed: true;
|
|
2894
|
+
}, {
|
|
2895
|
+
readonly type: "uint256";
|
|
2896
|
+
readonly name: "amount";
|
|
2897
|
+
}];
|
|
2898
|
+
}, {
|
|
2899
|
+
readonly name: "BurnBlocked";
|
|
2900
|
+
readonly type: "event";
|
|
2901
|
+
readonly inputs: readonly [{
|
|
2902
|
+
readonly type: "address";
|
|
2903
|
+
readonly name: "from";
|
|
2904
|
+
readonly indexed: true;
|
|
2905
|
+
}, {
|
|
2906
|
+
readonly type: "uint256";
|
|
2907
|
+
readonly name: "amount";
|
|
2908
|
+
}];
|
|
2909
|
+
}, {
|
|
2910
|
+
readonly name: "TransferWithMemo";
|
|
2911
|
+
readonly type: "event";
|
|
2912
|
+
readonly inputs: readonly [{
|
|
2913
|
+
readonly type: "address";
|
|
2914
|
+
readonly name: "from";
|
|
2915
|
+
readonly indexed: true;
|
|
2916
|
+
}, {
|
|
2917
|
+
readonly type: "address";
|
|
2918
|
+
readonly name: "to";
|
|
2919
|
+
readonly indexed: true;
|
|
2920
|
+
}, {
|
|
2921
|
+
readonly type: "uint256";
|
|
2922
|
+
readonly name: "amount";
|
|
2923
|
+
}, {
|
|
2924
|
+
readonly type: "bytes32";
|
|
2925
|
+
readonly name: "memo";
|
|
2926
|
+
readonly indexed: true;
|
|
2927
|
+
}];
|
|
2928
|
+
}, {
|
|
2929
|
+
readonly name: "TransferPolicyUpdate";
|
|
2930
|
+
readonly type: "event";
|
|
2931
|
+
readonly inputs: readonly [{
|
|
2932
|
+
readonly type: "address";
|
|
2933
|
+
readonly name: "updater";
|
|
2934
|
+
readonly indexed: true;
|
|
2935
|
+
}, {
|
|
2936
|
+
readonly type: "uint64";
|
|
2937
|
+
readonly name: "newPolicyId";
|
|
2938
|
+
readonly indexed: true;
|
|
2939
|
+
}];
|
|
2940
|
+
}, {
|
|
2941
|
+
readonly name: "SupplyCapUpdate";
|
|
2942
|
+
readonly type: "event";
|
|
2943
|
+
readonly inputs: readonly [{
|
|
2944
|
+
readonly type: "address";
|
|
2945
|
+
readonly name: "updater";
|
|
2946
|
+
readonly indexed: true;
|
|
2947
|
+
}, {
|
|
2948
|
+
readonly type: "uint256";
|
|
2949
|
+
readonly name: "newSupplyCap";
|
|
2950
|
+
readonly indexed: true;
|
|
2951
|
+
}];
|
|
2952
|
+
}, {
|
|
2953
|
+
readonly name: "PauseStateUpdate";
|
|
2954
|
+
readonly type: "event";
|
|
2955
|
+
readonly inputs: readonly [{
|
|
2956
|
+
readonly type: "address";
|
|
2957
|
+
readonly name: "updater";
|
|
2958
|
+
readonly indexed: true;
|
|
2959
|
+
}, {
|
|
2960
|
+
readonly type: "bool";
|
|
2961
|
+
readonly name: "isPaused";
|
|
2962
|
+
}];
|
|
2963
|
+
}, {
|
|
2964
|
+
readonly name: "NextQuoteTokenSet";
|
|
2965
|
+
readonly type: "event";
|
|
2966
|
+
readonly inputs: readonly [{
|
|
2967
|
+
readonly type: "address";
|
|
2968
|
+
readonly name: "updater";
|
|
2969
|
+
readonly indexed: true;
|
|
2970
|
+
}, {
|
|
2971
|
+
readonly type: "address";
|
|
2972
|
+
readonly name: "nextQuoteToken";
|
|
2973
|
+
readonly indexed: true;
|
|
2974
|
+
}];
|
|
2975
|
+
}, {
|
|
2976
|
+
readonly name: "QuoteTokenUpdate";
|
|
2977
|
+
readonly type: "event";
|
|
2978
|
+
readonly inputs: readonly [{
|
|
2979
|
+
readonly type: "address";
|
|
2980
|
+
readonly name: "updater";
|
|
2981
|
+
readonly indexed: true;
|
|
2982
|
+
}, {
|
|
2983
|
+
readonly type: "address";
|
|
2984
|
+
readonly name: "newQuoteToken";
|
|
2985
|
+
readonly indexed: true;
|
|
2986
|
+
}];
|
|
2987
|
+
}, {
|
|
2988
|
+
readonly name: "RewardScheduled";
|
|
2989
|
+
readonly type: "event";
|
|
2990
|
+
readonly inputs: readonly [{
|
|
2991
|
+
readonly type: "address";
|
|
2992
|
+
readonly name: "funder";
|
|
2993
|
+
readonly indexed: true;
|
|
2994
|
+
}, {
|
|
2995
|
+
readonly type: "uint64";
|
|
2996
|
+
readonly name: "id";
|
|
2997
|
+
readonly indexed: true;
|
|
2998
|
+
}, {
|
|
2999
|
+
readonly type: "uint256";
|
|
3000
|
+
readonly name: "amount";
|
|
3001
|
+
}, {
|
|
3002
|
+
readonly type: "uint32";
|
|
3003
|
+
readonly name: "durationSeconds";
|
|
3004
|
+
}];
|
|
3005
|
+
}, {
|
|
3006
|
+
readonly name: "RewardCanceled";
|
|
3007
|
+
readonly type: "event";
|
|
3008
|
+
readonly inputs: readonly [{
|
|
3009
|
+
readonly type: "address";
|
|
3010
|
+
readonly name: "funder";
|
|
3011
|
+
readonly indexed: true;
|
|
3012
|
+
}, {
|
|
3013
|
+
readonly type: "uint64";
|
|
3014
|
+
readonly name: "id";
|
|
3015
|
+
readonly indexed: true;
|
|
3016
|
+
}, {
|
|
3017
|
+
readonly type: "uint256";
|
|
3018
|
+
readonly name: "refund";
|
|
3019
|
+
}];
|
|
3020
|
+
}, {
|
|
3021
|
+
readonly name: "RewardRecipientSet";
|
|
3022
|
+
readonly type: "event";
|
|
3023
|
+
readonly inputs: readonly [{
|
|
3024
|
+
readonly type: "address";
|
|
3025
|
+
readonly name: "holder";
|
|
3026
|
+
readonly indexed: true;
|
|
3027
|
+
}, {
|
|
3028
|
+
readonly type: "address";
|
|
3029
|
+
readonly name: "recipient";
|
|
3030
|
+
readonly indexed: true;
|
|
3031
|
+
}];
|
|
3032
|
+
}, {
|
|
3033
|
+
readonly name: "InsufficientBalance";
|
|
3034
|
+
readonly type: "error";
|
|
3035
|
+
readonly inputs: readonly [{
|
|
3036
|
+
readonly type: "uint256";
|
|
3037
|
+
readonly name: "available";
|
|
3038
|
+
}, {
|
|
3039
|
+
readonly type: "uint256";
|
|
3040
|
+
readonly name: "required";
|
|
3041
|
+
}, {
|
|
3042
|
+
readonly type: "address";
|
|
3043
|
+
readonly name: "token";
|
|
3044
|
+
}];
|
|
3045
|
+
}, {
|
|
3046
|
+
readonly name: "InsufficientAllowance";
|
|
3047
|
+
readonly type: "error";
|
|
3048
|
+
readonly inputs: readonly [];
|
|
3049
|
+
}, {
|
|
3050
|
+
readonly name: "SupplyCapExceeded";
|
|
3051
|
+
readonly type: "error";
|
|
3052
|
+
readonly inputs: readonly [];
|
|
3053
|
+
}, {
|
|
3054
|
+
readonly name: "InvalidSupplyCap";
|
|
3055
|
+
readonly type: "error";
|
|
3056
|
+
readonly inputs: readonly [];
|
|
3057
|
+
}, {
|
|
3058
|
+
readonly name: "InvalidPayload";
|
|
3059
|
+
readonly type: "error";
|
|
3060
|
+
readonly inputs: readonly [];
|
|
3061
|
+
}, {
|
|
3062
|
+
readonly name: "StringTooLong";
|
|
3063
|
+
readonly type: "error";
|
|
3064
|
+
readonly inputs: readonly [];
|
|
3065
|
+
}, {
|
|
3066
|
+
readonly name: "PolicyForbids";
|
|
3067
|
+
readonly type: "error";
|
|
3068
|
+
readonly inputs: readonly [];
|
|
3069
|
+
}, {
|
|
3070
|
+
readonly name: "InvalidRecipient";
|
|
3071
|
+
readonly type: "error";
|
|
3072
|
+
readonly inputs: readonly [];
|
|
3073
|
+
}, {
|
|
3074
|
+
readonly name: "ContractPaused";
|
|
3075
|
+
readonly type: "error";
|
|
3076
|
+
readonly inputs: readonly [];
|
|
3077
|
+
}, {
|
|
3078
|
+
readonly name: "InvalidCurrency";
|
|
3079
|
+
readonly type: "error";
|
|
3080
|
+
readonly inputs: readonly [];
|
|
3081
|
+
}, {
|
|
3082
|
+
readonly name: "InvalidQuoteToken";
|
|
3083
|
+
readonly type: "error";
|
|
3084
|
+
readonly inputs: readonly [];
|
|
3085
|
+
}, {
|
|
3086
|
+
readonly name: "TransfersDisabled";
|
|
3087
|
+
readonly type: "error";
|
|
3088
|
+
readonly inputs: readonly [];
|
|
3089
|
+
}, {
|
|
3090
|
+
readonly name: "InvalidAmount";
|
|
3091
|
+
readonly type: "error";
|
|
3092
|
+
readonly inputs: readonly [];
|
|
3093
|
+
}, {
|
|
3094
|
+
readonly name: "NotStreamFunder";
|
|
3095
|
+
readonly type: "error";
|
|
3096
|
+
readonly inputs: readonly [];
|
|
3097
|
+
}, {
|
|
3098
|
+
readonly name: "StreamInactive";
|
|
3099
|
+
readonly type: "error";
|
|
3100
|
+
readonly inputs: readonly [];
|
|
3101
|
+
}, {
|
|
3102
|
+
readonly name: "NoOptedInSupply";
|
|
3103
|
+
readonly type: "error";
|
|
3104
|
+
readonly inputs: readonly [];
|
|
3105
|
+
}, {
|
|
3106
|
+
readonly name: "Unauthorized";
|
|
3107
|
+
readonly type: "error";
|
|
3108
|
+
readonly inputs: readonly [];
|
|
3109
|
+
}, {
|
|
3110
|
+
readonly name: "hasRole";
|
|
3111
|
+
readonly type: "function";
|
|
3112
|
+
readonly stateMutability: "view";
|
|
3113
|
+
readonly inputs: readonly [{
|
|
3114
|
+
readonly type: "address";
|
|
3115
|
+
readonly name: "account";
|
|
3116
|
+
}, {
|
|
3117
|
+
readonly type: "bytes32";
|
|
3118
|
+
readonly name: "role";
|
|
3119
|
+
}];
|
|
3120
|
+
readonly outputs: readonly [{
|
|
3121
|
+
readonly type: "bool";
|
|
3122
|
+
}];
|
|
3123
|
+
}, {
|
|
3124
|
+
readonly name: "getRoleAdmin";
|
|
3125
|
+
readonly type: "function";
|
|
3126
|
+
readonly stateMutability: "view";
|
|
3127
|
+
readonly inputs: readonly [{
|
|
3128
|
+
readonly type: "bytes32";
|
|
3129
|
+
readonly name: "role";
|
|
3130
|
+
}];
|
|
3131
|
+
readonly outputs: readonly [{
|
|
3132
|
+
readonly type: "bytes32";
|
|
3133
|
+
}];
|
|
3134
|
+
}, {
|
|
3135
|
+
readonly name: "grantRole";
|
|
3136
|
+
readonly type: "function";
|
|
3137
|
+
readonly stateMutability: "nonpayable";
|
|
3138
|
+
readonly inputs: readonly [{
|
|
3139
|
+
readonly type: "bytes32";
|
|
3140
|
+
readonly name: "role";
|
|
3141
|
+
}, {
|
|
3142
|
+
readonly type: "address";
|
|
3143
|
+
readonly name: "account";
|
|
3144
|
+
}];
|
|
3145
|
+
readonly outputs: readonly [];
|
|
3146
|
+
}, {
|
|
3147
|
+
readonly name: "revokeRole";
|
|
3148
|
+
readonly type: "function";
|
|
3149
|
+
readonly stateMutability: "nonpayable";
|
|
3150
|
+
readonly inputs: readonly [{
|
|
3151
|
+
readonly type: "bytes32";
|
|
3152
|
+
readonly name: "role";
|
|
3153
|
+
}, {
|
|
3154
|
+
readonly type: "address";
|
|
3155
|
+
readonly name: "account";
|
|
3156
|
+
}];
|
|
3157
|
+
readonly outputs: readonly [];
|
|
3158
|
+
}, {
|
|
3159
|
+
readonly name: "renounceRole";
|
|
3160
|
+
readonly type: "function";
|
|
3161
|
+
readonly stateMutability: "nonpayable";
|
|
3162
|
+
readonly inputs: readonly [{
|
|
3163
|
+
readonly type: "bytes32";
|
|
3164
|
+
readonly name: "role";
|
|
3165
|
+
}];
|
|
3166
|
+
readonly outputs: readonly [];
|
|
3167
|
+
}, {
|
|
3168
|
+
readonly name: "setRoleAdmin";
|
|
3169
|
+
readonly type: "function";
|
|
3170
|
+
readonly stateMutability: "nonpayable";
|
|
3171
|
+
readonly inputs: readonly [{
|
|
3172
|
+
readonly type: "bytes32";
|
|
3173
|
+
readonly name: "role";
|
|
3174
|
+
}, {
|
|
3175
|
+
readonly type: "bytes32";
|
|
3176
|
+
readonly name: "adminRole";
|
|
3177
|
+
}];
|
|
3178
|
+
readonly outputs: readonly [];
|
|
3179
|
+
}, {
|
|
3180
|
+
readonly name: "RoleMembershipUpdated";
|
|
3181
|
+
readonly type: "event";
|
|
3182
|
+
readonly inputs: readonly [{
|
|
3183
|
+
readonly type: "bytes32";
|
|
3184
|
+
readonly name: "role";
|
|
3185
|
+
readonly indexed: true;
|
|
3186
|
+
}, {
|
|
3187
|
+
readonly type: "address";
|
|
3188
|
+
readonly name: "account";
|
|
3189
|
+
readonly indexed: true;
|
|
3190
|
+
}, {
|
|
3191
|
+
readonly type: "address";
|
|
3192
|
+
readonly name: "sender";
|
|
3193
|
+
readonly indexed: true;
|
|
3194
|
+
}, {
|
|
3195
|
+
readonly type: "bool";
|
|
3196
|
+
readonly name: "hasRole";
|
|
3197
|
+
}];
|
|
3198
|
+
}, {
|
|
3199
|
+
readonly name: "RoleAdminUpdated";
|
|
3200
|
+
readonly type: "event";
|
|
3201
|
+
readonly inputs: readonly [{
|
|
3202
|
+
readonly type: "bytes32";
|
|
3203
|
+
readonly name: "role";
|
|
3204
|
+
readonly indexed: true;
|
|
3205
|
+
}, {
|
|
3206
|
+
readonly type: "bytes32";
|
|
3207
|
+
readonly name: "newAdminRole";
|
|
3208
|
+
readonly indexed: true;
|
|
3209
|
+
}, {
|
|
3210
|
+
readonly type: "address";
|
|
3211
|
+
readonly name: "sender";
|
|
3212
|
+
readonly indexed: true;
|
|
3213
|
+
}];
|
|
3214
|
+
}, {
|
|
3215
|
+
readonly name: "Unauthorized";
|
|
3216
|
+
readonly type: "error";
|
|
3217
|
+
readonly inputs: readonly [];
|
|
3218
|
+
}], "RewardScheduled">;
|
|
3219
|
+
}
|
|
3220
|
+
export declare namespace startSync {
|
|
3221
|
+
type Parameters<chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined> = WriteParameters<chain, account> & start.Args;
|
|
3222
|
+
type ReturnValue = {
|
|
3223
|
+
/** The total amount allocated to the stream */
|
|
3224
|
+
amount: bigint;
|
|
3225
|
+
/** The duration of the stream in seconds (0 for immediate distributions) */
|
|
3226
|
+
durationSeconds: number;
|
|
3227
|
+
/** The address that funded the stream */
|
|
3228
|
+
funder: Address;
|
|
3229
|
+
/** The unique stream ID (0 for immediate distributions, >0 for streaming distributions) */
|
|
3230
|
+
id: bigint;
|
|
3231
|
+
/** The transaction receipt */
|
|
3232
|
+
receipt: Awaited<ReturnType<typeof writeContractSync>>;
|
|
3233
|
+
};
|
|
3234
|
+
type ErrorType = start.ErrorType;
|
|
3235
|
+
}
|
|
3236
|
+
//# sourceMappingURL=reward.d.ts.map
|