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

Balances contract implementation#23

Closed
tomusdrw wants to merge 5 commits intomasterfrom
td-balances
Closed

Balances contract implementation#23
tomusdrw wants to merge 5 commits intomasterfrom
td-balances

Conversation

@tomusdrw
Copy link
Contributor

  • Add sender to externalities.

})
}

fn contains_sender(sender: Address, addresses: &[Address]) -> bool {
Copy link
Contributor

Choose a reason for hiding this comment

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

it's more idiomatic for these to be free functions in the module

Copy link
Contributor

Choose a reason for hiding this comment

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

also slice has a \.contains method already which is pretty fast.

// Check the caller:
let sender = ext.sender();
if !Self::contains_sender(*sender, &[
if !&[
Copy link
Contributor

Choose a reason for hiding this comment

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

the & may not be necessary

@tomusdrw
Copy link
Contributor Author

Closing, since we won't need balances contract.

@tomusdrw tomusdrw closed this Nov 16, 2017
@tomusdrw tomusdrw deleted the td-balances branch November 16, 2017 12:33
iStrike7 referenced this pull request in gasp-xyz/substrate Aug 3, 2021
default formatter rules enforced, linter errors supressed
liuchengxu pushed a commit to chainx-org/substrate that referenced this pull request Aug 23, 2021
* Trim network module

* Format code and add client import stream

* Fix block import notify network

* Fix validator AUTHORITY roles
gilescope pushed a commit that referenced this pull request Dec 20, 2022
helin6 pushed a commit to boolnetwork/substrate that referenced this pull request Jul 25, 2023
* Define default `node_runtime` compatible Runtime

* rustfmt
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.

2 participants