getRouter func should be virtual
Motivation
CCIPReceiver Contract is an abstract contract, the getRouter function should be virtual.
Solution
function getRouter() public; => function getRouter() public virtual;
Hi magiconch, can you explain the use-case so I better understand your proposed change?
yep. This is my case. i can't override getRouter function because the CCIPReceiver Contract is an abstract contract
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract Ballot is CCIPReceiver {
address public newRouter = address(0);
constructor(address router) CCIPReceiver(router) {
}
function getRouter() public override view returns (address) {
return newRouter;
}
}
Hi @makramkd , any feedback about this pr?
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.
fixed in https://github.com/smartcontractkit/ccip/pull/926