ont

package
v0.0.0-...-035b7fa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2021 License: GPL-3.0 Imports: 19 Imported by: 1

Documentation

Overview

* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library. * * The poly network is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * The poly network is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * You should have received a copy of the GNU Lesser General Public License * along with The poly network . If not, see <http://www.gnu.org/licenses/>.

* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library. * * The poly network is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * The poly network is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * You should have received a copy of the GNU Lesser General Public License * along with The poly network . If not, see <http://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

View Source
var (
	ContractNames = []string{
		"ZeroCopySink",
		"ZeroCopySource",
		"lock_proxy",
		"ERC20Template",
		"OEP4Template",
		"ethx",
		"obtc",
		"odai",
		"ousdc",
		"ousdt",
	}
)

Functions

func GetAccountByPassword

func GetAccountByPassword(sdk *ontology_go_sdk.OntologySdk, path string, pwd []byte) (*ontology_go_sdk.Account, error)

func GetCurveLabel

func GetCurveLabel(name string) (byte, error)

func GetOntAccByPwd

func GetOntAccByPwd(acc, pwd string) (*ontology_go_sdk.Account, error)

func GetOntNoCompressKey

func GetOntNoCompressKey(key keypair.PublicKey) []byte

func WaitOntTx

func WaitOntTx(txhash common.Uint256, ont *ontology_go_sdk.OntologySdk)

Types

type OntInvoker

type OntInvoker struct {
	OntSdk     *goSdk.OntologySdk
	OntAcc     *goSdk.Account
	OntAvmPath string
}

func NewOntInvoker

func NewOntInvoker(rpc, avmPath, wallet, pwd string) (*OntInvoker, error)

func (*OntInvoker) BindBtcx

func (invoker *OntInvoker) BindBtcx(btcx string, otherBtcx []byte, chainId uint64, gasPrice, gasLimit uint64) (common.Uint256, error)

func (*OntInvoker) DeployContracts

func (invoker *OntInvoker) DeployContracts() ([]common.Address, error)

func (*OntInvoker) GetAccInfo

func (invoker *OntInvoker) GetAccInfo() (string, error)

func (*OntInvoker) GetLockedAmt

func (invoker *OntInvoker) GetLockedAmt(lockProxy, src common.Address) ([]byte, error)

func (*OntInvoker) SetOtherLockProxy

func (invoker *OntInvoker) SetOtherLockProxy(other []byte, toChainId uint64) (common.Uint256, error)

func (*OntInvoker) SetupBtcx

func (invoker *OntInvoker) SetupBtcx(btcx string, redeem, rk []byte, limit, gasPrice, gasLimit uint64) ([]common.Uint256, error)

func (*OntInvoker) SetupEthAsset

func (invoker *OntInvoker) SetupEthAsset(lockProxy, etho, erc20, erc20o string, gasPrice, gasLimit uint64) ([]common.Uint256, error)

func (*OntInvoker) SetupOntAsset

func (invoker *OntInvoker) SetupOntAsset(lockProxy, onte, onge, oep4, oep4e string, gasPrice, gasLimit uint64) ([]common.Uint256, error)

func (*OntInvoker) WaitTxConfirmation

func (invoker *OntInvoker) WaitTxConfirmation(tx common.Uint256)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL