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 ¶
- Variables
- func GetAccountByPassword(sdk *ontology_go_sdk.OntologySdk, path string, pwd []byte) (*ontology_go_sdk.Account, error)
- func GetCurveLabel(name string) (byte, error)
- func GetOntAccByPwd(acc, pwd string) (*ontology_go_sdk.Account, error)
- func GetOntNoCompressKey(key keypair.PublicKey) []byte
- func WaitOntTx(txhash common.Uint256, ont *ontology_go_sdk.OntologySdk)
- type OntInvoker
- func (invoker *OntInvoker) BindBtcx(btcx string, otherBtcx []byte, chainId uint64, gasPrice, gasLimit uint64) (common.Uint256, error)
- func (invoker *OntInvoker) DeployContracts() ([]common.Address, error)
- func (invoker *OntInvoker) GetAccInfo() (string, error)
- func (invoker *OntInvoker) GetLockedAmt(lockProxy, src common.Address) ([]byte, error)
- func (invoker *OntInvoker) SetOtherLockProxy(other []byte, toChainId uint64) (common.Uint256, error)
- func (invoker *OntInvoker) SetupBtcx(btcx string, redeem, rk []byte, limit, gasPrice, gasLimit uint64) ([]common.Uint256, error)
- func (invoker *OntInvoker) SetupEthAsset(lockProxy, etho, erc20, erc20o string, gasPrice, gasLimit uint64) ([]common.Uint256, error)
- func (invoker *OntInvoker) SetupOntAsset(lockProxy, onte, onge, oep4, oep4e string, gasPrice, gasLimit uint64) ([]common.Uint256, error)
- func (invoker *OntInvoker) WaitTxConfirmation(tx common.Uint256)
Constants ¶
This section is empty.
Variables ¶
var (
ContractNames = []string{
"ZeroCopySink",
"ZeroCopySource",
"lock_proxy",
"ERC20Template",
"OEP4Template",
"ethx",
"obtc",
"odai",
"ousdc",
"ousdt",
}
)
Functions ¶
func GetAccountByPassword ¶
func GetCurveLabel ¶
func GetOntAccByPwd ¶
func GetOntNoCompressKey ¶
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) 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 (*OntInvoker) SetupEthAsset ¶
func (*OntInvoker) SetupOntAsset ¶
func (*OntInvoker) WaitTxConfirmation ¶
func (invoker *OntInvoker) WaitTxConfirmation(tx common.Uint256)