Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@tableland/eth

Package Overview
Dependencies
Maintainers
4
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tableland/eth

On-chain ETH registry and client components for Tableland

  • 0.1.0-dev.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created
Source

@tableland/eth

GitHub license GitHub package.json version Release standard-readme compliant

Tests

On-chain ETH registry and client components for Tableland

Table of Contents

Background

This is the proof of concept on-chain ETH registry and client components for Tableland. This is the first pass, and is subject to wild changes without notice!

Development

Get started with installing and building the project:

npm install
npx hardhat compile
npm run build

Try running some of the following tasks:

npx hardhat accounts
npx hardhat compile
npx hardhat clean
npx hardhat test
npx hardhat node
npx hardhat help
REPORT_GAS=true npx hardhat test
npx hardhat coverage
npx hardhat run scripts/deploy.ts
TS_NODE_FILES=true npx ts-node scripts/deploy.ts
npx eslint '**/*.{js,ts}'
npx eslint '**/*.{js,ts}' --fix
npx prettier '**/*.{json,sol,md}' --check
npx prettier '**/*.{json,sol,md}' --write
npx solhint 'contracts/**/*.sol'
npx solhint 'contracts/**/*.sol' --fix

Building the client

You can build the Typescript client locally:

npm install
npx hardhat compile
npm run build

Extacting the ABI and Bytecode

Can you grab the assets you need by compiling and then using some jq magic:

ABI

cat artifacts/contracts/Registry.sol/TablelandTables.json | jq '.abi' > abi.json

Bytecode

cat artifacts/contracts/Registry.sol/TablelandTables.json | jq -r '.bytecode' > bytecode.bin

Generate the Go client!

You can use the above abi.json to build the Go client:

mkdir gobuild
abigen --abi ./abi.json --bin ./bytecode.bin --pkg contracts --out gobuild/Registry.go

Bytecode

To extract just the raw bytecode so you can deploy it in Go tests (to a locally running chain):

cat artifacts/contracts/Registry.sol/Registry.json | jq -r '.bytecode' > bytecode.bin

Etherscan verification

To try out Etherscan verification, you first need to deploy a contract to an Ethereum network that's supported by Etherscan, such as Ropsten.

In this project, copy the .env.example file to a file named .env, and then edit it to fill in the details. Enter your Etherscan API key, your Rinkeby node URL (e.g., from Alchemy), and the private key of the account which will send the deployment transaction. With a valid .env file in place, first deploy your contract:

hardhat run --network rinkeby scripts/deploy.ts

Then, copy the deployment address and paste it in to replace DEPLOYED_CONTRACT_ADDRESS in this command:

npx hardhat verify --network rinkeby DEPLOYED_CONTRACT_ADDRESS

Performance optimizations

For faster runs of your tests and scripts, consider skipping ts-node's type checking by setting the environment variable TS_NODE_TRANSPILE_ONLY to 1 in hardhat's environment. For more details see the documentation.

Maintainers

@carsonfarmer

Contributing

PRs accepted.

Small note: If editing the README, please conform to the standard-readme specification.

License

MIT AND Apache-2.0, © 2021-2022 Tableland Network Contributors

Keywords

FAQs

Package last updated on 10 May 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc