译文/Translated:
Coinage创始人Kevin Brown和我们探讨他在Lamington项目上的工作以及该工具将如何改进EOSIO智能合约的编译、部署和测试。
Lamington如何帮助智能合约发展呢?
当你用Javascript和Typescript编写EOSIO智能合约的时候,Laminton可以简化编写、测试、部署和调用操作的过程。它从你的ABI上生成完整的Typescript类型(哪怕你不使用Typescript也能在VSCode上自动完成)并创建合约对象,因此您只要编写await contract.action(parameter1, parameter2)而不用每次调用都深入到EOSIO级别。本工具还包括一些帮助程序,用以判定的数据在调用操作后是否正确,或合约操作是否缺少授权等。
您怎么想到要创建Lamington的?
Coinage每天都在和各大公司合作搭建去中心化平台。我们在EOSIO上搭建第二层解决方案和dAapp的时候,我们意识到,我们在一次又一次地创建相同的shell脚本,而且没有更简单的方式让我们嵌入编译、部署和测试智能合约。我们试着找了一圈可用的工具,但是它们要么限制了项目(比如只能使用一个智能合约),要么使用的语言不一致,要么只支持Javascript不支持Typescript。
我们想要有一个工具能够解决所有的事情,让我们能在合约旁边编写测试代码。后来,我们也发现这样也特别有助于提供更高级别的交互界面,因为这样这时候我们在调用操作或者获取表行的时候就不用记忆EOSIO调用的方法,我们只需要调用contract.table()或contract.action()以及assertRowsEqual() 或 assertMissingAuthority()即可。
Lamington怎么帮助EOSIO开发者的?
Lamington管理编译、部署、测试、和调用操作/获取表行,你就不用亲自动手了。测试的时候,它能让你更轻松地部署智能合约的纯净版本,这样测试就不会依赖彼此相关地内容。编译的过程中,它提供的是简单、类型感知的界面,不管是在调用操作的时候还是在使用getTableRows检索数据的时候。
Lamington未来有哪些计划?您现在是否有在研发什么新功能呢?
现在说这个有点为时过早。这个阶段我们的首要目标是获得更多的用户,这样我们才能消除漏洞,发布第一个版本。Coinage已经在生产的时候使用Lamington,所以我们知道它在我们的用例中表现出色,但是我们想保证边边角角的所有问题都能被发现和解决,然后我们才会提出相应的版本号。然后,我们想引入一些渐进式的修改,帮助用户更好地管理诸如eosio.code权限和其它更高级的用例等。我们希望能继续使用网站上的引导部分,让它能覆盖更多先进的EOSIO概念、引入完整的例子帮助人们更好地在EOSIO上开发代码、能比官方文档走得更远。
用户/社区地反馈是怎么样呢?
太棒了!Lamington在社区一个很好的例子是Mitch Pierias。他开始用Lamington之前就设立了一个高级的EOSIO示例存储库库,但是他没有展示或测试的方式。他现在就使用Lamington测试他所有的示例,这让我们能够解决一些我们自己项目中没有遇到的边缘案例。现在我们在存储库内每个合约旁边都带着一个测试套件,让用户不单单知道C++的内容,还有他们要怎么利用动作实际实现示例展示的功能。现在他是Lamington主要的贡献者,他让我们的工具往更棒的方向发展。
我们期待着和社区能有更多互动,让Lamington能够面对更多的开发者,让它更有价值。
现在谁在做Lamington 项目呢?
Lamington是Coinage成立的,但它是一个开源的社区项目,所以这个问题的答案是谁想做都可以做!我们希望能把Lamington做得更有用,让它能面向足够多的人,这样我们就可以让任何背景下的工程师都能更好地开发EOSIO,让已经熟悉EOSIO开发的人产能提高。
您怎么看待社区对该项目的反馈地?
现在一切都还在起步阶段,所以一切都很主观,但是我们主要是想创造一些工具让简单的事情继续保持简单,复杂的事情通过一些研究就可以完成。我们下一个关键点是使用度和发布第一个版本。
使用Lamington的时候用户要怎么开始?
大体上,不管你现在用的是哪个文件夹结构,Lamington都能使用。您可以通过安装Lamington开始,然后您可以按照网站上的入门指南继续。我们还有完整的API文件,如果您想和核心团队直接对话,那还有一个Slack实例让所有人都能加入。
您未来还有其他的开发工具计划吗?
我们计划升级Lamington,让它在dApp开发的时候尽量有用。这就是说,我们要简化链上数据获得以及在React或Vue应用上展示的过程,同时我们还要提供更加稳健的密钥管理和从NodeJS调用智能合约动作。我们期待能知道EOSIO社区其他成员最想看到的功能是什么。
至于其他的工具,我们会在有需求的时候建立工具,所以现在我们关注的还是如何让Lamington坚如磐石,未来,我们可能会搭建其他的工具,实现我们建立规模化的去中心化平台的使命。
开发人员要在哪里讨论Lamington、为该计划贡献呢?
和我们的核心团队聊天、问问题、获得我们的反馈的最好的地方是在Lamington Slack实例上。发布问题或提出需求最好的地方是GitHub。
建立在 EOSIO之上
我们的 #建立在EOSIO 系列展示了利用EOSIO科技的一些卓越的项目,它们都能为我们更加安全和联系的世界添砖加瓦。如果您想给我们下一个阶段的项目提建议,请给我们的开发者关系小组发送邮件spotlight@block.one
– Block.one 开发者关系小组
. . .
重要通知:所有提供的材料都受此重要通知的约束,您必须自行熟悉此间条款。该通知包含与我们软件、出版物、商标、第三方资源以及前瞻性声明相关的信息、限制和约束内容。通过访问我们的材料,您接收并同意此通知的条款。
原文/Original:
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 spotlight@block.one 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.
原文链接/Original URL: