Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

contracts: New contract events + unconfusions #4685

Merged
merged 9 commits into from
Jan 21, 2020

Conversation

Robbepop
Copy link
Contributor

@Robbepop Robbepop commented Jan 20, 2020

Improves contracts PALLET by

  • adds two new events: Restored and Evicted
    • Event::Evicted(AccountId, bool)
      1. contract: AccountID: The account ID of the evicted contract.
      2. tombstone: bool: True if the evicted contract left behind a tombstone.
    • Event::Restored(AccountId, AccountId, Hash, Balance, bool)
      1. donor: AccountId: The Account ID of the restoring contract
      2. dest: AccountId: The account ID of the restored contract
      3. code_hash: Hash: The code hash of the restored contract
      4. rent_allowance: Balance: The initial rent allowance of the restored contract
      5. success: bool: If restoration was successful
  • rename Event::Contract to Event::ContractExecution so that it is clear that the event was triggered by a contract execution
  • improving error message that have previously be shown to confuse users ("during execution")

@parity-cla-bot
Copy link

It looks like @Robbepop signed our Contributor License Agreement. 👍

Many thanks,

Parity Technologies CLA Bot

@Robbepop Robbepop changed the title Robin contracts unconfuse msg contracts: New contract events + unconfusions Jan 20, 2020
Copy link
Contributor

@thiolliere thiolliere left a comment

Choose a reason for hiding this comment

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

I think it miss some evicted event, otherwise looks good

frame/contracts/src/lib.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@pepyakin pepyakin left a comment

Choose a reason for hiding this comment

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

Looks good!

Would be great if some tests for these events were provided!

Copy link
Contributor

@thiolliere thiolliere left a comment

Choose a reason for hiding this comment

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

Great :-)

@pepyakin pepyakin merged commit 1472014 into master Jan 21, 2020
@pepyakin pepyakin deleted the robin-contracts-unconfuse-msg branch January 21, 2020 12:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants