Skip to content

Releases: moonstream-to/solface

solface v0.2.3: Fixed bugs with parameter/output locations

22 Nov 14:19
8435be7
Compare
Choose a tag to compare

What's Changed

  • Fix some bugs in function parameter/output location by @zomglings in #11

Full Changelog: v0.2.2...v0.2.3

solface v0.2.2: Codegen output no longer has extraneous whitespaces at the top

22 Nov 13:57
06eccc4
Compare
Choose a tag to compare

solface v0.2.1: solface can now be used as a library

22 Nov 13:44
4dd141b
Compare
Choose a tag to compare

To import it into your go programs:

import (
    solface "github.com/moonstream-to/solface/lib"
)

Full Changelog: v0.2.0...v0.2.1

solface v0.2.0: Human readable type names

22 Nov 13:24
0b3eba0
Compare
Choose a tag to compare

Our goal with solface is for the generated interfaces to be usable directly, immediately, and without modifications.

solface v0.2.0 gets us much closer to that goal than we ever were before by making the names of compound structs human readable (and therefore human usable). It does this by using the internalType fields generated by solc as hints to what the name of the generated types should be.

Full Changelog: v0.1.2...v0.2.0

solface 0.1.2: Documentation

22 Nov 12:05
dc85d16
Compare
Choose a tag to compare

This version of solface introduces documentation for all exposed Go interfaces.

The goal is for solface documentation at https://pkg.go.dev/github.com/moonstream-to/solface to actually be useful.

Full Changelog: v0.1.1...v0.1.2

solface 0.1.1: Add SPDX header and pragma to generated output

22 Nov 04:50
f397a05
Compare
Choose a tag to compare

This version adds the following command-line arguments to solface:

  • -license allows you to specify a license to be used in the SPDX-License-Identifier header for the generated output
  • -pragma allows you to specify a Solidity pragma constraint for the generated output

These changes make it so that the solface generated code can compile directly without errors with any solidity build tool (e.g. Hardhat, Foundry, Brownie).

Full Changelog: v0.1.0...v0.1.1

Updated documentation and migrated GitHub organization

19 May 22:37
f400c2a
Compare
Choose a tag to compare

Migrated the repo from https://github.com/bugout-dev/solface to https://github.com/moonstream-to/solface.

Updated code generator to reflect this in the top-level comment that explains that code was generated by solface.

Bumped version to 0.1.0.

Annotations to generated interfaces

11 Apr 19:01
066778f
Compare
Choose a tag to compare

This release adds the -annotations flag to solface.

Interfaces generated using -annoations include comments which display the Interface ID as well as 4-byte selectors for each method.

Example:

$ ./solface -annotations -name IERC721 fixtures/abis/ERC721.json

// Interface generated by solface: https://github.com/bugout-dev/solface
// solface version: 0.0.5
// Interface ID: 80ac58cd
interface IERC721 {
        // structs

        // events
        event Approval(address owner, address approved, uint256 tokenId);
        event ApprovalForAll(address owner, address operator, bool approved);
        event Transfer(address from, address to, uint256 tokenId);

        // functions
        // Selector: 095ea7b3
        function approve(address to, uint256 tokenId) external ;
        // Selector: 70a08231
        function balanceOf(address owner) external view returns (uint256 balance);
        // Selector: 081812fc
        function getApproved(uint256 tokenId) external view returns (address operator);
        // Selector: e985e9c5
        function isApprovedForAll(address owner, address operator) external view returns (bool);
        // Selector: 6352211e
        function ownerOf(uint256 tokenId) external view returns (address owner);
        // Selector: 42842e0e
        function safeTransferFrom(address from, address to, uint256 tokenId) external ;
        // Selector: b88d4fde
        function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) external ;
        // Selector: a22cb465
        function setApprovalForAll(address operator, bool approved) external ;
        // Selector: 23b872dd
        function transferFrom(address from, address to, uint256 tokenId) external ;

        // errors
}

Fixed bug in generated errors

25 Jan 03:28
Compare
Choose a tag to compare

Before, there was no space between the type of each parameter and its name. This has been fixed.

Fixed input and output locations in interface methods

25 Jan 03:24
Compare
Choose a tag to compare

There was a bug where we were not specifying types of function arguments and return values that require the memory keyword.

This bug has been fixed, using this specification: https://docs.soliditylang.org/en/v0.8.17/types.html