Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linking libraries #51

Open
juanfranblanco opened this issue Mar 14, 2023 · 0 comments
Open

Linking libraries #51

juanfranblanco opened this issue Mar 14, 2023 · 0 comments

Comments

@juanfranblanco
Copy link
Member

const string LIBRARY_ADDRESS = "";

            var libFullPath =
                "h:/JuanFran/Documents/Source/Repos/vscode-test-issue/libraryMath.sol";
            var libName = "Math";
            var libraryMapping = ByteCodeLibrary.CreateFromPath(libFullPath, libName, LIBRARY_ADDRESS);
   var contractByteCode =
                "608060405234801561001057600080fd5b5061012e806100206000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c80636039b0bd14602d575b600080fd5b603c603836600460c8565b604e565b60405190815260200160405180910390f35b6040516333b9a16760e11b81526004810182905260009073__$36dbad20f0cfdb63858bfff354836cc543$__9063677342ce90602401602060405180830381865af415801560a0573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019060c2919060e0565b92915050565b60006020828403121560d957600080fd5b5035919050565b60006020828403121560f157600080fd5b505191905056fea264697066735822122041bec357755b8846eded76c806a9e0bceffa6b70e8e4e4e594aaeb5f924d22d364736f6c63430008130033";
            var libraryMappings = new[] { libraryMapping };
            var libraryLinker = new ByteCodeLibraryLinker();
            var contractByteCodeLinked = libraryLinker.LinkByteCode(contractByteCode, libraryMappings);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant