Skip to content
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

Add validation to SendRawTransaction #107

Open
wants to merge 1 commit into
base: feat/evm-access-control
Choose a base branch
from

Conversation

ironbeer
Copy link
Collaborator

No description provided.

}
// Fail if the caller is not allowed to create
if to == nil && !vm.IsAllowedToCreate(state, from) {
return common.Hash{}, vm.ErrUnauthorizedCreate
Copy link
Contributor

@tak1827 tak1827 Nov 26, 2024

Choose a reason for hiding this comment

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

ここで、vmのエラーを返すのは違和感があります。
なので、こんな感じで丁寧にお願いします。

fmt.Errorf("the deployer address is not allowed. please submit application form. from:%s," from)

したの方は、ひとまずこんな感じで。

fmt.Errorf("the calling contract is in denlylist. to: %s", to)

(Denylistは公開して理由を添えた方が良さそう。運用の話し

Copy link
Collaborator Author

@ironbeer ironbeer Nov 26, 2024

Choose a reason for hiding this comment

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

そこは自分も思ったのですが、行っている処理に対してEVMAccessControlというコントラクト名が大げさすぎませんか?用途がEVMに限定されすぎている感じもあります。vmパッケージの外に移動することも考えて良いと思います。

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