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

[Feature Request]: Trigger more event for Account change #40

Closed
3 tasks
jolestar opened this issue Jun 20, 2022 · 3 comments · Fixed by #42
Closed
3 tasks

[Feature Request]: Trigger more event for Account change #40

jolestar opened this issue Jun 20, 2022 · 3 comments · Fixed by #42
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@jolestar
Copy link
Member

Feature Request

Describe the Feature Request

Trigger more events for the Account change

  • Account rotate_authentication_key event
  • Account extract_withdraw_capability event
  • Account SignerDelegate event
@jolestar jolestar added enhancement New feature or request help wanted Extra attention is needed labels Jun 20, 2022
@pause125
Copy link
Collaborator

这个需求只在 Account.move 文件中做修改吗?我尝试在 struct Account 中添加了一个 event 对象,但是 integration 测试出现了错误:

thread 'integration-test::account/delegate_account.move' panicked at 'init test adapter failed: Transaction discarded. VMStatus: status UNEXPECTED_ERROR_FROM_KNOWN_MOVE_FUNCTION of type Invariant violation', vm/starcoin-transactional-test-harness/src/lib.rs:793:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'test integration-test::account/delegate_account.move ... FAILED
integration-test::account/basic.move' panicked at 'called `Result::unwrap()` on an `Err` value: PoisonError { .. }', vm/move-package-manager/src/lib.rs:256:43
thread 'integration-test::account/remove_zero_balance.move' panicked at 'called `Result::unwrap()` on an `Err` value: PoisonError { .. }', vm/move-package-manager/src/lib.rs:256:43
test integration-test::account/basic.move ... FAILED

@jolestar
Copy link
Member Author

可能是那个 phantom 的问题?

@pause125 pause125 mentioned this issue Jun 23, 2022
7 tasks
@pause125
Copy link
Collaborator

我提交了一个 Draft PR, 只是简单加了一个 Event。

然后运行 mpm integration-test account,结果:

BUILDING StarcoinFramework

running 9 tests
thread 'integration-test::account/basic.move' panicked at 'init test adapter failed: Transaction discarded. VMStatus: status UNEXPECTED_ERROR_FROM_KNOWN_MOVE_FUNCTION of type Invariant violation', vm/starcoin-transactional-test-harness/src/lib.rs:793:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'test integration-test::account/basic.move ... FAILEDintegration-test::account/delegate_account.move
' panicked at 'called `Result::unwrap()` on an `Err` value: PoisonError { .. }', vm/move-package-manager/src/lib.rs:256:43
thread 'test integration-test::account/delegate_account.move ... FAILEDintegration-test::account/deposit_zero_token.move
' panicked at 'called `Result::unwrap()` on an `Err` value: PoisonError { .. }', vm/move-package-manager/src/lib.rs:256:43
thread 'test integration-test::account/deposit_zero_token.move ... FAILEDintegration-test::account/remove_zero_balance.move
' panicked at 'called `Result::unwrap()` on an `Err` value: PoisonError { .. }', vm/move-package-manager/src/lib.rs:256:43
thread 'test integration-test::account/remove_zero_balance.move ... FAILEDintegration-test::account/txn_prologue_and_epilogue.move
' panicked at 'called `Result::unwrap()` on an `Err` value: PoisonError { .. }', vm/move-package-manager/src/lib.rs:256:43
thread 'test integration-test::account/txn_prologue_and_epilogue.move ... FAILEDintegration-test::account/withdraw_capability.move
' panicked at 'called `Result::unwrap()` on an `Err` value: PoisonError { .. }', vm/move-package-manager/src/lib.rs:256:43
thread 'test integration-test::account/withdraw_capability.move ... FAILEDintegration-test::account/withdraw_zero_token.move
' panicked at 'called `Result::unwrap()` on an `Err` value: PoisonError { .. }', vm/move-package-manager/src/lib.rs:256:43
thread 'integration-test::token/create_account_with_token.movetest integration-test::account/withdraw_zero_token.move ... FAILED' panicked at '
called `Result::unwrap()` on an `Err` value: PoisonError { .. }', vm/move-package-manager/src/lib.rs:256:43
thread 'test integration-test::token/create_account_with_token.move ... FAILEDintegration-test::transaction_scripts/create_account.move
' panicked at 'called `Result::unwrap()` on an `Err` value: PoisonError { .. }', vm/move-package-manager/src/lib.rs:256:43
test integration-test::transaction_scripts/create_account.move ... FAILED

failures:
    integration-test::account/basic.move
    integration-test::account/delegate_account.move
    integration-test::account/deposit_zero_token.move
    integration-test::account/remove_zero_balance.move
    integration-test::account/txn_prologue_and_epilogue.move
    integration-test::account/withdraw_capability.move
    integration-test::account/withdraw_zero_token.move
    integration-test::token/create_account_with_token.move
    integration-test::transaction_scripts/create_account.move

test result: FAILED. 0 passed; 9 failed; 118 filtered out

mpm 版本:1.11.11

pause125 added a commit to pause125/starcoin-framework that referenced this issue Jun 24, 2022
@jolestar jolestar linked a pull request Jun 24, 2022 that will close this issue
7 tasks
jolestar pushed a commit that referenced this issue Jun 24, 2022
* more events

* Trigger more event for Account change. close #40

* add address for events
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants