Skip to content

Commit fb23f73

Browse files
committed
Update specification
1 parent 315fd9a commit fb23f73

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

specification.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -401,14 +401,14 @@ Creates EVMScript to add new reward program address to `RewardProgramsRegistry`.
401401

402402
#### function createEVMScript(address \_creator, bytes \_evmScriptCallData) external view returns (bytes)
403403

404-
Creates EVMScript to add new reward address to `RewardProgramsRegistry`. `_evmScriptCallData` contains encoded tuple: `(address _rewardProgram)`, where `_rewardProgram` - new reward program address to add. To successfully create EVMScript next requirements must be met:
404+
Creates EVMScript to add new reward address to `RewardProgramsRegistry`. `_evmScriptCallData` contains encoded tuple: `(address _rewardProgram, string _title)`, where `_rewardProgram` - new reward program address to add, `_title` - title of new reward program. To successfully create EVMScript next requirements must be met:
405405

406406
- `_creator` must be equal to `trustedCaller` address
407407
- `_rewardProgram` address hasn't been added in `RewardProgramsRegistry` earlier.
408408

409-
#### function decodeEVMScriptCallData(bytes \_evmScriptCallData) external returns (address \_rewardProgram)
409+
#### function decodeEVMScriptCallData(bytes \_evmScriptCallData) external returns (address \_rewardProgram, string memory _title)
410410

411-
Decodes `_evmScriptCallData` into tuple `(address _rewardProgram)`.
411+
Decodes `_evmScriptCallData` into tuple `(address _rewardProgram, string _title)`.
412412

413413
## RemoveRewardProgram
414414

@@ -435,14 +435,26 @@ Stores list of addresses with reward programs. TopUpRewardsProgram EVMScript fac
435435

436436
### Methods
437437

438-
#### addRewardProgram(address \_rewardProgram) external
438+
#### addRewardProgram(address \_rewardProgram, string memory _title) external
439439

440440
Adds reward program address to RewardProgramsRegistry, if it hasn't been added yet, throws `"REWARD_PROGRAM_ALREADY_ADDED"` in other cases. Might be called only by EVMScriptExecutor contract.
441441

442+
Events:
443+
444+
```solidity=
445+
event RewardProgramAdded(address indexed _rewardProgram, string _title)
446+
```
447+
442448
#### removeRewardProgram(address \_rewardProgram) external
443449

444450
Removes reward program address from RewardProgramsRegistry. Throws `"REWARD_PROGRAM_NOT_FOUND"` if program address misses from the array. Might be called only by EVMScriptExecutor contract.
445451

452+
Events:
453+
454+
```solidity=
455+
event RewardProgramRemoved(address indexed _rewardProgram)
456+
```
457+
446458
#### isRewardProgram(address \_rewardProgram) external view (returns bool)
447459

448460
Shows if address is whitelisted in RewardProgramsRegistry.

0 commit comments

Comments
 (0)