forked from vyperlang/vyper
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
export bundles are a way for library authors to group together external functions in the ABI example: ```vyper bundle: IERC_X # declare a bundle @internal def foo() -> uint256: return 10 @external def extern1(): pass @external @Bundle(IERC_X) def extern2(): pass @external @Bundle(IERC_X, bind=False) # extern3 ok to export on its own def extern3(): pass @external @Bundle(IERC_X, bind=True) # extern4 cannot be exported on its own! def extern4(): pass ``` it can be used like this: ```vyper import library exports: library.IERC_X @external def library_foo() -> uint256: return library.foo() ``` or like this: ```vyper import library exports: library.extern1, library.extern2 @external def library_foo() -> uint256: return library.foo() ``` but not like this(!): ```vyper import library exports: library.extern4 # raises StructureException @external def library_foo() -> uint256: return library.foo() ```
- Loading branch information
1 parent
8188d36
commit 6d6ab8b
Showing
8 changed files
with
204 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.