neo-go icon indicating copy to clipboard operation
neo-go copied to clipboard

can we make comply.checkMethod public?

Open ixje opened this issue 2 years ago • 2 comments

I have a use-case in which I want to check if a contract has a subset of the required NEP-17 methods. This function seems to do 99% of what I'm looking for but 1. it's not exposed, could this be exposed? https://github.com/nspcc-dev/neo-go/blob/4e6ce9c3e666dd3979f31287dfdffc7a773544c7/pkg/smartcontract/manifest/standard/comply.go#L107-L108

2. could we add an option to skip safe checking? I have a case where the contract wrongly specifies the safe flag but it still functions correctly. In a great world this contract would have been rejected during deploy, but we all know why that isn't there so I'm hoping to work around it without too much code duplication.

ixje avatar Jan 06 '23 10:01 ixje

  1. Probably, but maybe what you really want is a flag for ComplyABI?
  2. I love links, so neo-project/neo#1883, yeah. But this flag feels like a bad idea to me. What's the problem there? Something that should be safe is not marked as safe?

roman-khimov avatar Jan 08 '23 13:01 roman-khimov

  1. For now that would cover my use-case as I think I can create my own standard to cherry pick what methods I care about.
  2. Exactly. Something not marked safe that should be e.g nep-17 “symbol()”

On 8 Jan 2023, at 14:50, Roman Khimov @.***> wrote:

Probably, but maybe what you really want is a flag for ComplyABI? I love links, so neo-project/neo#1883, yeah. But this flag feels like a bad idea to me. What's the problem there? Something that should be safe is not marked as safe?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

ixje avatar Jan 08 '23 19:01 ixje