mirror of
https://github.com/Instadapp/Gelato-automations.git
synced 2024-07-29 22:28:07 +00:00
27 lines
686 B
JavaScript
27 lines
686 B
JavaScript
const { expect } = require("chai");
|
|
|
|
module.exports = async function (
|
|
gelatoProviderWallet,
|
|
gelatoExecutorAddress,
|
|
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.
|
|
|
|
const gelatoProviderAddress = await gelatoProviderWallet.getAddress();
|
|
|
|
await expect(
|
|
gelatoCore
|
|
.connect(gelatoProviderWallet)
|
|
.providerAssignsExecutor(gelatoExecutorAddress)
|
|
).to.emit(gelatoCore, "LogProviderAssignedExecutor");
|
|
|
|
expect(
|
|
await gelatoCore.executorByProvider(gelatoProviderAddress)
|
|
).to.be.equal(gelatoExecutorAddress);
|
|
|
|
//#endregion
|
|
};
|