Skip to content

Commit

Permalink
docs: remove bad spacing in some docs examples (#2036)
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Apr 29, 2024
1 parent cc160cd commit 53b3eb7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docs/userguides/accounts.md
Expand Up @@ -292,7 +292,7 @@ class Mail(EIP712Message):
sender: Person
receiver: Person

alice = Person(name="Alice", wallet="0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826")
alice = Person(name="Alice", wallet="0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826")
bob = Person("Bob", "0xB0B0b0b0b0b0B000000000000000000000000000")
message = Mail(sender=alice, receiver=bob)

Expand Down
5 changes: 2 additions & 3 deletions docs/userguides/clis.md
Expand Up @@ -207,13 +207,12 @@ APPLICATION_PREFIX = "<FOO_BAR>"
@existing_alias_argument(account_type=KeyfileAccount)
def cli_0(alias):
pass

@click.command()
@existing_alias_argument(account_type=lambda a: a.alias.startswith(APPLICATION_PREFIX))
def cli_1(alias):
pass



# Select from the given accounts directly.
my_accounts = [accounts.load("me"), accounts.load("me2")]
selected_account = get_user_selected_account(account_type=my_accounts)
Expand Down
8 changes: 3 additions & 5 deletions docs/userguides/contracts.md
Expand Up @@ -426,24 +426,22 @@ Here is an example of how you can use the multicall module:
import ape
from ape_ethereum import multicall


ADDRESSES = ("0xF4b8A02D4e8D76070bD7092B54D2cBbe90fa72e9", "0x80067013d7F7aF4e86b3890489AcAFe79F31a4Cb")
POOLS = [ape.project.IPool.at(a) for a in ADDRESSES]


def main():
# Use multi-call.
call = multicall.Call()
for pool in POOLS:
call.add(pool.getReserves)

print(list(call()))

# Use multi-transaction.
tx = multicall.Transaction()
for pool in POOLS:
tx.add(pool.ApplyDiscount, 123)

acct = ape.accounts.load("signer")
for result in tx(sender=acct):
print(result)
Expand Down

0 comments on commit 53b3eb7

Please sign in to comment.