Introduction

In episode 18, Bill defined the Go type that will represent a transaction and implemented the methods to validate one. While developing the transaction type, Bill states that he’ll be borrowing concepts from Ethereum to ensure that he’s building a reference implementation. Bill’s transaction type has a field named nonce, similar to Ethereum, that ensures transactions are executed in order. The nonce value of the last transaction is stored in his accounting database and later compared for additional verification.

In this video, Bill will implement the data structure that will house a user’s account. The first step he takes is to define the data structure of an account and give a brief walkthrough of the reasoning behind his design. Next, Bill will add a factory function to abstract initializing an account on the system. Watch and learn how you can define an account on your blockchain and the minimum set of fields required for operation.

Things you will learn in this video

  • How to define an account type.
  • Properly model the account data structure.

Video

Trusted by Top Technology Companies

We've built our reputation as educators and bring that mentality to every project. When you partner with us, your team will learn best practices and grow along the way.

30,000+

Engineers Trained

1,000+

Companies Worldwide

14+

Years in Business