diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e729148a..4b128ab2 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,4 +1,4 @@ -name: ci +name: ci on: push: diff --git a/docs/api/common_classes/_BaseEVMContract.md b/docs/api/common_classes/_BaseEVMContract.md index 8b25f1e5..1389356c 100644 --- a/docs/api/common_classes/_BaseEVMContract.md +++ b/docs/api/common_classes/_BaseEVMContract.md @@ -27,4 +27,4 @@ The `_BaseEVMContract` class provides the base functionality for EVM contracts. >>> contract = deployer.deploy() >>> type(contract) -``` \ No newline at end of file +``` diff --git a/docs/api/common_classes/_BaseVyperContract.md b/docs/api/common_classes/_BaseVyperContract.md index c6e1eeaa..c5a81ebe 100644 --- a/docs/api/common_classes/_BaseVyperContract.md +++ b/docs/api/common_classes/_BaseVyperContract.md @@ -23,4 +23,4 @@ The `_BaseVyperContract` class extends `_BaseEVMContract` and provides additiona >>> contract = deployer.deploy() >>> type(contract) -``` \ No newline at end of file +``` diff --git a/docs/api/common_classes/_constants.md b/docs/api/common_classes/_constants.md index cfb3d51c..33431ec1 100644 --- a/docs/api/common_classes/_constants.md +++ b/docs/api/common_classes/_constants.md @@ -24,4 +24,4 @@ Provides access to the constants defined in the Vyper contract. >>> contract = deployer.deploy() >>> contract._constants.x 123 -``` \ No newline at end of file +``` diff --git a/docs/api/common_classes/abi.md b/docs/api/common_classes/abi.md index 143ccb7c..c2e0210e 100644 --- a/docs/api/common_classes/abi.md +++ b/docs/api/common_classes/abi.md @@ -27,4 +27,4 @@ Returns the ABI (Application Binary Interface) of the Vyper contract. >>> contract_abi = contract.abi >>> type(contract_abi) -``` \ No newline at end of file +``` diff --git a/docs/api/common_classes/call_trace.md b/docs/api/common_classes/call_trace.md index d6cc5509..7aa3d2f6 100644 --- a/docs/api/common_classes/call_trace.md +++ b/docs/api/common_classes/call_trace.md @@ -30,4 +30,4 @@ Returns the call trace of the computation. >>> contract.main() >>> contract.call_trace() - ``` \ No newline at end of file + ``` diff --git a/docs/api/common_classes/handle_error.md b/docs/api/common_classes/handle_error.md index 30404ce4..1333ed77 100644 --- a/docs/api/common_classes/handle_error.md +++ b/docs/api/common_classes/handle_error.md @@ -1 +1 @@ -TODO \ No newline at end of file +TODO diff --git a/docs/api/common_classes/stack_trace.md b/docs/api/common_classes/stack_trace.md index c338c625..bd2075e2 100644 --- a/docs/api/common_classes/stack_trace.md +++ b/docs/api/common_classes/stack_trace.md @@ -30,4 +30,4 @@ Returns the stack trace of the computation. ... pass >>> contract.stack_trace(contract._computation) -``` \ No newline at end of file +``` diff --git a/docs/api/env/browser_env.md b/docs/api/env/browser_env.md index 599f2429..42e47c7b 100644 --- a/docs/api/env/browser_env.md +++ b/docs/api/env/browser_env.md @@ -3,4 +3,3 @@ Inherits: [`NetworkEnv`](network_env.md) - diff --git a/docs/api/env/env.md b/docs/api/env/env.md index 9ffa6321..2f9393c4 100644 --- a/docs/api/env/env.md +++ b/docs/api/env/env.md @@ -653,4 +653,4 @@ TODO **Note** - This is useful when you want to start a fresh gas measurement. \ No newline at end of file + This is useful when you want to start a fresh gas measurement. diff --git a/docs/api/exceptions/boa_error.md b/docs/api/exceptions/boa_error.md index 8dfa4039..69fca18a 100644 --- a/docs/api/exceptions/boa_error.md +++ b/docs/api/exceptions/boa_error.md @@ -2,4 +2,4 @@ #### Description -Raised when an error occurs during contract execution. \ No newline at end of file +Raised when an error occurs during contract execution. diff --git a/docs/api/load_contracts.md b/docs/api/load_contracts.md index 6559585f..e0ff2b4a 100644 --- a/docs/api/load_contracts.md +++ b/docs/api/load_contracts.md @@ -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. --- @@ -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. --- @@ -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. --- @@ -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. --- @@ -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. --- @@ -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. --- @@ -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. --- @@ -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. --- @@ -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. --- diff --git a/docs/api/pyevm/deregister_precompile.md b/docs/api/pyevm/deregister_precompile.md index a8c137fe..cb6e3962 100644 --- a/docs/api/pyevm/deregister_precompile.md +++ b/docs/api/pyevm/deregister_precompile.md @@ -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`. \ No newline at end of file +- Raises `ValueError`: If a precompile is not registered at the specified address and the force argument is `False`. diff --git a/docs/api/pyevm/patch_opcode.md b/docs/api/pyevm/patch_opcode.md index 4e7ee079..55fd29f8 100644 --- a/docs/api/pyevm/patch_opcode.md +++ b/docs/api/pyevm/patch_opcode.md @@ -68,4 +68,4 @@ $ python example.py "0x097dec6ea6b9eb5fc04db59c0d343f0e3b4097a0", "0x905794c5566184e642ef14fb0e72cf68ff8c79bf" ] -``` \ No newline at end of file +``` diff --git a/docs/api/pyevm/register_precompile.md b/docs/api/pyevm/register_precompile.md index 6b7ff7df..da377df1 100644 --- a/docs/api/pyevm/register_precompile.md +++ b/docs/api/pyevm/register_precompile.md @@ -23,4 +23,4 @@ Register a precompile. >>> boa.register_precompile("0x00000000000000000000000000000000000000ff", log) >>> boa.eval("raw_call(0x00000000000000000000000000000000000000ff, b'')") 0x0000000000000000000000000000000000000069 -``` \ No newline at end of file +``` diff --git a/docs/api/vvm_deployer/__call__.md b/docs/api/vvm_deployer/__call__.md index 12261106..0b676ddc 100644 --- a/docs/api/vvm_deployer/__call__.md +++ b/docs/api/vvm_deployer/__call__.md @@ -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) -``` \ No newline at end of file +``` diff --git a/docs/api/vvm_deployer/__init__.md b/docs/api/vvm_deployer/__init__.md index 8382c18d..1758b687 100644 --- a/docs/api/vvm_deployer/__init__.md +++ b/docs/api/vvm_deployer/__init__.md @@ -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) -``` \ No newline at end of file +``` diff --git a/docs/api/vvm_deployer/at.md b/docs/api/vvm_deployer/at.md index c0430ad3..74ee120d 100644 --- a/docs/api/vvm_deployer/at.md +++ b/docs/api/vvm_deployer/at.md @@ -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) -``` \ No newline at end of file +``` diff --git a/docs/api/vvm_deployer/constructor.md b/docs/api/vvm_deployer/constructor.md index e3705612..88bb6565 100644 --- a/docs/api/vvm_deployer/constructor.md +++ b/docs/api/vvm_deployer/constructor.md @@ -16,4 +16,4 @@ Finds and returns the constructor function from the ABI. ```python >>> deployer = VVMDeployer(abi, bytecode, filename) >>> constructor = deployer.constructor -``` \ No newline at end of file +``` diff --git a/docs/api/vvm_deployer/deploy.md b/docs/api/vvm_deployer/deploy.md index 9b286ffd..d4c4279c 100644 --- a/docs/api/vvm_deployer/deploy.md +++ b/docs/api/vvm_deployer/deploy.md @@ -18,4 +18,4 @@ Deploys the contract with optional arguments and environment. ```python >>> deployer = VVMDeployer(abi, bytecode, filename) >>> contract = deployer.deploy(arg1, arg2) -``` \ No newline at end of file +``` diff --git a/docs/api/vvm_deployer/factory.md b/docs/api/vvm_deployer/factory.md index 315ac7a0..6951fccc 100644 --- a/docs/api/vvm_deployer/factory.md +++ b/docs/api/vvm_deployer/factory.md @@ -16,4 +16,4 @@ Returns a contract factory from the ABI. ```python >>> deployer = VVMDeployer(abi, bytecode, filename) >>> factory = deployer.factory -``` \ No newline at end of file +``` diff --git a/docs/api/vvm_deployer/from_compiler_output.md b/docs/api/vvm_deployer/from_compiler_output.md index 651e8134..05ccd017 100644 --- a/docs/api/vvm_deployer/from_compiler_output.md +++ b/docs/api/vvm_deployer/from_compiler_output.md @@ -23,4 +23,4 @@ Creates an instance of `VVMDeployer` from the compiler output. ... } >>> filename = "MyContract" >>> deployer = VVMDeployer.from_compiler_output(compiler_output, filename) -``` \ No newline at end of file +``` diff --git a/docs/api/vvm_deployer/overview.md b/docs/api/vvm_deployer/overview.md index aa2ca673..6cd061d4 100644 --- a/docs/api/vvm_deployer/overview.md +++ b/docs/api/vvm_deployer/overview.md @@ -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) @@ -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` \ No newline at end of file + Titanoboa will automatically read the version pragma in the source code and install the right compiler version via `vvm` diff --git a/docs/api/vyper_blueprint/overview.md b/docs/api/vyper_blueprint/overview.md index b531dcde..bbebedbd 100644 --- a/docs/api/vyper_blueprint/overview.md +++ b/docs/api/vyper_blueprint/overview.md @@ -22,4 +22,4 @@ TODO mention common classes >>> blueprint = deployer.deploy_as_blueprint() >>> type(blueprint) -``` \ No newline at end of file +``` diff --git a/docs/api/vyper_contract/at.md b/docs/api/vyper_contract/at.md index 0519ecba..e69de29b 100644 --- a/docs/api/vyper_contract/at.md +++ b/docs/api/vyper_contract/at.md @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/docs/api/vyper_contract/decode_log.md b/docs/api/vyper_contract/decode_log.md index f39f35b0..d42780e5 100644 --- a/docs/api/vyper_contract/decode_log.md +++ b/docs/api/vyper_contract/decode_log.md @@ -28,4 +28,4 @@ Decodes a log entry into an `Event` instance. >>> log_entry = contract.get_logs()[0] >>> contract.decode_log(log_entry) -``` \ No newline at end of file +``` diff --git a/docs/api/vyper_contract/deployer.md b/docs/api/vyper_contract/deployer.md index eca571e2..b1397646 100644 --- a/docs/api/vyper_contract/deployer.md +++ b/docs/api/vyper_contract/deployer.md @@ -9,4 +9,4 @@ deployer: VyperDeployer ### Description -The `VyperDeployer` instance associated with the contract. \ No newline at end of file +The `VyperDeployer` instance associated with the contract. diff --git a/docs/api/vyper_contract/eval.md b/docs/api/vyper_contract/eval.md index 72ad8f35..bd5aa0e2 100644 --- a/docs/api/vyper_contract/eval.md +++ b/docs/api/vyper_contract/eval.md @@ -27,4 +27,4 @@ Evaluate a Vyper statement in the context of the contract. >>> contract.eval("self.value += 1") >>> contract.value() 1 -``` \ No newline at end of file +``` diff --git a/docs/api/vyper_contract/get_logs.md b/docs/api/vyper_contract/get_logs.md index 95f0bcde..b5c4df99 100644 --- a/docs/api/vyper_contract/get_logs.md +++ b/docs/api/vyper_contract/get_logs.md @@ -28,4 +28,4 @@ Returns the logs generated by the computation. >>> contract.main() >>> contract.get_logs() [] -``` \ No newline at end of file +``` diff --git a/docs/api/vyper_contract/inject_function.md b/docs/api/vyper_contract/inject_function.md index c90f7974..544c760a 100644 --- a/docs/api/vyper_contract/inject_function.md +++ b/docs/api/vyper_contract/inject_function.md @@ -32,4 +32,4 @@ Injects a function into the contract without affecting the contract's source cod ... """) >>> contract.internal.injected_function() 42 -``` \ No newline at end of file +``` diff --git a/docs/api/vyper_contract/marshal_to_python.md b/docs/api/vyper_contract/marshal_to_python.md index 16c84d6b..32a3fb60 100644 --- a/docs/api/vyper_contract/marshal_to_python.md +++ b/docs/api/vyper_contract/marshal_to_python.md @@ -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 -``` \ No newline at end of file +``` diff --git a/docs/api/vyper_contract/overview.md b/docs/api/vyper_contract/overview.md index ac03babb..0f2932fb 100644 --- a/docs/api/vyper_contract/overview.md +++ b/docs/api/vyper_contract/overview.md @@ -39,4 +39,4 @@ TODO mention common classes >>> contract.internal.foo() 123 -``` \ No newline at end of file +``` diff --git a/docs/api/vyper_contract/stack_trace.md b/docs/api/vyper_contract/stack_trace.md index 4059c68c..664040d4 100644 --- a/docs/api/vyper_contract/stack_trace.md +++ b/docs/api/vyper_contract/stack_trace.md @@ -30,4 +30,4 @@ Returns the stack trace of the computation. ... pass >>> contract.stack_trace() -``` \ No newline at end of file +``` diff --git a/docs/api/vyper_contract/trace_source.md b/docs/api/vyper_contract/trace_source.md index f90c9835..1b73b3d8 100644 --- a/docs/api/vyper_contract/trace_source.md +++ b/docs/api/vyper_contract/trace_source.md @@ -30,4 +30,4 @@ Returns the source of the trace for the computation. ... pass >>> contract.trace_source(contract._computation) -``` \ No newline at end of file +``` diff --git a/docs/api/vyper_deployer/__call__.md b/docs/api/vyper_deployer/__call__.md index b1702afd..65cff5a6 100644 --- a/docs/api/vyper_deployer/__call__.md +++ b/docs/api/vyper_deployer/__call__.md @@ -27,4 +27,4 @@ Deploys the Vyper contract and returns a `VyperContract` instance. This method i >>> contract = deployer() >>> type(contract) -``` \ No newline at end of file +``` diff --git a/docs/api/vyper_deployer/_constants.md b/docs/api/vyper_deployer/_constants.md index c2c857b1..af221d67 100644 --- a/docs/api/vyper_deployer/_constants.md +++ b/docs/api/vyper_deployer/_constants.md @@ -23,4 +23,4 @@ Provides access to the constants defined in the Vyper contract. >>> deployer = boa.loads_partial(src) >>> deployer._constants.MY_CONSTANT 123 -``` \ No newline at end of file +``` diff --git a/docs/api/vyper_deployer/at.md b/docs/api/vyper_deployer/at.md index 973560da..ce90ffae 100644 --- a/docs/api/vyper_deployer/at.md +++ b/docs/api/vyper_deployer/at.md @@ -27,4 +27,4 @@ Returns a `VyperContract` instance at a given address. >>> contract_at_address = deployer.at(contract.address) >>> type(contract_at_address) -``` \ No newline at end of file +``` diff --git a/docs/api/vyper_deployer/deploy.md b/docs/api/vyper_deployer/deploy.md index 084112f4..b7580be3 100644 --- a/docs/api/vyper_deployer/deploy.md +++ b/docs/api/vyper_deployer/deploy.md @@ -27,4 +27,4 @@ Deploys the Vyper contract and returns a `VyperContract` instance. >>> contract = deployer.deploy() >>> type(contract) -``` \ No newline at end of file +``` diff --git a/docs/api/vyper_deployer/deploy_as_blueprint.md b/docs/api/vyper_deployer/deploy_as_blueprint.md index 6cfa33df..b503a7b9 100644 --- a/docs/api/vyper_deployer/deploy_as_blueprint.md +++ b/docs/api/vyper_deployer/deploy_as_blueprint.md @@ -27,4 +27,4 @@ Deploys the Vyper contract as a blueprint and returns a `VyperBlueprint` instanc >>> blueprint = deployer.deploy_as_blueprint() >>> type(blueprint) -``` \ No newline at end of file +``` diff --git a/docs/api/vyper_deployer/overview.md b/docs/api/vyper_deployer/overview.md index 9602d4aa..836e1a22 100644 --- a/docs/api/vyper_deployer/overview.md +++ b/docs/api/vyper_deployer/overview.md @@ -30,4 +30,4 @@ The `VyperDeployer` class is responsible for deploying Vyper contracts. It handl >>> contract = deployer.deploy() >>> type(contract) -``` \ No newline at end of file +``` diff --git a/docs/api/vyper_deployer/standard_json.md b/docs/api/vyper_deployer/standard_json.md index 0626e870..4f8dc3cd 100644 --- a/docs/api/vyper_deployer/standard_json.md +++ b/docs/api/vyper_deployer/standard_json.md @@ -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': '...'}}} -``` \ No newline at end of file +``` diff --git a/docs/api/vyper_deployer/stomp.md b/docs/api/vyper_deployer/stomp.md index e7420f7e..e26cb8b6 100644 --- a/docs/api/vyper_deployer/stomp.md +++ b/docs/api/vyper_deployer/stomp.md @@ -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) -``` \ No newline at end of file +``` diff --git a/docs/api/vyper_internal_function/overview.md b/docs/api/vyper_internal_function/overview.md index 42abee0c..3aaea1a8 100644 --- a/docs/api/vyper_internal_function/overview.md +++ b/docs/api/vyper_internal_function/overview.md @@ -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 -``` \ No newline at end of file +``` diff --git a/docs/assets/images/moccasin-symbol-col.svg b/docs/assets/images/moccasin-symbol-col.svg index 4f083b63..ceac63c1 100644 --- a/docs/assets/images/moccasin-symbol-col.svg +++ b/docs/assets/images/moccasin-symbol-col.svg @@ -1,3 +1,3 @@ - \ No newline at end of file + diff --git a/docs/assets/images/titanoboa-symbol-col.svg b/docs/assets/images/titanoboa-symbol-col.svg index 4c73f8ca..08934185 100644 --- a/docs/assets/images/titanoboa-symbol-col.svg +++ b/docs/assets/images/titanoboa-symbol-col.svg @@ -1,4 +1,4 @@ - \ No newline at end of file + diff --git a/docs/assets/images/vyper-symbol-col.svg b/docs/assets/images/vyper-symbol-col.svg index c7618abf..d2c66607 100644 --- a/docs/assets/images/vyper-symbol-col.svg +++ b/docs/assets/images/vyper-symbol-col.svg @@ -1,4 +1,4 @@ - \ No newline at end of file + diff --git a/docs/assets/javascript/extra.js b/docs/assets/javascript/extra.js index eb9a0e8a..e4a782af 100644 --- a/docs/assets/javascript/extra.js +++ b/docs/assets/javascript/extra.js @@ -1,12 +1,12 @@ document.addEventListener('DOMContentLoaded', function() { const functionAdmonitions = document.querySelectorAll('.admonition.function'); - + functionAdmonitions.forEach(admonition => { const content = admonition.innerHTML; const sourceCodeMatch = content.match(/source-code:\s*(https?:\/\/\S+)/); if (sourceCodeMatch) { const sourceCodeUrl = sourceCodeMatch[1]; - + // Remove the source-code line from the visible content admonition.innerHTML = content.replace(/source-code:\s*https?:\/\/\S+\s*/, ''); @@ -18,7 +18,7 @@ document.addEventListener('DOMContentLoaded', function() { sourceCodeButton.href = sourceCodeUrl; sourceCodeButton.target = '_blank'; sourceCodeButton.classList.add('source-code-button'); - + title.appendChild(sourceCodeButton); } } diff --git a/docs/assets/stylesheets/extra.css b/docs/assets/stylesheets/extra.css index 044b5848..f581f5a7 100644 --- a/docs/assets/stylesheets/extra.css +++ b/docs/assets/stylesheets/extra.css @@ -30,25 +30,25 @@ :root { --md-admonition-icon--vyper: url('data:image/svg+xml;charset=utf-8,'); } - + .md-typeset .admonition.vyper, .md-typeset details.vyper { border-color: #9F4CF2; } - + .md-typeset .vyper > .admonition-title, .md-typeset .vyper > summary { background-color: rgba(159, 76, 242, 0.1); border-color: #9F4CF2; } - + .md-typeset .vyper > .admonition-title::before, .md-typeset .vyper > summary::before { background-color: #9F4CF2; -webkit-mask-image: var(--md-admonition-icon--vyper); mask-image: var(--md-admonition-icon--vyper); } - + /* dark mode */ [data-md-color-scheme="slate"] .md-typeset .vyper > .admonition-title, [data-md-color-scheme="slate"] .md-typeset .vyper > summary { @@ -60,25 +60,25 @@ :root { --md-admonition-icon--titanoboa: url('data:image/svg+xml;charset=utf-8,'); } - + .md-typeset .admonition.titanoboa, .md-typeset details.titanoboa { border-color: #42E21E; } - + .md-typeset .titanoboa > .admonition-title, .md-typeset .titanoboa > summary { background-color: rgba(66, 226, 30, 0.1); border-color: #42E21E; } - + .md-typeset .titanoboa > .admonition-title::before, .md-typeset .titanoboa > summary::before { background-color: #42E21E; -webkit-mask-image: var(--md-admonition-icon--titanoboa); mask-image: var(--md-admonition-icon--titanoboa); } - + /* dark mode */ [data-md-color-scheme="slate"] .md-typeset .titanoboa > .admonition-title, [data-md-color-scheme="slate"] .md-typeset .titanoboa > summary { @@ -90,25 +90,25 @@ :root { --md-admonition-icon--moccasin: url('data:image/svg+xml;charset=utf-8,'); } - + .md-typeset .admonition.moccasin, .md-typeset details.moccasin { border-color: #FF8F08; } - + .md-typeset .moccasin > .admonition-title, .md-typeset .moccasin > summary { background-color: rgb(246, 242, 233); border-color: #FF8F08; } - + .md-typeset .moccasin > .admonition-title::before, .md-typeset .moccasin > summary::before { background-color: #FF8F08; -webkit-mask-image: var(--md-admonition-icon--moccasin); mask-image: var(--md-admonition-icon--moccasin); } - + /* dark mode */ [data-md-color-scheme="slate"] .md-typeset .moccasin > .admonition-title, [data-md-color-scheme="slate"] .md-typeset .moccasin > summary { @@ -234,4 +234,4 @@ .md-typeset .source-code-link:hover { border-bottom: none; text-decoration: none; -} \ No newline at end of file +} diff --git a/docs/explain/caching.md b/docs/explain/caching.md index b0df796b..675ce49e 100644 --- a/docs/explain/caching.md +++ b/docs/explain/caching.md @@ -38,6 +38,6 @@ Alternatively, call [`disable_cache`](../api/cache.md#disable_cache) to disable The utility [`from_etherscan`](../api/load_contracts.md#from_etherscan) fetches the ABI for a contract at a given address from Etherscan and returns an `ABIContract` instance. Given Etherscan is rate-limited, it is recommended to cache the results. -In order to enable this, Titanoboa uses the [requests_cache](https://pypi.org/project/requests-cache/) package. +In order to enable this, Titanoboa uses the [requests_cache](https://pypi.org/project/requests-cache/) package. If the package is available in the environment, all requests to Etherscan will be cached. diff --git a/docs/explain/tx_context.md b/docs/explain/tx_context.md index 3f71880f..2491fd14 100644 --- a/docs/explain/tx_context.md +++ b/docs/explain/tx_context.md @@ -6,4 +6,4 @@ This is an issue that makes it impossible to have accurate gas profiling. TODO explain more -TODO explain gas metering classes here \ No newline at end of file +TODO explain gas metering classes here diff --git a/docs/explain/vvm_contracts.md b/docs/explain/vvm_contracts.md index b60366f5..c52b506a 100644 --- a/docs/explain/vvm_contracts.md +++ b/docs/explain/vvm_contracts.md @@ -11,6 +11,3 @@ However this comes with a performance overhead and some limitations, here's a no - The correct version of the compiler has to be downloaded on the fly, which can be slow on the first run. - Functionalities that are specific to [`VyperContract`](../api/vyper_contract/overview.md) might not be available (i.e. pretty error traces). - Using a legacy Vyper contract is not recommended as older versions contain known bugs and security issues. - - - diff --git a/docs/guides/scripting/ipython_vyper_cells.md b/docs/guides/scripting/ipython_vyper_cells.md index 071f2302..e2579d6b 100644 --- a/docs/guides/scripting/ipython_vyper_cells.md +++ b/docs/guides/scripting/ipython_vyper_cells.md @@ -12,9 +12,9 @@ For a full example, please see [this example Jupyter notebook](https://colab.res !!!python "iPython" ```python In [1]: import boa; boa.env.fork(url="") - + In [2]: %load_ext boa.ipython - + In [3]: %%vyper Test ...: interface HasName: ...: def name() -> String[32]: view @@ -23,9 +23,9 @@ For a full example, please see [this example Jupyter notebook](https://colab.res ...: def get_name_of(addr: HasName) -> String[32]: ...: return addr.name() Out[3]: - + In [4]: c = Test.deploy() - + In [5]: c.get_name_of("0xD533a949740bb3306d119CC777fa900bA034cd52") Out[5]: 'Curve DAO Token' ``` diff --git a/docs/guides/testing/coverage.md b/docs/guides/testing/coverage.md index e9ae6219..0acd1671 100644 --- a/docs/guides/testing/coverage.md +++ b/docs/guides/testing/coverage.md @@ -26,4 +26,3 @@ Finally, `coverage.py` saves coverage data to a file named `.coverage` in the di !!! note Coverage is experimental and there may be odd corner cases! If so, please report them on github or in the `#titanoboa-interpreter` channel of the [Vyper discord](https://discord.gg/6tw7PTM7C2). - diff --git a/docs/guides/testing/fuzzing_strategies.md b/docs/guides/testing/fuzzing_strategies.md index bd387843..fd5a14ff 100644 --- a/docs/guides/testing/fuzzing_strategies.md +++ b/docs/guides/testing/fuzzing_strategies.md @@ -2,4 +2,4 @@ Titanoboa offers custom [hypothesis](https://hypothesis.readthedocs.io/en/latest/quickstart.html) strategies for testing. These can be used to generate EVM-compliant random inputs for tests. -TODO \ No newline at end of file +TODO diff --git a/docs/guides/testing/gas_profiling.md b/docs/guides/testing/gas_profiling.md index 47b4f5df..11468fd8 100644 --- a/docs/guides/testing/gas_profiling.md +++ b/docs/guides/testing/gas_profiling.md @@ -46,4 +46,4 @@ def foo(a: uint256 = 0): If a specific fixture is called in two separate tests, pytest will re-instantiate it. Meaning, if a Contract is deployed in a fixture, calling the fixture on tests in two separate files can lead to two deployments of that Contract, and hence two separate addresses in the profile table. !!! warning - Profiling does not work with pytest-xdist plugin at the moment. \ No newline at end of file + Profiling does not work with pytest-xdist plugin at the moment. diff --git a/docs/guides/testing/private_members.md b/docs/guides/testing/private_members.md index 942a2362..c8277478 100644 --- a/docs/guides/testing/private_members.md +++ b/docs/guides/testing/private_members.md @@ -54,11 +54,11 @@ import foo my_contract = foo(1234) my_contract._immutables.y # returns 1234 -``` +``` ## Accessing internal module variables -Since vyper 0.4.0 it is possible to modularize contracts. +Since vyper 0.4.0 it is possible to modularize contracts. Boa doesn't yet support accessing private module variables. However this can easily be done using [`eval`]() TODO. @@ -86,4 +86,3 @@ foo = boa.load("foo.vy") foo.eval("bar.x") # returns the value of bar.x ``` - diff --git a/docs/template.md b/docs/template.md index 71d42f4f..1fbdb387 100644 --- a/docs/template.md +++ b/docs/template.md @@ -84,4 +84,4 @@ Basic template for documenting functions. The link to the source code needs to b @external def addition(a: uint256, b: uint256) -> uint256: return a + b - ``` \ No newline at end of file + ``` diff --git a/docs/tutorials/install.md b/docs/tutorials/install.md index 963f1e63..6943be10 100644 --- a/docs/tutorials/install.md +++ b/docs/tutorials/install.md @@ -55,4 +55,4 @@ To install the latest development version, use: ```console uv add https://github.com/vyperlang/titanoboa.git --rev - ``` \ No newline at end of file + ``` diff --git a/docs/tutorials/pytest.md b/docs/tutorials/pytest.md index 27e6f12f..560ce587 100644 --- a/docs/tutorials/pytest.md +++ b/docs/tutorials/pytest.md @@ -12,10 +12,10 @@ Let's start with a simple example contract `Example.vy`: ```vyper foo: public(uint256) - + @external def set_foo(foo: uint256): - self.foo = foo + self.foo = foo ``` We want to test that the `set_foo` function works correctly. That is, given an input, it should set the `foo` variable to the input value. @@ -28,7 +28,7 @@ We first create a [pytest fixture](https://docs.pytest.org/en/8.3.x/how-to/fixtu ```python import pytest import boa - + @pytest.fixture def example(): return boa.load("Example.vy") @@ -53,9 +53,9 @@ We can run the test by calling `pytest`: ============================= test session starts ============================== ... collected 1 item - + test_example.py::test_set_foo PASSED - + ============================== 1 passed in 0.01s =============================== ``` diff --git a/mkdocs.yml b/mkdocs.yml index 1bd23ba8..09f429da 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -3,7 +3,7 @@ repo_name: titanoboa repo_url: https://github.com/vyperlang/titanoboa strict: true -theme: +theme: name: material logo: assets/images/titanoboa-symbol-col.svg icon: @@ -21,7 +21,7 @@ theme: markdown_extensions: - admonition - pymdownx.details - - pymdownx.superfences + - pymdownx.superfences - pymdownx.tabbed: alternate_style: true - pymdownx.highlight: @@ -34,8 +34,8 @@ nav: - Installing titanoboa: tutorials/install.md - Writing unit tests with pytest: tutorials/pytest.md - Debugging contracts: tutorials/debug.md - - Guides: - - Scripting: + - Guides: + - Scripting: - Interactive Vyper Notebooks: guides/scripting/ipython_vyper_cells.md - Native Import Syntax: guides/scripting/native_import_syntax.md - Testing: @@ -120,4 +120,4 @@ extra_css: - https://fonts.googleapis.com/css2?family=Inconsolata:wght@400;500;600;700;800;900&display=swap extra_javascript: - - assets/javascript/extra.js \ No newline at end of file + - assets/javascript/extra.js