Skip to content

Sample contract with conditional access control#3

Open
democrazyfi wants to merge 1 commit into
mainfrom
conditional-access-sample
Open

Sample contract with conditional access control#3
democrazyfi wants to merge 1 commit into
mainfrom
conditional-access-sample

Conversation

@democrazyfi

Copy link
Copy Markdown

No description provided.

return _protectedField;
}

function getProtectedFieldFromContract() external view returns (uint256) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@democrazyfi is it possible to overload same function name here, but have two interfaces
function getProtectedField() onlyEOA public view returns (uint256) {
AND
function getProtectedField() external view returns (uint256) {

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you can, as you can overload only if the method args are different (otherwise the compiler won't know which one to pick)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants