Skip to content

合约权限问题 #63

@userInner

Description

@userInner

EVM

1.使用bin/xchain-cli 生成合约账号
2.并且使用这个合约账号部署合约
3.使用java-sdk调用一个合约方法,需要使用到部署合约的合约账号,出现了权限不足(这个合约方法做了一个modifier),也就是说我使用account.create()加载的用户,设置的合约账号,是错误的

部署账号: XC4944044147631208@xuper

sdk设置的合约账号:

image

终端返回的错误

2023-07-01T15:11:21.975+08:00 ERROR 16128 --- [nio-8888-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: java.lang.RuntimeException: io.grpc.StatusRuntimeException: UNKNOWN: Err:500-50501-contract invoke failed+error 17 - Error 17: execution reverted: execution reverted] with root cause

io.grpc.StatusRuntimeException: UNKNOWN: Err:500-50501-contract invoke failed+error 17 - Error 17: execution reverted: execution reverted

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions