website: install abigen with go1.18+ (#28931)

* go install: abigen

* abigen: go install

* abigen: go install

* abigen: solidity
pull/29096/head
Hiro 8 months ago committed by GitHub
parent 15e83a31f5
commit 7c9548cc09
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      docs/developers/dapp-developer/native-bindings.md
  2. 7
      docs/tools/abigen.md

@ -22,8 +22,7 @@ Ethereum smart contracts have a schema that defines its functions and return typ
Geth includes a source code generator called `abigen` that can convert Ethereum ABI definitions into easy to use, type-safe Go packages. With a valid Go development environment set up and the go-ethereum repository checked out correctly, `abigen` can be built as follows:
```sh
$ cd $GOPATH/src/github.com/ethereum/go-ethereum
$ go build ./cmd/abigen
go install github.com/ethereum/go-ethereum/cmd/abigen@latest
```
### Generating the bindings {#generating-bindings}

@ -3,11 +3,10 @@ title: Abigen
description: Introduction to the Go binding generator tool, Abigen
---
Abigen is a binding-generator for easily interacting with Ethereum using Go. Abigen creates easy-to-use, type-safe Go packages from Ethereum smart contract definitions known as ABIs. This abstracts away a lot of the complexity of handling smart contract deployment and interaction in Go native applications such as encoding and decoding smart contracts into EVM bytecode. Abigen comes bundled with Geth. A full Geth installation includes the abigen binary. Abigen can also be built independently by navigating to `go-ethereum/cmd/abigen` and running `go build`, or equivalently:
Abigen is a binding-generator for easily interacting with Ethereum using Go. Abigen creates easy-to-use, type-safe Go packages from Ethereum smart contract definitions known as ABIs. This abstracts away a lot of the complexity of handling smart contract deployment and interaction in Go native applications such as encoding and decoding smart contracts into EVM bytecode. Abigen comes bundled with Geth. A full Geth installation includes the abigen binary. Abigen can also be built independently by running the below `go install` command:
```sh
$ cd $GOPATH/src/github.com/ethereum/go-ethereum
$ go build ./cmd/abigen
go install github.com/ethereum/go-ethereum/cmd/abigen@latest
```
## What is an ABI? {#what-is-an-abi}
@ -18,7 +17,7 @@ Ethereum smart contracts have a schema that defines its functions and return typ
To demonstrate the binding generator a contract is required. The contract `Storage.sol` implements two very simple functions: `store` updates a user-defined `uint256` to the contract's storage, and `retrieve` displays the value stored in the contract to the user. The Solidity code is as follows:
```js
```solidity
// SPDX-License-Identifier: GPL-3.0
pragma solidity >0.7.0 < 0.9.0;

Loading…
Cancel
Save