viem 2.57.5 → 2.57.7
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/CHANGELOG.md +14 -0
- package/_cjs/actions/wallet/prepareTransactionRequest.js +10 -0
- package/_cjs/actions/wallet/prepareTransactionRequest.js.map +1 -1
- package/_cjs/errors/version.js +1 -1
- package/_cjs/tempo/Abis.js +297 -1
- package/_cjs/tempo/Abis.js.map +1 -1
- package/_cjs/tempo/Addresses.js +2 -1
- package/_cjs/tempo/Addresses.js.map +1 -1
- package/_cjs/tempo/Decorator.js.map +1 -1
- package/_cjs/tempo/ExecutionError.js +94 -3
- package/_cjs/tempo/ExecutionError.js.map +1 -1
- package/_cjs/tempo/actions/accessKey.js +382 -10
- package/_cjs/tempo/actions/accessKey.js.map +1 -1
- package/_cjs/tempo/actions/accounts.js +3 -2
- package/_cjs/tempo/actions/accounts.js.map +1 -1
- package/_cjs/tempo/actions/amm.js +90 -4
- package/_cjs/tempo/actions/amm.js.map +1 -1
- package/_cjs/tempo/actions/channel.js +183 -7
- package/_cjs/tempo/actions/channel.js.map +1 -1
- package/_cjs/tempo/actions/dex.js +507 -14
- package/_cjs/tempo/actions/dex.js.map +1 -1
- package/_cjs/tempo/actions/earn/deployment.js +4 -3
- package/_cjs/tempo/actions/earn/deployment.js.map +1 -1
- package/_cjs/tempo/actions/earn.js +22 -21
- package/_cjs/tempo/actions/earn.js.map +1 -1
- package/_cjs/tempo/actions/fee.js +85 -5
- package/_cjs/tempo/actions/fee.js.map +1 -1
- package/_cjs/tempo/actions/nonce.js +54 -1
- package/_cjs/tempo/actions/nonce.js.map +1 -1
- package/_cjs/tempo/actions/policy.js +35 -6
- package/_cjs/tempo/actions/policy.js.map +1 -1
- package/_cjs/tempo/actions/propAmm.js +18 -8
- package/_cjs/tempo/actions/propAmm.js.map +1 -1
- package/_cjs/tempo/actions/receivePolicy.js +7 -6
- package/_cjs/tempo/actions/receivePolicy.js.map +1 -1
- package/_cjs/tempo/actions/reward.js +7 -6
- package/_cjs/tempo/actions/reward.js.map +1 -1
- package/_cjs/tempo/actions/token.js +433 -22
- package/_cjs/tempo/actions/token.js.map +1 -1
- package/_cjs/tempo/actions/validator.js +12 -11
- package/_cjs/tempo/actions/validator.js.map +1 -1
- package/_cjs/tempo/actions/virtualAddress.js +3 -2
- package/_cjs/tempo/actions/virtualAddress.js.map +1 -1
- package/_cjs/tempo/actions/zone.js +12 -11
- package/_cjs/tempo/actions/zone.js.map +1 -1
- package/_cjs/tempo/errors.js +57 -1
- package/_cjs/tempo/errors.js.map +1 -1
- package/_cjs/tempo/internal/errors.js +46 -0
- package/_cjs/tempo/internal/errors.js.map +1 -0
- package/_cjs/tempo/internal/resolveError.js +128 -0
- package/_cjs/tempo/internal/resolveError.js.map +1 -0
- package/_cjs/tempo/internal/utils.js +1 -0
- package/_cjs/tempo/internal/utils.js.map +1 -1
- package/_esm/actions/wallet/prepareTransactionRequest.js +11 -0
- package/_esm/actions/wallet/prepareTransactionRequest.js.map +1 -1
- package/_esm/errors/version.js +1 -1
- package/_esm/tempo/Abis.js +297 -0
- package/_esm/tempo/Abis.js.map +1 -1
- package/_esm/tempo/Addresses.js +1 -0
- package/_esm/tempo/Addresses.js.map +1 -1
- package/_esm/tempo/Decorator.js.map +1 -1
- package/_esm/tempo/ExecutionError.js +95 -2
- package/_esm/tempo/ExecutionError.js.map +1 -1
- package/_esm/tempo/actions/accessKey.js +406 -10
- package/_esm/tempo/actions/accessKey.js.map +1 -1
- package/_esm/tempo/actions/accounts.js +3 -2
- package/_esm/tempo/actions/accounts.js.map +1 -1
- package/_esm/tempo/actions/amm.js +95 -4
- package/_esm/tempo/actions/amm.js.map +1 -1
- package/_esm/tempo/actions/channel.js +191 -7
- package/_esm/tempo/actions/channel.js.map +1 -1
- package/_esm/tempo/actions/dex.js +537 -14
- package/_esm/tempo/actions/dex.js.map +1 -1
- package/_esm/tempo/actions/earn/deployment.js +4 -3
- package/_esm/tempo/actions/earn/deployment.js.map +1 -1
- package/_esm/tempo/actions/earn.js +22 -21
- package/_esm/tempo/actions/earn.js.map +1 -1
- package/_esm/tempo/actions/fee.js +90 -6
- package/_esm/tempo/actions/fee.js.map +1 -1
- package/_esm/tempo/actions/nonce.js +57 -1
- package/_esm/tempo/actions/nonce.js.map +1 -1
- package/_esm/tempo/actions/policy.js +36 -6
- package/_esm/tempo/actions/policy.js.map +1 -1
- package/_esm/tempo/actions/propAmm.js +18 -8
- package/_esm/tempo/actions/propAmm.js.map +1 -1
- package/_esm/tempo/actions/receivePolicy.js +7 -6
- package/_esm/tempo/actions/receivePolicy.js.map +1 -1
- package/_esm/tempo/actions/reward.js +7 -6
- package/_esm/tempo/actions/reward.js.map +1 -1
- package/_esm/tempo/actions/token.js +461 -22
- package/_esm/tempo/actions/token.js.map +1 -1
- package/_esm/tempo/actions/validator.js +12 -11
- package/_esm/tempo/actions/validator.js.map +1 -1
- package/_esm/tempo/actions/virtualAddress.js +3 -2
- package/_esm/tempo/actions/virtualAddress.js.map +1 -1
- package/_esm/tempo/actions/zone.js +12 -11
- package/_esm/tempo/actions/zone.js.map +1 -1
- package/_esm/tempo/errors.js +63 -0
- package/_esm/tempo/errors.js.map +1 -1
- package/_esm/tempo/internal/errors.js +51 -0
- package/_esm/tempo/internal/errors.js.map +1 -0
- package/_esm/tempo/internal/resolveError.js +130 -0
- package/_esm/tempo/internal/resolveError.js.map +1 -0
- package/_esm/tempo/internal/utils.js +2 -0
- package/_esm/tempo/internal/utils.js.map +1 -1
- package/_types/actions/wallet/prepareTransactionRequest.d.ts.map +1 -1
- package/_types/errors/version.d.ts +1 -1
- package/_types/tempo/Abis.d.ts +807 -0
- package/_types/tempo/Abis.d.ts.map +1 -1
- package/_types/tempo/Addresses.d.ts +1 -0
- package/_types/tempo/Addresses.d.ts.map +1 -1
- package/_types/tempo/Decorator.d.ts +1 -1
- package/_types/tempo/Decorator.d.ts.map +1 -1
- package/_types/tempo/ExecutionError.d.ts +3 -1
- package/_types/tempo/ExecutionError.d.ts.map +1 -1
- package/_types/tempo/actions/accessKey.d.ts +155 -8
- package/_types/tempo/actions/accessKey.d.ts.map +1 -1
- package/_types/tempo/actions/accounts.d.ts +3 -1
- package/_types/tempo/actions/accounts.d.ts.map +1 -1
- package/_types/tempo/actions/amm.d.ts +39 -0
- package/_types/tempo/actions/amm.d.ts.map +1 -1
- package/_types/tempo/actions/channel.d.ts +77 -7
- package/_types/tempo/actions/channel.d.ts.map +1 -1
- package/_types/tempo/actions/dex.d.ts +222 -16
- package/_types/tempo/actions/dex.d.ts.map +1 -1
- package/_types/tempo/actions/earn/deployment.d.ts +7 -6
- package/_types/tempo/actions/earn/deployment.d.ts.map +1 -1
- package/_types/tempo/actions/earn.d.ts +15 -14
- package/_types/tempo/actions/earn.d.ts.map +1 -1
- package/_types/tempo/actions/fee.d.ts +32 -6
- package/_types/tempo/actions/fee.d.ts.map +1 -1
- package/_types/tempo/actions/nonce.d.ts +35 -0
- package/_types/tempo/actions/nonce.d.ts.map +1 -1
- package/_types/tempo/actions/policy.d.ts +29 -8
- package/_types/tempo/actions/policy.d.ts.map +1 -1
- package/_types/tempo/actions/propAmm.d.ts +9 -1
- package/_types/tempo/actions/propAmm.d.ts.map +1 -1
- package/_types/tempo/actions/receivePolicy.d.ts +10 -6
- package/_types/tempo/actions/receivePolicy.d.ts.map +1 -1
- package/_types/tempo/actions/reward.d.ts +7 -3
- package/_types/tempo/actions/reward.d.ts.map +1 -1
- package/_types/tempo/actions/token.d.ts +200 -32
- package/_types/tempo/actions/token.d.ts.map +1 -1
- package/_types/tempo/actions/validator.d.ts +17 -5
- package/_types/tempo/actions/validator.d.ts.map +1 -1
- package/_types/tempo/actions/virtualAddress.d.ts +4 -3
- package/_types/tempo/actions/virtualAddress.d.ts.map +1 -1
- package/_types/tempo/actions/zone.d.ts +10 -9
- package/_types/tempo/actions/zone.d.ts.map +1 -1
- package/_types/tempo/errors.d.ts +63 -1
- package/_types/tempo/errors.d.ts.map +1 -1
- package/_types/tempo/internal/errors.d.ts +59 -0
- package/_types/tempo/internal/errors.d.ts.map +1 -0
- package/_types/tempo/internal/relay/utils.d.ts +16 -16
- package/_types/tempo/internal/resolveError.d.ts +8 -0
- package/_types/tempo/internal/resolveError.d.ts.map +1 -0
- package/_types/tempo/internal/utils.d.ts.map +1 -1
- package/actions/wallet/prepareTransactionRequest.ts +11 -0
- package/errors/version.ts +1 -1
- package/package.json +1 -1
- package/tempo/Abis.ts +298 -0
- package/tempo/Addresses.ts +1 -0
- package/tempo/Decorator.ts +5 -3
- package/tempo/ExecutionError.ts +101 -3
- package/tempo/actions/accessKey.ts +496 -25
- package/tempo/actions/accounts.ts +7 -3
- package/tempo/actions/amm.ts +126 -4
- package/tempo/actions/channel.ts +248 -14
- package/tempo/actions/dex.ts +599 -33
- package/tempo/actions/earn/deployment.ts +11 -9
- package/tempo/actions/earn.ts +40 -35
- package/tempo/actions/fee.ts +111 -9
- package/tempo/actions/nonce.ts +86 -1
- package/tempo/actions/policy.ts +66 -14
- package/tempo/actions/propAmm.ts +36 -9
- package/tempo/actions/receivePolicy.ts +26 -15
- package/tempo/actions/reward.ts +17 -9
- package/tempo/actions/token.ts +519 -54
- package/tempo/actions/validator.ts +40 -16
- package/tempo/actions/virtualAddress.ts +7 -5
- package/tempo/actions/zone.ts +25 -20
- package/tempo/errors.ts +114 -1
- package/tempo/internal/errors.ts +110 -0
- package/tempo/internal/resolveError.ts +169 -0
- package/tempo/internal/utils.ts +2 -0
|
@@ -19,6 +19,9 @@ import type { ExtractAbiItem, GetEventArgs } from '../../types/contract.js';
|
|
|
19
19
|
import type { Log, Log as viem_Log } from '../../types/log.js';
|
|
20
20
|
import type { Compute, OneOf, UnionOmit } from '../../types/utils.js';
|
|
21
21
|
import * as Abis from '../Abis.js';
|
|
22
|
+
import type * as Errors from '../errors.js';
|
|
23
|
+
import { TempoExecutionError } from '../errors.js';
|
|
24
|
+
import { type Resolvers } from '../internal/errors.js';
|
|
22
25
|
import type { GetAccountParameter, ReadParameters, TokenParameter, TokenParameters, WriteParameters } from '../internal/types.js';
|
|
23
26
|
import { type CallParameters } from '../internal/utils.js';
|
|
24
27
|
import type { TransactionReceipt } from '../Transaction.js';
|
|
@@ -58,7 +61,7 @@ export declare namespace approve {
|
|
|
58
61
|
} & TokenParameter;
|
|
59
62
|
type Parameters<chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined> = WriteParameters<chain, account> & Args;
|
|
60
63
|
type ReturnValue = WriteContractReturnType;
|
|
61
|
-
type ErrorType = BaseErrorType;
|
|
64
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
62
65
|
/** @internal */
|
|
63
66
|
function inner<action extends typeof writeContract | typeof writeContractSync, chain extends Chain | undefined, account extends Account | undefined>(action: action, client: Client<Transport, chain, account>, parameters: approve.Parameters<chain, account>): Promise<ReturnType<action>>;
|
|
64
67
|
/**
|
|
@@ -1037,7 +1040,7 @@ export declare namespace approveSync {
|
|
|
1037
1040
|
/** Transaction receipt. */
|
|
1038
1041
|
receipt: TransactionReceipt;
|
|
1039
1042
|
}>;
|
|
1040
|
-
type ErrorType = BaseErrorType;
|
|
1043
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
1041
1044
|
}
|
|
1042
1045
|
/**
|
|
1043
1046
|
* Burns TIP20 tokens from a blocked address.
|
|
@@ -1076,7 +1079,7 @@ export declare namespace burnBlocked {
|
|
|
1076
1079
|
} & TokenParameter;
|
|
1077
1080
|
type Parameters<chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined> = WriteParameters<chain, account> & Args;
|
|
1078
1081
|
type ReturnValue = WriteContractReturnType;
|
|
1079
|
-
type ErrorType = BaseErrorType;
|
|
1082
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
1080
1083
|
/** @internal */
|
|
1081
1084
|
function inner<action extends typeof writeContract | typeof writeContractSync, chain extends Chain | undefined, account extends Account | undefined>(action: action, client: Client<Transport, chain, account>, parameters: burnBlocked.Parameters<chain, account>): Promise<ReturnType<action>>;
|
|
1082
1085
|
/**
|
|
@@ -2055,7 +2058,7 @@ export declare namespace burnBlockedSync {
|
|
|
2055
2058
|
/** Transaction receipt. */
|
|
2056
2059
|
receipt: TransactionReceipt;
|
|
2057
2060
|
}>;
|
|
2058
|
-
type ErrorType = BaseErrorType;
|
|
2061
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
2059
2062
|
}
|
|
2060
2063
|
/**
|
|
2061
2064
|
* Burns TIP20 tokens from the caller's balance.
|
|
@@ -2100,7 +2103,7 @@ export declare namespace burn {
|
|
|
2100
2103
|
}>;
|
|
2101
2104
|
type Parameters<chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined> = WriteParameters<chain, account> & Args;
|
|
2102
2105
|
type ReturnValue = WriteContractReturnType;
|
|
2103
|
-
type ErrorType = BaseErrorType;
|
|
2106
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
2104
2107
|
/** @internal */
|
|
2105
2108
|
function inner<action extends typeof writeContract | typeof writeContractSync, chain extends Chain | undefined, account extends Account | undefined>(action: action, client: Client<Transport, chain, account>, parameters: burn.Parameters<chain, account>): Promise<ReturnType<action>>;
|
|
2106
2109
|
/**
|
|
@@ -3109,7 +3112,7 @@ export declare namespace burnSync {
|
|
|
3109
3112
|
burner?: Address | undefined;
|
|
3110
3113
|
receipt: TransactionReceipt;
|
|
3111
3114
|
}>;
|
|
3112
|
-
type ErrorType = BaseErrorType;
|
|
3115
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
3113
3116
|
}
|
|
3114
3117
|
/**
|
|
3115
3118
|
* Changes the transfer policy ID for a TIP20 token.
|
|
@@ -3147,7 +3150,7 @@ export declare namespace changeTransferPolicy {
|
|
|
3147
3150
|
token: TokenId.TokenIdOrAddress;
|
|
3148
3151
|
};
|
|
3149
3152
|
type ReturnValue = WriteContractReturnType;
|
|
3150
|
-
type ErrorType = BaseErrorType;
|
|
3153
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
3151
3154
|
/** @internal */
|
|
3152
3155
|
function inner<action extends typeof writeContract | typeof writeContractSync, chain extends Chain | undefined, account extends Account | undefined>(action: action, client: Client<Transport, chain, account>, parameters: changeTransferPolicy.Parameters<chain, account>): Promise<ReturnType<action>>;
|
|
3153
3156
|
/**
|
|
@@ -4118,7 +4121,7 @@ export declare namespace changeTransferPolicySync {
|
|
|
4118
4121
|
}> & {
|
|
4119
4122
|
receipt: TransactionReceipt;
|
|
4120
4123
|
}>;
|
|
4121
|
-
type ErrorType = BaseErrorType;
|
|
4124
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
4122
4125
|
}
|
|
4123
4126
|
/**
|
|
4124
4127
|
* Creates a new TIP20 token.
|
|
@@ -4172,7 +4175,7 @@ export declare namespace create {
|
|
|
4172
4175
|
symbol: string;
|
|
4173
4176
|
};
|
|
4174
4177
|
type ReturnValue = WriteContractReturnType;
|
|
4175
|
-
type ErrorType = BaseErrorType;
|
|
4178
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
4176
4179
|
/** @internal */
|
|
4177
4180
|
function inner<action extends typeof writeContract | typeof writeContractSync, chain extends Chain | undefined, account extends Account | undefined>(action: action, client: Client<Transport, chain, account>, parameters: any): Promise<ReturnType<action>>;
|
|
4178
4181
|
/**
|
|
@@ -4450,7 +4453,7 @@ export declare namespace createSync {
|
|
|
4450
4453
|
/** Transaction receipt. */
|
|
4451
4454
|
receipt: TransactionReceipt;
|
|
4452
4455
|
}>;
|
|
4453
|
-
type ErrorType = BaseErrorType;
|
|
4456
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
4454
4457
|
}
|
|
4455
4458
|
/**
|
|
4456
4459
|
* Gets TIP20 token allowance.
|
|
@@ -4524,6 +4527,7 @@ export declare namespace getAllowance {
|
|
|
4524
4527
|
data: import("../../index.js").Hex;
|
|
4525
4528
|
to: Address;
|
|
4526
4529
|
};
|
|
4530
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
4527
4531
|
}
|
|
4528
4532
|
/**
|
|
4529
4533
|
* Gets TIP20 token balance for an address.
|
|
@@ -4588,6 +4592,7 @@ export declare namespace getBalance {
|
|
|
4588
4592
|
data: import("../../index.js").Hex;
|
|
4589
4593
|
to: Address;
|
|
4590
4594
|
};
|
|
4595
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
4591
4596
|
}
|
|
4592
4597
|
/**
|
|
4593
4598
|
* Gets TIP20 token metadata including name, symbol, logo URI, currency, decimals, and total supply.
|
|
@@ -4669,6 +4674,7 @@ export declare namespace getMetadata {
|
|
|
4669
4674
|
*/
|
|
4670
4675
|
transferPolicyId?: bigint | undefined;
|
|
4671
4676
|
}>;
|
|
4677
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
4672
4678
|
}
|
|
4673
4679
|
/**
|
|
4674
4680
|
* Gets the total supply of a TIP20 token.
|
|
@@ -4727,6 +4733,7 @@ export declare namespace getTotalSupply {
|
|
|
4727
4733
|
data: import("../../index.js").Hex;
|
|
4728
4734
|
to: Address;
|
|
4729
4735
|
};
|
|
4736
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
4730
4737
|
}
|
|
4731
4738
|
/**
|
|
4732
4739
|
* Gets the admin role for a specific role in a TIP20 token.
|
|
@@ -4790,6 +4797,7 @@ export declare namespace getRoleAdmin {
|
|
|
4790
4797
|
data: import("../../index.js").Hex;
|
|
4791
4798
|
to: Address;
|
|
4792
4799
|
};
|
|
4800
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
4793
4801
|
}
|
|
4794
4802
|
/**
|
|
4795
4803
|
* Checks if an account has a specific role for a TIP20 token.
|
|
@@ -4859,6 +4867,7 @@ export declare namespace hasRole {
|
|
|
4859
4867
|
data: import("../../index.js").Hex;
|
|
4860
4868
|
to: Address;
|
|
4861
4869
|
};
|
|
4870
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
4862
4871
|
}
|
|
4863
4872
|
/**
|
|
4864
4873
|
* Grants a role for a TIP20 token.
|
|
@@ -4902,7 +4911,7 @@ export declare namespace grantRoles {
|
|
|
4902
4911
|
to: Address;
|
|
4903
4912
|
};
|
|
4904
4913
|
type ReturnValue = WriteContractReturnType;
|
|
4905
|
-
type ErrorType = BaseErrorType;
|
|
4914
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
4906
4915
|
/** @internal */
|
|
4907
4916
|
function inner<action extends typeof sendTransaction | typeof sendTransactionSync, chain extends Chain | undefined, account extends Account | undefined>(action: action, client: Client<Transport, chain, account>, parameters: grantRoles.Parameters<chain, account>): Promise<ReturnType<action>>;
|
|
4908
4917
|
/**
|
|
@@ -5879,7 +5888,7 @@ export declare namespace grantRolesSync {
|
|
|
5879
5888
|
Required: true;
|
|
5880
5889
|
}>[];
|
|
5881
5890
|
};
|
|
5882
|
-
type ErrorType = BaseErrorType;
|
|
5891
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
5883
5892
|
}
|
|
5884
5893
|
/**
|
|
5885
5894
|
* Mints TIP20 tokens to an address.
|
|
@@ -5920,7 +5929,7 @@ export declare namespace mint {
|
|
|
5920
5929
|
} & TokenParameter;
|
|
5921
5930
|
type Parameters<chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined> = WriteParameters<chain, account> & Args;
|
|
5922
5931
|
type ReturnValue = WriteContractReturnType;
|
|
5923
|
-
type ErrorType = BaseErrorType;
|
|
5932
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
5924
5933
|
/** @internal */
|
|
5925
5934
|
function inner<action extends typeof writeContract | typeof writeContractSync, chain extends Chain | undefined, account extends Account | undefined>(action: action, client: Client<Transport, chain, account>, parameters: mint.Parameters<chain, account>): Promise<ReturnType<action>>;
|
|
5926
5935
|
/**
|
|
@@ -6913,7 +6922,7 @@ export declare namespace mintSync {
|
|
|
6913
6922
|
}> & {
|
|
6914
6923
|
receipt: TransactionReceipt;
|
|
6915
6924
|
}>;
|
|
6916
|
-
type ErrorType = BaseErrorType;
|
|
6925
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
6917
6926
|
}
|
|
6918
6927
|
/**
|
|
6919
6928
|
* Pauses a TIP20 token.
|
|
@@ -6948,7 +6957,7 @@ export declare namespace pause {
|
|
|
6948
6957
|
token: TokenId.TokenIdOrAddress;
|
|
6949
6958
|
};
|
|
6950
6959
|
type ReturnValue = WriteContractReturnType;
|
|
6951
|
-
type ErrorType = BaseErrorType;
|
|
6960
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
6952
6961
|
/** @internal */
|
|
6953
6962
|
function inner<action extends typeof writeContract | typeof writeContractSync, chain extends Chain | undefined, account extends Account | undefined>(action: action, client: Client<Transport, chain, account>, parameters: pause.Parameters<chain, account>): Promise<ReturnType<action>>;
|
|
6954
6963
|
/**
|
|
@@ -7914,7 +7923,7 @@ export declare namespace pauseSync {
|
|
|
7914
7923
|
}> & {
|
|
7915
7924
|
receipt: TransactionReceipt;
|
|
7916
7925
|
};
|
|
7917
|
-
type ErrorType = BaseErrorType;
|
|
7926
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
7918
7927
|
}
|
|
7919
7928
|
/**
|
|
7920
7929
|
* Renounces a role for a TIP20 token.
|
|
@@ -7955,7 +7964,7 @@ export declare namespace renounceRoles {
|
|
|
7955
7964
|
token: TokenId.TokenIdOrAddress;
|
|
7956
7965
|
};
|
|
7957
7966
|
type ReturnValue = WriteContractReturnType;
|
|
7958
|
-
type ErrorType = BaseErrorType;
|
|
7967
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
7959
7968
|
/** @internal */
|
|
7960
7969
|
function inner<action extends typeof sendTransaction | typeof sendTransactionSync, chain extends Chain | undefined, account extends Account | undefined>(action: action, client: Client<Transport, chain, account>, parameters: renounceRoles.Parameters<chain, account>): Promise<ReturnType<action>>;
|
|
7961
7970
|
/**
|
|
@@ -8927,7 +8936,7 @@ export declare namespace renounceRolesSync {
|
|
|
8927
8936
|
Required: true;
|
|
8928
8937
|
}>[];
|
|
8929
8938
|
};
|
|
8930
|
-
type ErrorType = BaseErrorType;
|
|
8939
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
8931
8940
|
}
|
|
8932
8941
|
/**
|
|
8933
8942
|
* Revokes a role for a TIP20 token.
|
|
@@ -8971,7 +8980,7 @@ export declare namespace revokeRoles {
|
|
|
8971
8980
|
token: TokenId.TokenIdOrAddress;
|
|
8972
8981
|
};
|
|
8973
8982
|
type ReturnValue = WriteContractReturnType;
|
|
8974
|
-
type ErrorType = BaseErrorType;
|
|
8983
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
8975
8984
|
/** @internal */
|
|
8976
8985
|
function inner<action extends typeof sendTransaction | typeof sendTransactionSync, chain extends Chain | undefined, account extends Account | undefined>(action: action, client: Client<Transport, chain, account>, parameters: revokeRoles.Parameters<chain, account>): Promise<ReturnType<action>>;
|
|
8977
8986
|
/**
|
|
@@ -9948,7 +9957,7 @@ export declare namespace revokeRolesSync {
|
|
|
9948
9957
|
Required: true;
|
|
9949
9958
|
}>[];
|
|
9950
9959
|
};
|
|
9951
|
-
type ErrorType = BaseErrorType;
|
|
9960
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
9952
9961
|
}
|
|
9953
9962
|
/**
|
|
9954
9963
|
* Sets the supply cap for a TIP20 token.
|
|
@@ -9986,7 +9995,7 @@ export declare namespace setSupplyCap {
|
|
|
9986
9995
|
token: TokenId.TokenIdOrAddress;
|
|
9987
9996
|
};
|
|
9988
9997
|
type ReturnValue = WriteContractReturnType;
|
|
9989
|
-
type ErrorType = BaseErrorType;
|
|
9998
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
9990
9999
|
/** @internal */
|
|
9991
10000
|
function inner<action extends typeof writeContract | typeof writeContractSync, chain extends Chain | undefined, account extends Account | undefined>(action: action, client: Client<Transport, chain, account>, parameters: setSupplyCap.Parameters<chain, account>): Promise<ReturnType<action>>;
|
|
9992
10001
|
/**
|
|
@@ -10957,7 +10966,7 @@ export declare namespace setSupplyCapSync {
|
|
|
10957
10966
|
}> & {
|
|
10958
10967
|
receipt: TransactionReceipt;
|
|
10959
10968
|
};
|
|
10960
|
-
type ErrorType = BaseErrorType;
|
|
10969
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
10961
10970
|
}
|
|
10962
10971
|
/**
|
|
10963
10972
|
* Sets the admin role for a specific role in a TIP20 token.
|
|
@@ -10998,7 +11007,7 @@ export declare namespace setRoleAdmin {
|
|
|
10998
11007
|
token: TokenId.TokenIdOrAddress;
|
|
10999
11008
|
};
|
|
11000
11009
|
type ReturnValue = WriteContractReturnType;
|
|
11001
|
-
type ErrorType = BaseErrorType;
|
|
11010
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
11002
11011
|
/** @internal */
|
|
11003
11012
|
function inner<action extends typeof writeContract | typeof writeContractSync, chain extends Chain | undefined, account extends Account | undefined>(action: action, client: Client<Transport, chain, account>, parameters: setRoleAdmin.Parameters<chain, account>): Promise<ReturnType<action>>;
|
|
11004
11013
|
/**
|
|
@@ -11974,7 +11983,7 @@ export declare namespace setRoleAdminSync {
|
|
|
11974
11983
|
}> & {
|
|
11975
11984
|
receipt: TransactionReceipt;
|
|
11976
11985
|
};
|
|
11977
|
-
type ErrorType = BaseErrorType;
|
|
11986
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
11978
11987
|
}
|
|
11979
11988
|
/**
|
|
11980
11989
|
* Transfers TIP20 tokens to another address.
|
|
@@ -12016,7 +12025,7 @@ export declare namespace transfer {
|
|
|
12016
12025
|
} & TokenParameter;
|
|
12017
12026
|
type Parameters<chain extends Chain | undefined = Chain | undefined, account extends Account | undefined = Account | undefined> = WriteParameters<chain, account> & Args;
|
|
12018
12027
|
type ReturnValue = WriteContractReturnType;
|
|
12019
|
-
type ErrorType = BaseErrorType;
|
|
12028
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
12020
12029
|
/** @internal */
|
|
12021
12030
|
function inner<action extends typeof writeContract | typeof writeContractSync, chain extends Chain | undefined, account extends Account | undefined>(action: action, client: Client<Transport, chain, account>, parameters: transfer.Parameters<chain, account>): Promise<ReturnType<action>>;
|
|
12022
12031
|
/**
|
|
@@ -13048,7 +13057,7 @@ export declare namespace transferSync {
|
|
|
13048
13057
|
/** Transaction receipt. */
|
|
13049
13058
|
receipt: TransactionReceipt;
|
|
13050
13059
|
}>;
|
|
13051
|
-
type ErrorType = BaseErrorType;
|
|
13060
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
13052
13061
|
}
|
|
13053
13062
|
/**
|
|
13054
13063
|
* Unpauses a TIP20 token.
|
|
@@ -13083,7 +13092,7 @@ export declare namespace unpause {
|
|
|
13083
13092
|
token: TokenId.TokenIdOrAddress;
|
|
13084
13093
|
};
|
|
13085
13094
|
type ReturnValue = WriteContractReturnType;
|
|
13086
|
-
type ErrorType = BaseErrorType;
|
|
13095
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
13087
13096
|
/** @internal */
|
|
13088
13097
|
function inner<action extends typeof writeContract | typeof writeContractSync, chain extends Chain | undefined, account extends Account | undefined>(action: action, client: Client<Transport, chain, account>, parameters: unpause.Parameters<chain, account>): Promise<ReturnType<action>>;
|
|
13089
13098
|
/**
|
|
@@ -14049,7 +14058,7 @@ export declare namespace unpauseSync {
|
|
|
14049
14058
|
}> & {
|
|
14050
14059
|
receipt: TransactionReceipt;
|
|
14051
14060
|
};
|
|
14052
|
-
type ErrorType = BaseErrorType;
|
|
14061
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
14053
14062
|
}
|
|
14054
14063
|
/**
|
|
14055
14064
|
* Updates the quote token for a TIP20 token.
|
|
@@ -14087,7 +14096,7 @@ export declare namespace prepareUpdateQuoteToken {
|
|
|
14087
14096
|
token: TokenId.TokenIdOrAddress;
|
|
14088
14097
|
};
|
|
14089
14098
|
type ReturnValue = WriteContractReturnType;
|
|
14090
|
-
type ErrorType = BaseErrorType;
|
|
14099
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
14091
14100
|
/** @internal */
|
|
14092
14101
|
function inner<action extends typeof writeContract | typeof writeContractSync, chain extends Chain | undefined, account extends Account | undefined>(action: action, client: Client<Transport, chain, account>, parameters: prepareUpdateQuoteToken.Parameters<chain, account>): Promise<ReturnType<action>>;
|
|
14093
14102
|
/**
|
|
@@ -15058,7 +15067,7 @@ export declare namespace prepareUpdateQuoteTokenSync {
|
|
|
15058
15067
|
}> & {
|
|
15059
15068
|
receipt: TransactionReceipt;
|
|
15060
15069
|
}>;
|
|
15061
|
-
type ErrorType = BaseErrorType;
|
|
15070
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
15062
15071
|
}
|
|
15063
15072
|
/**
|
|
15064
15073
|
* Updates the quote token for a TIP20 token.
|
|
@@ -15093,7 +15102,7 @@ export declare namespace updateQuoteToken {
|
|
|
15093
15102
|
token: TokenId.TokenIdOrAddress;
|
|
15094
15103
|
};
|
|
15095
15104
|
type ReturnValue = WriteContractReturnType;
|
|
15096
|
-
type ErrorType = BaseErrorType;
|
|
15105
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
15097
15106
|
/** @internal */
|
|
15098
15107
|
function inner<action extends typeof writeContract | typeof writeContractSync, chain extends Chain | undefined, account extends Account | undefined>(action: action, client: Client<Transport, chain, account>, parameters: updateQuoteToken.Parameters<chain, account>): Promise<ReturnType<action>>;
|
|
15099
15108
|
/**
|
|
@@ -16059,7 +16068,7 @@ export declare namespace updateQuoteTokenSync {
|
|
|
16059
16068
|
}> & {
|
|
16060
16069
|
receipt: TransactionReceipt;
|
|
16061
16070
|
}>;
|
|
16062
|
-
type ErrorType = BaseErrorType;
|
|
16071
|
+
type ErrorType = Errors.ExecutionErrorType | BaseErrorType;
|
|
16063
16072
|
}
|
|
16064
16073
|
/**
|
|
16065
16074
|
* Watches for TIP20 token approval events.
|
|
@@ -16385,4 +16394,163 @@ export declare namespace watchUpdateQuoteToken {
|
|
|
16385
16394
|
token: TokenId.TokenIdOrAddress;
|
|
16386
16395
|
};
|
|
16387
16396
|
}
|
|
16397
|
+
/** Errors this module throws for decoded Tempo errors. Narrow with `error.name`. */
|
|
16398
|
+
export type ExecutionErrorType = TokenInsufficientAllowanceErrorType | TokenInsufficientBalanceErrorType | TokenPausedErrorType | TokenPolicyForbidsErrorType | TokenSupplyCapExceededErrorType | TokenUnauthorizedErrorType;
|
|
16399
|
+
/** `TokenInsufficientBalanceError` with a literal `name`, for narrowing. */
|
|
16400
|
+
export type TokenInsufficientBalanceErrorType = TokenInsufficientBalanceError & {
|
|
16401
|
+
name: 'TokenInsufficientBalanceError';
|
|
16402
|
+
};
|
|
16403
|
+
/** Thrown when an account's TIP-20 balance is lower than the amount a call needs. */
|
|
16404
|
+
export declare class TokenInsufficientBalanceError extends TempoExecutionError<Errors.TempoExecutionError.Decoded<'InsufficientBalance'>> {
|
|
16405
|
+
/** Balance available. */
|
|
16406
|
+
available: bigint;
|
|
16407
|
+
/** Token decimals, when known. */
|
|
16408
|
+
decimals: number | undefined;
|
|
16409
|
+
/** Amount required. */
|
|
16410
|
+
required: bigint;
|
|
16411
|
+
/** Token address. */
|
|
16412
|
+
token: Address;
|
|
16413
|
+
constructor(parameters: Errors.TempoExecutionError.Parameters & {
|
|
16414
|
+
decimals?: number | undefined;
|
|
16415
|
+
});
|
|
16416
|
+
}
|
|
16417
|
+
/** `TokenInsufficientAllowanceError` with a literal `name`, for narrowing. */
|
|
16418
|
+
export type TokenInsufficientAllowanceErrorType = TokenInsufficientAllowanceError & {
|
|
16419
|
+
name: 'TokenInsufficientAllowanceError';
|
|
16420
|
+
};
|
|
16421
|
+
/** Thrown when a spender's TIP-20 allowance is lower than the amount it tries to transfer. */
|
|
16422
|
+
export declare class TokenInsufficientAllowanceError extends TempoExecutionError<Errors.TempoExecutionError.Decoded<'InsufficientAllowance'>> {
|
|
16423
|
+
/** Current allowance, when known. */
|
|
16424
|
+
allowance: bigint | undefined;
|
|
16425
|
+
/** Amount the spender tried to transfer. */
|
|
16426
|
+
amount: bigint | undefined;
|
|
16427
|
+
/** Token decimals, when known. */
|
|
16428
|
+
decimals: number | undefined;
|
|
16429
|
+
/** Token owner. */
|
|
16430
|
+
owner: Address;
|
|
16431
|
+
/** Spender. */
|
|
16432
|
+
spender: Address;
|
|
16433
|
+
/** Token address. */
|
|
16434
|
+
token: Address;
|
|
16435
|
+
constructor(parameters: TokenInsufficientAllowanceError.Parameters);
|
|
16436
|
+
}
|
|
16437
|
+
export declare namespace TokenInsufficientAllowanceError {
|
|
16438
|
+
/** Constructor parameters. */
|
|
16439
|
+
type Parameters = Errors.TempoExecutionError.Parameters & {
|
|
16440
|
+
/** Current allowance, when known. */
|
|
16441
|
+
allowance?: bigint | undefined;
|
|
16442
|
+
/** Amount the spender tried to transfer. */
|
|
16443
|
+
amount?: bigint | undefined;
|
|
16444
|
+
/** Token decimals, when known. */
|
|
16445
|
+
decimals?: number | undefined;
|
|
16446
|
+
/** Token owner. */
|
|
16447
|
+
owner: Address;
|
|
16448
|
+
/** Spender. */
|
|
16449
|
+
spender: Address;
|
|
16450
|
+
/** Token address. */
|
|
16451
|
+
token: Address;
|
|
16452
|
+
};
|
|
16453
|
+
}
|
|
16454
|
+
/** `TokenSupplyCapExceededError` with a literal `name`, for narrowing. */
|
|
16455
|
+
export type TokenSupplyCapExceededErrorType = TokenSupplyCapExceededError & {
|
|
16456
|
+
name: 'TokenSupplyCapExceededError';
|
|
16457
|
+
};
|
|
16458
|
+
/** Thrown when minting would exceed a TIP-20 token's supply cap. */
|
|
16459
|
+
export declare class TokenSupplyCapExceededError extends TempoExecutionError<Errors.TempoExecutionError.Decoded<'SupplyCapExceeded'>> {
|
|
16460
|
+
/** Amount to mint. */
|
|
16461
|
+
amount: bigint | undefined;
|
|
16462
|
+
/** Token decimals, when known. */
|
|
16463
|
+
decimals: number | undefined;
|
|
16464
|
+
/** Supply cap, when known. */
|
|
16465
|
+
supplyCap: bigint | undefined;
|
|
16466
|
+
/** Token address. */
|
|
16467
|
+
token: Address;
|
|
16468
|
+
/** Current total supply, when known. */
|
|
16469
|
+
totalSupply: bigint | undefined;
|
|
16470
|
+
constructor(parameters: TokenSupplyCapExceededError.Parameters);
|
|
16471
|
+
}
|
|
16472
|
+
export declare namespace TokenSupplyCapExceededError {
|
|
16473
|
+
/** Constructor parameters. */
|
|
16474
|
+
type Parameters = Errors.TempoExecutionError.Parameters & {
|
|
16475
|
+
/** Amount to mint. */
|
|
16476
|
+
amount?: bigint | undefined;
|
|
16477
|
+
/** Token decimals, when known. */
|
|
16478
|
+
decimals?: number | undefined;
|
|
16479
|
+
/** Supply cap, when known. */
|
|
16480
|
+
supplyCap?: bigint | undefined;
|
|
16481
|
+
/** Token address. */
|
|
16482
|
+
token: Address;
|
|
16483
|
+
/** Current total supply, when known. */
|
|
16484
|
+
totalSupply?: bigint | undefined;
|
|
16485
|
+
};
|
|
16486
|
+
}
|
|
16487
|
+
/** `TokenPolicyForbidsError` with a literal `name`, for narrowing. */
|
|
16488
|
+
export type TokenPolicyForbidsErrorType = TokenPolicyForbidsError & {
|
|
16489
|
+
name: 'TokenPolicyForbidsError';
|
|
16490
|
+
};
|
|
16491
|
+
/** Thrown when a TIP-20 token's transfer policy forbids the sender or recipient. */
|
|
16492
|
+
export declare class TokenPolicyForbidsError extends TempoExecutionError<Errors.TempoExecutionError.Decoded<'PolicyForbids'>> {
|
|
16493
|
+
/** Sender, when known. */
|
|
16494
|
+
from: Address | undefined;
|
|
16495
|
+
/** Transfer policy ID, when known. */
|
|
16496
|
+
policyId: bigint | undefined;
|
|
16497
|
+
/** Whether the policy authorizes the recipient, when known. */
|
|
16498
|
+
recipientAuthorized: boolean | undefined;
|
|
16499
|
+
/** Whether the policy authorizes the sender, when known. */
|
|
16500
|
+
senderAuthorized: boolean | undefined;
|
|
16501
|
+
/** Recipient, when known. */
|
|
16502
|
+
to: Address | undefined;
|
|
16503
|
+
/** Token address. */
|
|
16504
|
+
token: Address;
|
|
16505
|
+
constructor(parameters: TokenPolicyForbidsError.Parameters);
|
|
16506
|
+
}
|
|
16507
|
+
export declare namespace TokenPolicyForbidsError {
|
|
16508
|
+
/** Constructor parameters. */
|
|
16509
|
+
type Parameters = Errors.TempoExecutionError.Parameters & {
|
|
16510
|
+
/** Sender, when known. */
|
|
16511
|
+
from?: Address | undefined;
|
|
16512
|
+
/** Transfer policy ID, when known. */
|
|
16513
|
+
policyId?: bigint | undefined;
|
|
16514
|
+
/** Whether the policy authorizes the recipient, when known. */
|
|
16515
|
+
recipientAuthorized?: boolean | undefined;
|
|
16516
|
+
/** Whether the policy authorizes the sender, when known. */
|
|
16517
|
+
senderAuthorized?: boolean | undefined;
|
|
16518
|
+
/** Recipient, when known. */
|
|
16519
|
+
to?: Address | undefined;
|
|
16520
|
+
/** Token address. */
|
|
16521
|
+
token: Address;
|
|
16522
|
+
};
|
|
16523
|
+
}
|
|
16524
|
+
/** `TokenPausedError` with a literal `name`, for narrowing. */
|
|
16525
|
+
export type TokenPausedErrorType = TokenPausedError & {
|
|
16526
|
+
name: 'TokenPausedError';
|
|
16527
|
+
};
|
|
16528
|
+
/** Thrown when calling a paused TIP-20 token. */
|
|
16529
|
+
export declare class TokenPausedError extends TempoExecutionError<Errors.TempoExecutionError.Decoded<'ContractPaused'>> {
|
|
16530
|
+
/** Token address. */
|
|
16531
|
+
token: Address;
|
|
16532
|
+
constructor(parameters: Errors.TempoExecutionError.Parameters & {
|
|
16533
|
+
token: Address;
|
|
16534
|
+
});
|
|
16535
|
+
}
|
|
16536
|
+
/** `TokenUnauthorizedError` with a literal `name`, for narrowing. */
|
|
16537
|
+
export type TokenUnauthorizedErrorType = TokenUnauthorizedError & {
|
|
16538
|
+
name: 'TokenUnauthorizedError';
|
|
16539
|
+
};
|
|
16540
|
+
/** Thrown when an account lacks the TIP-20 role a call requires. */
|
|
16541
|
+
export declare class TokenUnauthorizedError extends TempoExecutionError<Errors.TempoExecutionError.Decoded<'Unauthorized'>> {
|
|
16542
|
+
/** Account that made the call. */
|
|
16543
|
+
account: Address;
|
|
16544
|
+
/** Role the call requires. */
|
|
16545
|
+
role: TokenRole.TokenRole;
|
|
16546
|
+
/** Token address. */
|
|
16547
|
+
token: Address;
|
|
16548
|
+
constructor(parameters: Errors.TempoExecutionError.Parameters & {
|
|
16549
|
+
account: Address;
|
|
16550
|
+
role: TokenRole.TokenRole;
|
|
16551
|
+
token: Address;
|
|
16552
|
+
});
|
|
16553
|
+
}
|
|
16554
|
+
/** @internal */
|
|
16555
|
+
export declare const errorResolvers: Resolvers;
|
|
16388
16556
|
//# sourceMappingURL=token.d.ts.map
|