@ember-finance/sdk 2.3.1 → 2.4.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.
|
@@ -45,4 +45,10 @@ export interface RewardToken {
|
|
|
45
45
|
* @memberof RewardToken
|
|
46
46
|
*/
|
|
47
47
|
decimals: number;
|
|
48
|
+
/**
|
|
49
|
+
* Optional remark describing how this reward is disbursed (e.g. \"Distributed via Merkl\"). Rendered by the frontend as a tooltip in the vault rewards table. Absent when there is no remark.
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof RewardToken
|
|
52
|
+
*/
|
|
53
|
+
disbursementRemarks?: string;
|
|
48
54
|
}
|
|
@@ -146,6 +146,14 @@ export interface ITransactionCall {
|
|
|
146
146
|
export interface IEvmCallOptions {
|
|
147
147
|
/** If true, simulates the transaction without sending */
|
|
148
148
|
dryRun?: boolean;
|
|
149
|
+
/**
|
|
150
|
+
* Override `from` address for the dry-run eth_call. When omitted the RPC
|
|
151
|
+
* defaults to `0x0`, which trips `onlyOperator` / `onlyOwner` / `onlyAdmin`
|
|
152
|
+
* modifiers before the simulated function body runs. Set to the wallet
|
|
153
|
+
* that would sign the real tx so the modifier passes and the dry-run
|
|
154
|
+
* exercises the actual code path. Ignored unless `dryRun` is `true`.
|
|
155
|
+
*/
|
|
156
|
+
dryRunFrom?: string;
|
|
149
157
|
/** If true, returns the transaction call object without executing */
|
|
150
158
|
returnTxCall?: boolean;
|
|
151
159
|
/** If true, waits for the transaction to be mined and returns receipt with events */
|
|
@@ -134,9 +134,12 @@ export class EVMOnChainCalls {
|
|
|
134
134
|
throw new Error("Provider required for dry run");
|
|
135
135
|
}
|
|
136
136
|
try {
|
|
137
|
+
// `from` defaults to 0x0, which fails onlyOperator/onlyOwner modifiers before
|
|
138
|
+
// the simulated body runs. Callers pass `dryRunFrom` to exercise those paths.
|
|
137
139
|
const resultData = await this.provider.call({
|
|
138
140
|
to: encodedTx.to,
|
|
139
|
-
data: encodedTx.data
|
|
141
|
+
data: encodedTx.data,
|
|
142
|
+
from: options?.dryRunFrom
|
|
140
143
|
});
|
|
141
144
|
// Decode the result if possible
|
|
142
145
|
let result;
|