Giter VIP home page Giter VIP logo

b2-go-aa-utils's Introduction

B2-GO-AA-UTILS

Get Started

  • Install the module:
go get github.com/b2network/b2-go-aa-utils

Example

package main

import (
	"log"

	"github.com/b2network/b2-go-aa-utils"
	"github.com/ethereum/go-ethereum/common"
	"github.com/ethereum/go-ethereum/ethclient"
)

const (
	B2DevRpcUrl   = "http://43.135.203.73:8123"
	SCARegistry   = "0x231aec684Ad0e63c2F4d176EddCE97A1B666247c"
	KernelFactory = "0x7516283Ff7090B8286E23a16f8b5b35B3ba541A2"
)

func main() {
	client, err := ethclient.Dial(B2DevRpcUrl)
	if err != nil {
		panic(err)
	}
	owner := "bc1qe40k9zyjyndl2t7f0fxws7h94pjrfz0zan5yak"
	target, err := b2aa.GetSCAAddress(client, common.HexToAddress(SCARegistry), common.HexToAddress(KernelFactory), owner)
	if err != nil {
		panic(err)
	}
	log.Println((target))
}

b2-go-aa-utils's People

Contributors

thecookfrankie avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.