mirror of
https://github.com/Instadapp/Gelato-automations.git
synced 2024-07-29 22:28:07 +00:00
27 lines
666 B
JavaScript
27 lines
666 B
JavaScript
|
const {expect} = require("chai");
|
||
|
|
||
|
async function providerChooseExecutor(
|
||
|
providerWallet,
|
||
|
executorAddress,
|
||
|
gelatoCore
|
||
|
) {
|
||
|
//#region Provider choose a executor
|
||
|
|
||
|
// Provider choose a executor who will execute futur task
|
||
|
// for the provider, it will be compensated by the provider.
|
||
|
|
||
|
let providerAddress = await providerWallet.getAddress();
|
||
|
|
||
|
await expect(
|
||
|
gelatoCore.connect(providerWallet).providerAssignsExecutor(executorAddress)
|
||
|
).to.emit(gelatoCore, "LogProviderAssignedExecutor");
|
||
|
|
||
|
expect(await gelatoCore.executorByProvider(providerAddress)).to.be.equal(
|
||
|
executorAddress
|
||
|
);
|
||
|
|
||
|
//#endregion
|
||
|
}
|
||
|
|
||
|
module.exports = providerChooseExecutor;
|