@chainlink/evm-gauntlet
Advanced tools
Comparing version 0.4.0 to 0.5.0
@@ -14,5 +14,11 @@ import { CommandCtor } from '.'; | ||
} | ||
export declare type CommandInfo = { | ||
contractName: string; | ||
action: string; | ||
inputs: Record<string, any>; | ||
}; | ||
declare type MakeMessage<CI, Contract, Provider, Message> = (contract: Contract, provider: Provider, input: CI, action: string, contractAddress: string, isDeployment?: boolean, opts?: Record<string, any>) => () => Promise<Message[]>; | ||
export declare const makeExecuteCommand: <UI, CI, Message, Contract, Provider, Transaction, Wallet>(registerMakeMessage: MakeMessage<CI, Contract, Provider, Message>) => (config: ExecuteCommandConfig<UI, CI, Transaction, ExecutionContext<Wallet, Provider, Contract, Message, Transaction>, Contract>) => (deps: Dependencies<Provider, Contract, Message, Transaction, Wallet, BasicEnv>) => CommandCtor<ExecuteCommandInstance<UI, CI, Provider, Contract, Message, Transaction, Wallet, ExecutionContext<Wallet, Provider, Contract, Message, Transaction>>>; | ||
declare type GetFunctionInputSchema<CI, Contract> = (contract: Contract, contractName: string, functionName: string, input: CI) => () => CommandInfo; | ||
export declare const makeExecuteCommand: <UI, CI, Message, Contract_1, Provider, Transaction, Wallet>(registerMakeMessage: MakeMessage<CI, Contract_1, Provider, Message>, getFunctionInputSchema: GetFunctionInputSchema<CI, Contract_1>) => (config: ExecuteCommandConfig<UI, CI, Transaction, ExecutionContext<Wallet, Provider, Contract_1, Message, Transaction>, Contract_1>) => (deps: Dependencies<Provider, Contract_1, Message, Transaction, Wallet, BasicEnv>) => CommandCtor<ExecuteCommandInstance<UI, CI, Provider, Contract_1, Message, Transaction, Wallet, ExecutionContext<Wallet, Provider, Contract_1, Message, Transaction>>>; | ||
export {}; | ||
//# sourceMappingURL=executeCommand.d.ts.map |
@@ -6,3 +6,3 @@ "use strict"; | ||
const command_1 = require("./command"); | ||
const makeExecuteCommand = (registerMakeMessage) => (config) => (deps) => { | ||
const makeExecuteCommand = (registerMakeMessage, getFunctionInputSchema) => (config) => (deps) => { | ||
var _a; | ||
@@ -14,16 +14,4 @@ const id = (0, command_1.makeCommandId)(config.category, config.action, config.suffixes); | ||
this.highlightText = (message) => deps.logger.style(message, 'blue'); | ||
this.defaultBeforeExecute = (context, input) => async () => { | ||
if (input.contract) { | ||
deps.logger.info(`Contract Input Params: ${input.contract}`); | ||
} | ||
if (config.action !== 'deploy') { | ||
deps.logger.info(`About to execute ${this.highlightText(config.action)} function on the ${this.highlightText(config.category)} contract with address ${this.highlightText(this.contractAddress)}`); | ||
} | ||
else { | ||
deps.logger.info(`About to deploy a new ${this.highlightText(config.category)} contract`); | ||
} | ||
}; | ||
this.defaultAfterExecute = () => async (response) => { | ||
deps.logger.success(`Execution finished at transaction: ${response.responses[0].tx.hash}`); | ||
}; | ||
this.defaultBeforeExecute = () => async () => { }; | ||
this.defaultAfterExecute = () => async () => { }; | ||
this.runValidations = async (validations, input) => { | ||
@@ -77,2 +65,9 @@ const result = await Promise.all(validations.map((validation) => validation(input, this.executionContext))); | ||
this.execute = async () => { | ||
const info = this.getCommandInfo(); | ||
if (config.action !== 'deploy') { | ||
deps.logger.info(`About to execute ${info.contractName}(${this.contractAddress}).${info.action}(${JSON.stringify(info.inputs)})`); | ||
} | ||
else { | ||
deps.logger.info(`About to deploy a new ${this.highlightText(config.category)} contract`); | ||
} | ||
await this.beforeExecute(); | ||
@@ -91,9 +86,7 @@ const messages = await this.makeMessage(); | ||
} | ||
else { | ||
const signer = await this.wallet.getPublicKey(); | ||
deps.logger.info(`Operator address: ${signer}`); | ||
} | ||
const signer = await this.wallet.getPublicKey(); | ||
deps.logger.info(`Operator address: ${signer}`); | ||
deps.logger.info(`Contract address: ${this.contractAddress}`); | ||
deps.logger.loading('Simulating transactions...'); | ||
await Promise.all(messages.map((msg) => this.provider.simulate(this.wallet, msg, this.contract))); | ||
await Promise.all(messages.map((msg) => this.provider.simulate(signer, msg, this.contract))); | ||
await deps.prompt('Continue?'); | ||
@@ -122,2 +115,3 @@ deps.logger.loading(`Sending transaction...`); | ||
const data = await this.afterExecute(result); | ||
deps.logger.success(`Execution finished at transaction: ${result.responses[0].tx.hash}`); | ||
const report = !!data ? { ...result, data: { ...data } } : result; | ||
@@ -151,5 +145,6 @@ if (deps.afterExecuteExternal) | ||
c.makeMessage = registerMakeMessage(c.contract, c.provider.provider, c.input.contract, config.internalFunction || config.action, c.contractAddress, config.action === 'deploy', flags); | ||
c.getCommandInfo = getFunctionInputSchema(c.contract, _a.category, config.internalFunction || config.action, c.input.contract); | ||
c.beforeExecute = config.hooks?.beforeExecute | ||
? config.hooks.beforeExecute(c.executionContext, c.input, { logger: deps.logger, prompt: deps.prompt }) | ||
: c.defaultBeforeExecute(c.executionContext, c.input); | ||
: c.defaultBeforeExecute(); | ||
c.afterExecute = config.hooks?.afterExecute | ||
@@ -164,2 +159,2 @@ ? config.hooks.afterExecute(c.executionContext, c.input, { logger: deps.logger, prompt: deps.prompt }) | ||
exports.makeExecuteCommand = makeExecuteCommand; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXhlY3V0ZUNvbW1hbmQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvY29yZS9jb21tYW5kcy9iYXNlL2V4ZWN1dGVDb21tYW5kLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLDREQUErRDtBQU0vRCx1Q0FBNEQ7QUFzQnJELE1BQU0sa0JBQWtCLEdBQUcsQ0FDaEMsbUJBQWlFLEVBQ2pFLEVBQUUsQ0FBQyxDQUNILE1BTUMsRUFDRCxFQUFFLENBQUMsQ0FBQyxJQUE4RSxFQUFFLEVBQUU7O0lBQ3RGLE1BQU0sRUFBRSxHQUFHLElBQUEsdUJBQWEsRUFBQyxNQUFNLENBQUMsUUFBUSxFQUFFLE1BQU0sQ0FBQyxNQUFNLEVBQUUsTUFBTSxDQUFDLFFBQVEsQ0FBQyxDQUFBO0lBRXpFLE1BQU0sT0FBT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YWN0QWRkcmVzcyA/IGNvbmZpZy5sb2FkRGVmYXVsdENvbnRyYWN0QWRkcmVzcyhlbnYpIDogdW5kZWZpbmVkKVxuICAgICAgYy5jb250cmFjdCA9IGNvbmZpZy5sb2FkQ29udHJhY3QoKVxuICAgICAgYy5leGVjdXRpb25Db250ZXh0ID0ge1xuICAgICAgICBwcm92aWRlcjogYy5wcm92aWRlcixcbiAgICAgICAgd2FsbGV0OiBjLndhbGxldCxcbiAgICAgICAgaWQ6IG1ha2VDb21tYW5kSWQoY29uZmlnLmNhdGVnb3J5LCBjb25maWcuYWN0aW9uLCBjb25maWcuc3VmZml4ZXMpLFxuICAgICAgICBjb250cmFjdEFkZHJlc3M6IGMuY29udHJhY3RBZGRyZXNzLFxuICAgICAgICBmbGFnczogZmxhZ3MsXG4gICAgICAgIGNvbnRyYWN0OiBjb25maWcubG9hZENvbnRyYWN0KCksXG4gICAgICB9XG4gICAgICBjLmlucHV0ID0gYXdhaXQgYy5idWlsZENvbW1hbmRJbnB1dChmbGFncywgYXJncywgZW52KVxuICAgICAgYy5tYWtlTWVzc2FnZSA9IHJlZ2lzdGVyTWFrZU1lc3NhZ2UoXG4gICAgICAgIGMuY29udHJhY3QsXG4gICAgICAgIGMucHJvdmlkZXIucHJvdmlkZXIsXG4gICAgICAgIGMuaW5wdXQuY29udHJhY3QsXG4gICAgICAgIGNvbmZpZy5pbnRlcm5hbEZ1bmN0aW9uIHx8IGNvbmZpZy5hY3Rpb24sXG4gICAgICAgIGMuY29udHJhY3RBZGRyZXNzLFxuICAgICAgICBjb25maWcuYWN0aW9uID09PSAnZGVwbG95JyxcbiAgICAgICAgZmxhZ3MsXG4gICAgICApXG4gICAgICBjLmdldENvbW1hbmRJbmZvID0gZ2V0RnVuY3Rpb25JbnB1dFNjaGVtYShcbiAgICAgICAgYy5jb250cmFjdCxcbiAgICAgICAgdGhpcy5jYXRlZ29yeSxcbiAgICAgICAgY29uZmlnLmludGVybmFsRnVuY3Rpb24gfHwgY29u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Nob3VsZCBldmVyIG9jY3VyXG4gICAgICAgIC8vIHRoZSBjb21tYW5kIHNob3VsZCBlcnJvciBvdXQgYmVmb3JlIGVudGVyaW5nIHRoaXMgaWYgc3RhdGVtZW50XG4gICAgICAgIGRlcHMubG9nZ2VyLmVycm9yKGBDb250cmFjdCB3YXMgbm90IGRlcGxveWVkOiAke3R4LmVycm9yTWVzc2FnZX1gKVxuICAgICAgfVxuXG4gICAgICBsZXQgcmVzdWx0ID0ge1xuICAgICAgICByZXNwb25zZXM6IFtcbiAgICAgICAgICB7XG4gICAgICAgICAgICB0eCxcbiAgICAgICAgICAgIGNvbnRyYWN0OiB0eC5hZGRyZXNzLFxuICAgICAgICAgIH0sXG4gICAgICAgIF0sXG4gICAgICB9XG4gICAgICBjb25zdCBkYXRhID0gYXdhaXQgdGhpcy5hZnRlckV4ZWN1dGUocmVzdWx0KVxuICAgICAgZGVwcy5sb2dnZXIuc3VjY2VzcyhgRXhlY3V0aW9uIGZpbmlzaGVkIGF0IHRyYW5zYWN0aW9uOiAke3Jlc3VsdC5yZXNwb25zZXNbMF0udHguaGFzaH1gKVxuXG4gICAgICBjb25zdCByZXBvcnQgPSAhIWRhdGEgPyB7IC4uLnJlc3VsdCwgZGF0YTogeyAuLi5kYXRhIH0gfSA6IHJlc3VsdFxuICAgICAgaWYgKGRlcHMuYWZ0ZXJFeGVjdXRlRXh0ZXJuYWwpIGF3YWl0IGRlcHMuYWZ0ZXJFeGVjdXRlRXh0ZXJuYWwoaWQsIHRoaXMuZXhlY3V0aW9uQ29udGV4dC5mbGFncy5uZXR3b3JrLCByZXBvcnQpXG5cbiAgICAgIHJldHVybiByZXBvcnRcbiAgICB9XG4gIH1cblxuICByZXR1cm4gY29tbWFuZFxufVxuIl19 |
@@ -42,2 +42,3 @@ import { CommandCtor } from '.'; | ||
loadContract: () => Contract; | ||
loadDefaultContractAddress?: (env: any) => string; | ||
} | ||
@@ -44,0 +45,0 @@ export interface InspectCommandInstance<QueryResult> { |
@@ -58,3 +58,4 @@ "use strict"; | ||
c.provider = deps.makeProvider(env.providerUrl); | ||
c.contractAddress = args[0]; | ||
c.contractAddress = | ||
args[0] || (config.loadDefaultContractAddress ? config.loadDefaultContractAddress(env) : undefined); | ||
c.input = await c.buildCommandInput(flags, args); | ||
@@ -68,2 +69,2 @@ c.contract = config.loadContract(); | ||
exports.makeInspectionCommand = makeInspectionCommand; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5zcGVjdGlvbkNvbW1hbmQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvY29yZS9jb21tYW5kcy9iYXNlL2luc3BlY3Rpb25Db21tYW5kLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7QUFBQSx3R0FBOEU7QUFJOUUsdUNBQW9EO0FBNEU3QyxNQUFNLHFCQUFxQixHQUFHLENBV25DLEtBQWdDLEVBQ2hDLEVBQUUsQ0FBQyxDQUNILE1BQWlILEVBQ2pILEVBQUUsQ0FBQyxDQUFDLElBQXNFLEVBQUUsRUFBRTs7SUFDOUUsTUFBTSxPQUFPLFNBQXFELE1BQU0saUJBQ3RFLFNBQVEsY0FBVztZQUQ2Qzs7Z0JBOEJoRSxzQkFBaUIsR0FBRyxLQUFLLEVBQUUsS0FBSyxFQUFFLElBQUksRUFBMEQsRUFBRTtvQkFDaEcsTUFBTSxTQUFTLEdBQUcsTUFBTSxDQUFDLGFBQWEsSUFBSSxDQUFDLE1BQU0sTUFBTSxDQUFDLGFBQWEsQ0FBQyxLQUFLLEVBQUUsSUFBSSxDQUFDLENBQUMsQ0FBQTtvQkFDbkYsTUFBTSxhQUFhLEdBQUcsTUFBTSxDQUFDLGlCQUFpQixJQUFJLENBQUMsTUFBTSxNQUFNLENBQUMsaUJBQWlCLENBQUMsU0FBUyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUE7b0JBRW5HLE9BQU87d0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VyKGVudi5wcm92aWRlclVybClcbiAgICAgIGMuY29udHJhY3RBZGRyZXNzID1cbiAgICAgICAgYXJnc1swXSB8fCAoY29uZmlnLmxvYWREZWZhdWx0Q29udHJhY3RBZGRyZXNzID8gY29uZmlnLmxvYWREZWZhdWx0Q29udHJhY3RBZGRyZXNzKGVudikgOiB1bmRlZmluZWQpXG5cbiAgICAgIGMuaW5wdXQgPSBhd2FpdCBjLmJ1aWxkQ29tbWFuZElucHV0KGZsYWdzLCBhcmdzKVxuICAgICAgYy5jb250cmFjdCA9IGNvbmZpZy5sb2FkQ29udHJhY3QoKVxuXG4gICAgICByZXR1cm4gY1xuICAgIH1cblxuICAgIGJ1aWxkQ29tbWFuZElucHV0ID0gYXN5bmMgKGZsYWdzLCBhcmdzKTogUHJvbWlzZTxJbnB1dDxJbnNwZWN0VXNlcklucHV0PFVJLCBDb21wYXJlSW5wdXQ+LCBDST4+ID0+IHtcbiAgICAgIGNvbnN0IHVzZXJJbnB1dCA9IGNvbmZpZy5tYWtlVXNlcklucHV0ICYmIChhd2FpdCBjb25maWcubWFrZVVzZXJJbnB1dChmbGFncywgYXJncykpXG4gICAgICBjb25zdCBjb250cmFjdElucHV0ID0gY29uZmlnLm1ha2VDb250cmFjdElucHV0ICYmIChhd2FpdCBjb25maWcubWFrZUNvbnRyYWN0SW5wdXQodXNlcklucHV0LmlucHV0KSlcblxuICAgICAgcmV0dXJuIHtcbiAgICAgICAgdXNlcjogdXNlcklucHV0IHx8IHtcbiAgICAgICAgICBpbnB1dDogbnVsbCxcbiAgICAgICAgICB0b0NvbXBhcmU6IG51bGwsXG4gICAgICAgIH0sXG4gICAgICAgIGNvbnRyYWN0OiBjb250cmFjdElucHV0IHx8IChbXSBhcyBhbnkpLFxuICAgICAgfVxuICAgIH1cblxuICAgIHJ1blF1ZXJpZXMgPSBhc3luYyAoZnVuY3Rpb25zOiBzdHJpbmdbXSwgY29udHJhY3RJbnB1dHM6IENJIHwgQ0lbXSk6IFByb21pc2U8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ICAgICAgZGVwcy5sb2dnZXIuaW5mbygnSW5zcGVjdGlvbiBSZXN1bHRzOicpXG4gICAgICBkZXBzLmxvZ2dlci5sb2coZGF0YS5yZXN1bHQpXG4gICAgICAvLyBUT0RPOiBHYXVudGxldCBjb3JlIGZvcmNlcyB1cyB0byB1c2UgUmVzdWx0IHR5cGUgZm9yIGV2ZXJ5IGNvbW1hbmQuIFVwZGF0ZSB0byBjaG9vc2UgdGhlIHJlc3VsdCBpZiB1c2luZyBCYXNlIENvbW1hbmRcbiAgICAgIHJldHVybiB7XG4gICAgICAgIGRhdGE6IHtcbiAgICAgICAgICBkYXRhOiBkYXRhLnJlc3VsdCxcbiAgICAgICAgICBjb250cmFjdDogdGhpcy5jb250cmFjdEFkZHJlc3MsXG4gICAgICAgICAgaW5zcGVjdGlvbjogaW5zcGVjdGlvblJlc3VsdHMsXG4gICAgICAgIH0sXG4gICAgICAgIHJlc3BvbnNlczogW10sXG4gICAgICB9XG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIGNvbW1hbmRcbn1cbiJdfQ== |
@@ -7,2 +7,3 @@ import { Result, BaseConfig } from '@chainlink/gauntlet-core'; | ||
import { Input } from './command'; | ||
import { CommandInfo } from './executeCommand'; | ||
export declare type BeforeExecute<UI, CI, ExecutionContext> = (context: ExecutionContext, input: Input<UI, CI>, deps: BasicDeps) => () => Promise<void>; | ||
@@ -29,2 +30,3 @@ export declare type AfterExecute<UI, CI, Transaction, ExecutionContext> = (context: ExecutionContext, input: Input<UI, CI>, deps: BasicDeps) => (result: Result<TransactionResponse<Transaction>>) => Promise<any>; | ||
makeMessage: () => Promise<Message[]>; | ||
getCommandInfo: () => CommandInfo; | ||
execute: () => Promise<Result<TransactionResponse<Transaction>>>; | ||
@@ -31,0 +33,0 @@ simulate?: () => boolean; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMi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cjogSVByb3ZpZGVyPFByb3ZpZGVyLCBDb250cmFjdCwgTWVzc2FnZSwgVHJhbnNhY3Rpb24sIFdhbGxldD5cbiAgY29udHJhY3RBZGRyZXNzOiBzdHJpbmdcbiAgYWNjb3VudDogc3RyaW5nXG4gIGV4ZWN1dGlvbkNvbnRleHQ6IEVDXG4gIGNvbnRyYWN0OiBDb250cmFjdFxuXG4gIGlucHV0OiBJbnB1dDxVSSwgQ0k+XG5cbiAgbWFrZU1lc3NhZ2U6ICgpID0+IFByb21pc2U8TWVzc2FnZVtdPlxuICBnZXRDb21tYW5kSW5mbzogKCkgPT4gQ29tbWFuZEluZm9cbiAgZXhlY3V0ZTogKCkgPT4gUHJvbWlzZTxSZXN1bHQ8VHJhbnNhY3Rpb25SZXNwb25zZTxUcmFuc2FjdGlvbj4+PlxuICBzaW11bGF0ZT86ICgpID0+IGJvb2xlYW5cblxuICBiZWZvcmVFeGVjdXRlOiAoKSA9PiBQcm9taXNlPHZvaWQ+XG4gIGFmdGVyRXhlY3V0ZTogKHJlc3BvbnNlOiBSZXN1bHQ8VHJhbnNhY3Rpb25SZXNwb25zZTxUcmFuc2FjdGlvbj4+KSA9PiBQcm9taXNlPGFueT5cbn1cbiJdfQ== |
@@ -9,4 +9,4 @@ import { IWallet } from '..'; | ||
parseContractError?: (contract: Contract, revertData: any) => null | any; | ||
simulate: (wallet: IWallet<Wallet>, call: Message, contract: Contract, opts?: Record<string, any>) => Promise<string>; | ||
simulate: (signer: string, call: Message, contract: Contract, opts?: Record<string, any>) => Promise<string>; | ||
} | ||
//# sourceMappingURL=index.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY29yZS9wcm92aWRlci9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBp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OiAoc2lnbmVyOiBzdHJpbmcsIGNhbGw6IE1lc3NhZ2UsIGNvbnRyYWN0OiBDb250cmFjdCwgb3B0cz86IFJlY29yZDxzdHJpbmcsIGFueT4pID0+IFByb21pc2U8c3RyaW5nPlxufVxuIl19 |
@@ -15,2 +15,3 @@ "use strict"; | ||
...(opts?.gasPrice && { gasPrice: opts.gasPrice }), | ||
...(opts?.nonce && { nonce: opts.nonce }), | ||
}, | ||
@@ -26,2 +27,3 @@ ]; | ||
...(opts?.gasPrice && { gasPrice: opts.gasPrice }), | ||
...(opts?.nonce && { nonce: opts.nonce }), | ||
}, | ||
@@ -31,5 +33,17 @@ ]; | ||
function makeEVMExecuteCommand(config) { | ||
return (0, base_1.makeExecuteCommand)(registerMakeMessage)(config); | ||
return (0, base_1.makeExecuteCommand)(registerMakeMessage, getFunctionInputSchema)(config); | ||
} | ||
exports.makeEVMExecuteCommand = makeEVMExecuteCommand; | ||
const getFunctionInputSchema = (contract, contractName, functionName, input) => () => { | ||
const functionInputSchema = functionName !== 'deploy' ? contract.interface.getFunction(functionName).inputs : contract.interface.deploy.inputs; | ||
const inputs = functionInputSchema.reduce((acc, param, idx) => ({ | ||
...acc, | ||
[param.name]: input[idx], | ||
}), {}); | ||
return { | ||
contractName: contractName, | ||
action: functionName, | ||
inputs: inputs, | ||
}; | ||
}; | ||
const fetchContract = async (contract, provider, contractAddress, fn, input) => { | ||
@@ -45,2 +59,2 @@ const connectedContract = contracts_1.ContractFactory.getContract(contractAddress, contract.interface).connect(provider); | ||
exports.nativeCommands = [sendTransaction_1.registerSendTransactionCommand]; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvZXZtL2NvbW1hbmRzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLHdEQUEwRDtBQVkxRCxtREF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YWN0b3J5LFxuICBwcm92aWRlcjogRXRoZXJzUHJvdmlkZXIsXG4gIGNvbnRyYWN0QWRkcmVzczogc3RyaW5nLFxuICBmbjogc3RyaW5nLFxuICBpbnB1dDogYW55LFxuKSA9PiB7XG4gIGNvbnN0IGNvbm5lY3RlZENvbnRyYWN0ID0gQ29udHJhY3RGYWN0b3J5LmdldENvbnRyYWN0KGNvbnRyYWN0QWRkcmVzcywgY29udHJhY3QuaW50ZXJmYWNlKS5jb25uZWN0KHByb3ZpZGVyKVxuICBjb25zdCByZXN1bHQgPSBhd2FpdCBjb25uZWN0ZWRDb250cmFjdFtmbl0oLi4uaW5wdXQpXG4gIHJldHVybiByZXN1bHRcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIG1ha2VFVk1JbnNwZWN0aW9uQ29tbWFuZDxVSSwgQ0ksIENvbXBhcmVJbnB1dCwgUXVlcnlSZXN1bHQ+KFxuICBjb25maWc6IEVWTUluc3BlY3Rpb25Db21tYW5kQ29uZmlnPFVJLCBDSSwgQ29tcGFyZUlucHV0LCBRdWVyeVJlc3VsdD4sXG4pIHtcbiAgcmV0dXJuIG1ha2VJbnNwZWN0aW9uQ29tbWFuZChmZXRjaENvbnRyYWN0KShjb25maWcpXG59XG5cbmV4cG9ydCBjb25zdCBuYXRpdmVDb21tYW5kcyA9IFtyZWdpc3RlclNlbmRUcmFuc2FjdGlvbkNvbW1hbmRdXG4iXX0= |
@@ -17,3 +17,3 @@ import { IProvider } from '../../core'; | ||
signAndSend: (wallet: IWallet<EthersWallet>, calls: TransactionRequest[], contract: ContractFactory) => Promise<EVMTransaction>; | ||
simulate: (wallet: IWallet<EthersWallet>, call: TransactionRequest, contract: ContractFactory, opts?: Record<string, any>) => Promise<string>; | ||
simulate: (signer: string, call: TransactionRequest, contract: ContractFactory, opts?: Record<string, any>) => Promise<string>; | ||
parseContractError: (contract: ContractFactory, revertData: ethers.utils.BytesLike) => null | ErrorDescription; | ||
@@ -20,0 +20,0 @@ } |
@@ -50,7 +50,7 @@ "use strict"; | ||
}; | ||
this.simulate = async (wallet, call, contract, opts) => { | ||
this.simulate = async (signer, call, contract, opts) => { | ||
try { | ||
const returnValue = await this.provider.call({ | ||
to: call.to, | ||
from: wallet.wallet.address, | ||
from: signer, | ||
data: call.data, | ||
@@ -85,2 +85,2 @@ value: ethers_1.BigNumber.from(call.value), | ||
exports.makeProvider = makeProvider; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvZXZtL3Byb3ZpZGVyL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUVBLG1DQUEwQztBQVUxQyxNQUFNLFdBQVcsR0FBRyxXQUFXLENBQUE7QUFFL0IsTUFBTSxZQUFZLEdBQUcsQ0FBQyxRQUFxQixFQUFFLE9BQWdCLEVBQWtCLEVBQUU7SUFDL0UsTUFBTSxXQUFXLEdBQW1CO1FBQ2xDLElBQUksRUFBRSxRQUFRLENBQUMsSUFBSTtRQUNuQixPQUFPLEVBQUUsT0FBTyxJQUFJLFFBQVEsQ0FBQyxFQUFFO1FBQy9CLElBQUksRUFBRSxLQUFLLElBQUksRUFBRTtZQUNmLE1BQU0sT0FBTyxHQUFHLE1BQU0sUUFBUSxDQUFDLElBQUksRUFBRSxDQUFBO1lBQ3JDLE1BQU0sT0FBTyxHQUFHLE9BQU8sSUFBSSxJQUFJLElBQUksT0FBTyxDQUFDLE1BQU0sS0FBSyxDQUFDLENBQUE7WUFDdkQsV0FBVyxDQUFDLE1BQU0sR0FBRyxPQUFPLENBQUMsQ0FBQyxDQUFDLFVBQVUsQ0FBQyxDQUFDLENBQUMsVUFBVSxDQUFBO1lBQ3RELElBQUksQ0FBQyxXQUFXLENBQUMsT0FBTyxFQUFFO2dCQUN4QixXQUFXLENBQUMsT0FBTyxHQUFHLE9BQU8sQ0FBQyx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3JpcHRpb24gPT4ge1xuICAgIHJldHVybiByZXZlcnREYXRhID09PSB1bmRlZmluZWQgPyBudWxsIDogY29udHJhY3QuaW50ZXJmYWNlLnBhcnNlRXJyb3IocmV2ZXJ0RGF0YSlcbiAgfVxufVxuXG5leHBvcnQgY29uc3QgbWFrZVByb3ZpZGVyID0gKGJhc2VVcmw6IHN0cmluZykgPT4ge1xuICByZXR1cm4gbmV3IFByb3ZpZGVyKGJhc2VVcmwpXG59XG4iXX0= |
{ | ||
"name": "@chainlink/evm-gauntlet", | ||
"version": "0.4.0", | ||
"version": "0.5.0", | ||
"description": "Gauntlet EVM", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
139531
859