Python wrapper and version management tool for the solc Solidity compiler.
77
Evaluation — 77%
↑ 1.05xAgent success when using this tile
Build a helper that transforms compiled contract bytecode containing unresolved library placeholders into fully linked bytecode ready for deployment.
__MathLib______________________________) within a hex string using the provided 20-byte addresses and returns a linked 0x-prefixed bytecode string. @test0x), raise a clear error that lists the problematic library identifiers. @testcontracts/Math.sol:MathLib) by resolving each fully qualified name to the correct address so that no placeholders remain. @test@generates
from typing import Dict, Optional
def link_bytecode(
unlinked_bytecode: str,
libraries: Dict[str, str],
compiler_version: Optional[str] = None,
compiler_binary: Optional[str] = None,
) -> str:
"""
Link placeholders in compiled bytecode to the provided library addresses.
Returns a 0x-prefixed hex string or raises an error when required addresses are missing or malformed.
"""Provides Solidity compiler management and bytecode linking utilities for replacing library placeholders in compiled contracts.
Install with Tessl CLI
npx tessl i tessl/pypi-py-solc-xevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10