Skip to content

Commit

Permalink
fix pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbertoCentonze committed Nov 26, 2024
1 parent afc828a commit 6a17d0e
Show file tree
Hide file tree
Showing 60 changed files with 98 additions and 105 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ci
name: ci
on:
push:

Expand Down
2 changes: 1 addition & 1 deletion docs/api/common_classes/_BaseEVMContract.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ The `_BaseEVMContract` class provides the base functionality for EVM contracts.
>>> contract = deployer.deploy()
>>> type(contract)
<class 'boa.vyper.contract.VyperContract'>
```
```
2 changes: 1 addition & 1 deletion docs/api/common_classes/_BaseVyperContract.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ The `_BaseVyperContract` class extends `_BaseEVMContract` and provides additiona
>>> contract = deployer.deploy()
>>> type(contract)
<class 'boa.vyper.contract.VyperContract'>
```
```
2 changes: 1 addition & 1 deletion docs/api/common_classes/_constants.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ Provides access to the constants defined in the Vyper contract.
>>> contract = deployer.deploy()
>>> contract._constants.x
123
```
```
2 changes: 1 addition & 1 deletion docs/api/common_classes/abi.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ Returns the ABI (Application Binary Interface) of the Vyper contract.
>>> contract_abi = contract.abi
>>> type(contract_abi)
<class 'dict'>
```
```
2 changes: 1 addition & 1 deletion docs/api/common_classes/call_trace.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ Returns the call trace of the computation.
>>> contract.main()
>>> contract.call_trace()
<TraceFrame ...>
```
```
2 changes: 1 addition & 1 deletion docs/api/common_classes/handle_error.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
TODO
TODO
2 changes: 1 addition & 1 deletion docs/api/common_classes/stack_trace.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ Returns the stack trace of the computation.
... pass
>>> contract.stack_trace(contract._computation)
<StackTrace ...>
```
```
1 change: 0 additions & 1 deletion docs/api/env/browser_env.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
Inherits: [`NetworkEnv`](network_env.md)

<!-- TODO: Document BrowserEnv API -->

2 changes: 1 addition & 1 deletion docs/api/env/env.md
Original file line number Diff line number Diff line change
Expand Up @@ -653,4 +653,4 @@ TODO

**Note**

This is useful when you want to start a fresh gas measurement.
This is useful when you want to start a fresh gas measurement.
2 changes: 1 addition & 1 deletion docs/api/exceptions/boa_error.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

#### Description

Raised when an error occurs during contract execution.
Raised when an error occurs during contract execution.
26 changes: 13 additions & 13 deletions docs/api/load_contracts.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Boa offers multiple ways to load contracts from various sources. Either from [lo

**Description**

The `load` function is designed to compile a Vyper contract from a file located on disk. It provides a straightforward way to deploy contracts by reading the source code from the specified file path.
The `load` function is designed to compile a Vyper contract from a file located on disk. It provides a straightforward way to deploy contracts by reading the source code from the specified file path.

---

Expand All @@ -34,8 +34,8 @@ Boa offers multiple ways to load contracts from various sources. Either from [lo

**Returns**

A [`VyperContract`](vyper_contract/overview.md), [`VyperBlueprint`](vyper_blueprint/overview.md), or [`ABIContract`](abi_contract/overview.md) instance.
A [`VyperContract`](vyper_contract/overview.md), [`VyperBlueprint`](vyper_blueprint/overview.md), or [`ABIContract`](abi_contract/overview.md) instance.

If a legacy Vyper version is detected, an `ABIContract` may be returned due to VVM usage. See [Legacy Vyper Contracts](../explain/vvm_contracts.md) for more details.

---
Expand All @@ -52,7 +52,7 @@ Boa offers multiple ways to load contracts from various sources. Either from [lo

**Description**

The `load_abi` function allows you to load a contract's ABI from a JSON file.
The `load_abi` function allows you to load a contract's ABI from a JSON file.

---

Expand Down Expand Up @@ -82,7 +82,7 @@ Boa offers multiple ways to load contracts from various sources. Either from [lo

**Description**

The `load_partial` function is used to compile a Vyper contract from a file and return a deployer instance.
The `load_partial` function is used to compile a Vyper contract from a file and return a deployer instance.

---

Expand All @@ -96,8 +96,8 @@ Boa offers multiple ways to load contracts from various sources. Either from [lo

**Returns**

A [`VyperDeployer`](vyper_deployer/overview.md) or [`VVMDeployer`](vvm_deployer/overview.md) instance.
A [`VyperDeployer`](vyper_deployer/overview.md) or [`VVMDeployer`](vvm_deployer/overview.md) instance.

If a legacy Vyper version is detected, a `VVMDeployer` may be returned due to VVM usage. See [Legacy Vyper Contracts](../explain/vvm_contracts.md) for more details.

---
Expand All @@ -114,7 +114,7 @@ Boa offers multiple ways to load contracts from various sources. Either from [lo

**Description**

The `load_vyi` function is designed to load a Vyper interface from a `.vyi` file.
The `load_vyi` function is designed to load a Vyper interface from a `.vyi` file.

---

Expand Down Expand Up @@ -167,8 +167,8 @@ Boa offers multiple ways to load contracts from various sources. Either from [lo

**Returns**

A [`VyperContract`](vyper_contract/overview.md), [`VyperBlueprint`](vyper_blueprint/overview.md), or [`ABIContract`](abi_contract/overview.md) instance.
A [`VyperContract`](vyper_contract/overview.md), [`VyperBlueprint`](vyper_blueprint/overview.md), or [`ABIContract`](abi_contract/overview.md) instance.

If a legacy Vyper version is detected, an `ABIContract` may be returned due to VVM usage. See [Legacy Vyper Contracts](../explain/vvm_contracts.md) for more details.

---
Expand All @@ -185,7 +185,7 @@ Boa offers multiple ways to load contracts from various sources. Either from [lo

**Description**

The `loads_abi` function creates an `ABIContract` from a JSON string representing the contract's ABI.
The `loads_abi` function creates an `ABIContract` from a JSON string representing the contract's ABI.

---

Expand Down Expand Up @@ -228,8 +228,8 @@ Boa offers multiple ways to load contracts from various sources. Either from [lo

**Returns**

A [`VyperDeployer`](vyper_deployer/overview.md) or [`VVMDeployer`](vvm_deployer/overview.md) instance.
A [`VyperDeployer`](vyper_deployer/overview.md) or [`VVMDeployer`](vvm_deployer/overview.md) instance.

If a legacy Vyper version is detected, a `VVMDeployer` may be returned due to VVM usage. See [Legacy Vyper Contracts](../explain/vvm_contracts.md) for more details.

---
Expand Down
2 changes: 1 addition & 1 deletion docs/api/pyevm/deregister_precompile.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ Deregister a precompile.

- `address`: The address of a previously registered precompile.
- `force`: Whether to force removal of the precompile at the specified address.
- Raises `ValueError`: If a precompile is not registered at the specified address and the force argument is `False`.
- Raises `ValueError`: If a precompile is not registered at the specified address and the force argument is `False`.
2 changes: 1 addition & 1 deletion docs/api/pyevm/patch_opcode.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ $ python example.py
"0x097dec6ea6b9eb5fc04db59c0d343f0e3b4097a0",
"0x905794c5566184e642ef14fb0e72cf68ff8c79bf"
]
```
```
2 changes: 1 addition & 1 deletion docs/api/pyevm/register_precompile.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ Register a precompile.
>>> boa.register_precompile("0x00000000000000000000000000000000000000ff", log)
>>> boa.eval("raw_call(0x00000000000000000000000000000000000000ff, b'')")
0x0000000000000000000000000000000000000069
```
```
2 changes: 1 addition & 1 deletion docs/api/vvm_deployer/__call__.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ Allows the instance to be called like a function to deploy the contract.
```python
>>> deployer = VVMDeployer(abi, bytecode, filename)
>>> contract = deployer(arg1, arg2)
```
```
2 changes: 1 addition & 1 deletion docs/api/vvm_deployer/__init__.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ Initializes the `VVMDeployer` instance with the given ABI, bytecode, and filenam
>>> bytecode = "0x..." # Bytecode of the contract
>>> filename = "MyContract"
>>> deployer = VVMDeployer(abi, bytecode, filename)
```
```
2 changes: 1 addition & 1 deletion docs/api/vvm_deployer/at.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ Returns a contract instance at a given address.
>>> deployer = VVMDeployer(abi, bytecode, filename)
>>> contract = deployer.deploy()
>>> contract_at_address = deployer.at(contract.address)
```
```
2 changes: 1 addition & 1 deletion docs/api/vvm_deployer/constructor.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ Finds and returns the constructor function from the ABI.
```python
>>> deployer = VVMDeployer(abi, bytecode, filename)
>>> constructor = deployer.constructor
```
```
2 changes: 1 addition & 1 deletion docs/api/vvm_deployer/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ Deploys the contract with optional arguments and environment.
```python
>>> deployer = VVMDeployer(abi, bytecode, filename)
>>> contract = deployer.deploy(arg1, arg2)
```
```
2 changes: 1 addition & 1 deletion docs/api/vvm_deployer/factory.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ Returns a contract factory from the ABI.
```python
>>> deployer = VVMDeployer(abi, bytecode, filename)
>>> factory = deployer.factory
```
```
2 changes: 1 addition & 1 deletion docs/api/vvm_deployer/from_compiler_output.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ Creates an instance of `VVMDeployer` from the compiler output.
... }
>>> filename = "MyContract"
>>> deployer = VVMDeployer.from_compiler_output(compiler_output, filename)
```
```
10 changes: 5 additions & 5 deletions docs/api/vvm_deployer/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@ It includes methods for handling contract deployment, execution, and interaction
### Examples

!!!python

```python
deployer = boa.loads_partial("""
# pragma version 0.3.10

foo: public(uint256)
bar: public(uint256)

@external
def __init__(bar: uint256):
self.foo = 42
self.bar = bar
""")
contract = deployer.deploy()

>>> type(deployer)
<class 'boa.contracts.vvm.vvm_contract.VVMDeployer'>

Expand All @@ -44,4 +44,4 @@ It includes methods for handling contract deployment, execution, and interaction

!!! warning

Titanoboa will automatically read the version pragma in the source code and install the right compiler version via `vvm`
Titanoboa will automatically read the version pragma in the source code and install the right compiler version via `vvm`
2 changes: 1 addition & 1 deletion docs/api/vyper_blueprint/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ TODO mention common classes
>>> blueprint = deployer.deploy_as_blueprint()
>>> type(blueprint)
<class 'boa.vyper.contract.VyperBlueprint'>
```
```
1 change: 0 additions & 1 deletion docs/api/vyper_contract/at.md
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@

2 changes: 1 addition & 1 deletion docs/api/vyper_contract/decode_log.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ Decodes a log entry into an `Event` instance.
>>> log_entry = contract.get_logs()[0]
>>> contract.decode_log(log_entry)
<Event ...>
```
```
2 changes: 1 addition & 1 deletion docs/api/vyper_contract/deployer.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ deployer: VyperDeployer

### Description

The `VyperDeployer` instance associated with the contract.
The `VyperDeployer` instance associated with the contract.
2 changes: 1 addition & 1 deletion docs/api/vyper_contract/eval.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ Evaluate a Vyper statement in the context of the contract.
>>> contract.eval("self.value += 1")
>>> contract.value()
1
```
```
2 changes: 1 addition & 1 deletion docs/api/vyper_contract/get_logs.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ Returns the logs generated by the computation.
>>> contract.main()
>>> contract.get_logs()
[<Event ...>]
```
```
2 changes: 1 addition & 1 deletion docs/api/vyper_contract/inject_function.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ Injects a function into the contract without affecting the contract's source cod
... """)
>>> contract.internal.injected_function()
42
```
```
2 changes: 1 addition & 1 deletion docs/api/vyper_contract/marshal_to_python.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@ Converts the result of a computation to a Python object based on the Vyper type.
>>> result = contract.main()
>>> contract.marshal_to_python(result, uint256)
42
```
```
2 changes: 1 addition & 1 deletion docs/api/vyper_contract/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ TODO mention common classes
<class 'boa.vyper.contract.VyperInternalFunction'>
>>> contract.internal.foo()
123
```
```
2 changes: 1 addition & 1 deletion docs/api/vyper_contract/stack_trace.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ Returns the stack trace of the computation.
... pass
>>> contract.stack_trace()
<StackTrace ...>
```
```
2 changes: 1 addition & 1 deletion docs/api/vyper_contract/trace_source.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ Returns the source of the trace for the computation.
... pass
>>> contract.trace_source(contract._computation)
<VyperTraceSource ...>
```
```
2 changes: 1 addition & 1 deletion docs/api/vyper_deployer/__call__.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ Deploys the Vyper contract and returns a `VyperContract` instance. This method i
>>> contract = deployer()
>>> type(contract)
<class 'boa.vyper.contract.VyperContract'>
```
```
2 changes: 1 addition & 1 deletion docs/api/vyper_deployer/_constants.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ Provides access to the constants defined in the Vyper contract.
>>> deployer = boa.loads_partial(src)
>>> deployer._constants.MY_CONSTANT
123
```
```
2 changes: 1 addition & 1 deletion docs/api/vyper_deployer/at.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ Returns a `VyperContract` instance at a given address.
>>> contract_at_address = deployer.at(contract.address)
>>> type(contract_at_address)
<class 'boa.vyper.contract.VyperContract'>
```
```
2 changes: 1 addition & 1 deletion docs/api/vyper_deployer/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ Deploys the Vyper contract and returns a `VyperContract` instance.
>>> contract = deployer.deploy()
>>> type(contract)
<class 'boa.vyper.contract.VyperContract'>
```
```
2 changes: 1 addition & 1 deletion docs/api/vyper_deployer/deploy_as_blueprint.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ Deploys the Vyper contract as a blueprint and returns a `VyperBlueprint` instanc
>>> blueprint = deployer.deploy_as_blueprint()
>>> type(blueprint)
<class 'boa.vyper.contract.VyperBlueprint'>
```
```
2 changes: 1 addition & 1 deletion docs/api/vyper_deployer/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ The `VyperDeployer` class is responsible for deploying Vyper contracts. It handl
>>> contract = deployer.deploy()
>>> type(contract)
<class 'boa.vyper.contract.VyperContract'>
```
```
2 changes: 1 addition & 1 deletion docs/api/vyper_deployer/standard_json.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ Generates a standard JSON representation of the Vyper contract.
>>> deployer = boa.loads_partial(src, "Foo")
>>> deployer.standard_json
{'contracts': {'Foo': {'abi': [...], 'bin': '...'}}}
```
```
2 changes: 1 addition & 1 deletion docs/api/vyper_deployer/stomp.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ Replaces the bytecode at a given address with the contract's runtime bytecode.
>>> deployer = boa.loads_partial(src, "Foo")
>>> contract = deployer.deploy()
>>> contract.stomp(contract.address)
```
```
2 changes: 1 addition & 1 deletion docs/api/vyper_internal_function/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ Internal contract functions are exposed by wrapping them with a dummy external c
>>> contract = boa.loads(src)
>>> contract.internal.main(68)
69
```
```
Loading

0 comments on commit 6a17d0e

Please sign in to comment.