Skip to content

feat(contract): change taskId to clientId in router #603

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions smartcontracts/contracts/W3bstreamRouter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ contract W3bstreamRouter is IRouter, Initializable {
projectStore = _projectStore;
}

function route(uint256 _projectId, uint256 _proverId, uint256 _taskId, bytes calldata _data) external override {
function route(uint256 _projectId, uint256 _proverId, string memory _clientId, bytes calldata _data) external override {
address _dapp = dapp[_projectId];
require(_dapp != address(0), "no dapp");
IFleetManagement _fm = IFleetManagement(fleetManagement);
Expand All @@ -38,7 +38,7 @@ contract W3bstreamRouter is IRouter, Initializable {
require(_fm.isActiveProver(_proverId), "invalid prover");
require(!IProjectCenter(projectStore).isPaused(_projectId), "invalid project");

try IDapp(_dapp).process(_projectId, _proverId, _taskId, _data) {
try IDapp(_dapp).process(_projectId, _proverId, _clientId, _data) {
_fm.grant(_proverId, 1);
emit DataProcessed(_projectId, _proverId, msg.sender, true, "");
} catch Error(string memory revertReason) {
Expand Down
2 changes: 1 addition & 1 deletion smartcontracts/contracts/interfaces/IDapp.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
pragma solidity ^0.8.19;

interface IDapp {
function process(uint256 _projectId, uint256 _proverId, uint256 _taskId, bytes calldata _data) external;
function process(uint256 _projectId, uint256 _proverId, string memory _clientId, bytes calldata _data) external;
}
2 changes: 1 addition & 1 deletion smartcontracts/contracts/interfaces/IRouter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ interface IRouter {

function bindDapp(uint256 _projectId, address _dapp) external;
function unbindDapp(uint256 _projectId) external;
function route(uint256 _projectId, uint256 _proverId, uint256 _taskId, bytes calldata _data) external;
function route(uint256 _projectId, uint256 _proverId, string memory _clientId, bytes calldata _data) external;
}
Loading