View all News

Lamington Simplifies EOSIO Smart Contract Development

Lamington eosio smart contract development

Kevin Brown, the founder of Coinage, tells us about his work on the Lamington project and how this tool is designed to help compile, deploy and test EOSIO™ smart contracts.

How does Lamington aid in smart contract development?

Lamington is an easier way to compile, test, deploy, and call actions on your EOSIO smart contracts from Javascript and Typescript. It generates full Typescript types from your ABIs (giving you autocomplete in VSCode even if you don’t use Typescript) and creates contract objects so you can simply write await contract.action(parameter1, parameter2) instead of having to dive down to the EOSIO level on every call. It also comes with a bunch of helpers for asserting data in tables looks at how it should after actions are called, or asserting that a contract action is missing an authority, etc.

Why did you decide to create Lamington?

At Coinage we work with companies to build decentralized platforms at scale every day. When building layer 2 solutions and dApps on EOSIO we realized we kept creating the same shell scripts over and over again, and that there was no easy drop-in way to compile, deploy, and test our smart contracts. When looking at the field of tooling that’s already out there, everything we tried either put constraints on our project (for example, using one smart contract only), didn’t work with our preferred language, or supported Javascript but not Typescript.

We wanted a single tool that would get out of the way and just let us write test files next to our contracts. It also turned out to be incredibly helpful to provide a higher level interface so calling actions or get table rows didn’t involve remembering how EOSIO calls worked, but instead just let us call contract.table() or contract.action(), and assertRowsEqual() or assertMissingAuthority().

How does Lamington help EOSIO developers?

Lamington manages the compilation, deployment, testing, and calling of actions / getTableRows so you don’t have to. When testing it allows you to easily deploy clean copies of your contract so your tests don’t depend on context from each other. When in production it gives you an easy, type aware interface to your contracts, both in calling their actions, as well as retrieving their data with getTableRows.

What are the future plans for Lamington?  Are you working on any particular new features?

It’s still pretty early, so our primary goal at this stage is to get more users using it so we can iron out the bugs and release a v1. Coinage is already using Lamington in production, so we know it works well for our use case, but we want to make sure any nasty edge cases are found and eliminated before we give it a production version number. From there we want to introduce some incremental improvements to the way we help users manage things like eosio.code permission and other more advanced use cases. We want to continue to use the guides section on our website to cover more advanced EOSIO concepts with full examples to help people become better EOSIO developers and dive more in depth than the official documentation.

What has the response of users/the community been?

It’s been fantastic! One stand out community example for Lamington has been Mitch Pierias. He built a repository of more advanced EOSIO examples which he didn’t have a good way to demo or test before he found Lamington. He’s now rolled Lamington tests out for all of the examples, which helped us to work out some edge cases we hadn’t encountered in our own projects. On the repo there’s now a test suite next to each contract which shows users not just how the C++ looks, but also how they use the actions to actually achieve the functionality demonstrated in the example. He’s now a core Lamington contributor and has moved the tool forward in amazing ways.

We’re really looking forward to more interactions with the community to help make Lamington even more valuable for a wider group of developers.

Who is working on the Lamington project?

Lamington is being funded by Coinage, but it is an open source community project, so the answer to that question is whoever wants to! Our hope is to make Lamington useful enough to a wide enough group of people that we’re able to make EOSIO development more accessible to engineers from any background, and to make EOSIO development more productive for those that are already familiar with it.

How are you measuring community feedback to the project?

Right now everything is very anecdotal as it’s early days, but our approach is to focus on making a tool where easy things are easy, and complicated things are achievable with some research. Our next key metric for the success of the project is adoption and a v1 release.

How do developers get started when using Lamington?

Lamington largely fits in with whatever folder structure you’re already using. You can get started by installing Lamington, then following the getting started guide on our website. We also have full API documentation, and if you want to chat with the core team directly, there’s a Slack instance which is open for anyone to join.

Do you have plans to make any other development tools in future?

We plan to extend Lamington to be as useful as it can be in dApp development. That means making it easier to take on-chain data and show it in React or Vue applications, as well as providing a more robust approach to key management and calling smart contract actions from NodeJS. We’re looking forward to seeing what features are most wanted by the rest of the EOSIO development community.

As for other tools, we build tools as we see a need for them, so right now the focus is on making Lamington rock solid, and in the future we may build other tools that help us deliver on our mission of building decentralised platforms at scale.

Where can developers go to discuss Lamington and contribute to the project?

The best place to chat with the core team to ask questions or generally give us feedback is on the Lamington Slack instance. The best place to contribute issues or pull requests is GitHub.

Building on EOSIO?

Our #BuiltOnEOSIO series showcases some of the amazing projects leveraging EOSIO technology to build a more secure and connected world.  If you would like to suggest a project for us to feature please send an email to [email protected] for our Developer Relations team to review

–  Block.one Developer Relations team

. . .

Important Note: All material is provided subject to this important notice and you must familiarize yourself with its terms. The notice contains important information, limitations and restrictions relating to our software, publications, trademarks, third-party resources and forward-looking statements. By accessing any of our material, you accept and agree to the terms of the notice.

Sign up to receive all the latest news & insights from EOSIO