@zecrey/zecrey-mobile-core
v0.2.42
Published
## generate transaction data, estimate gas limit
Downloads
90
Readme
zecrey-mobile-core
generate transaction data, estimate gas limit
import {TransactionCreator} from "src/L1/TransactionCreator/index";
import {L1Asset} from "src/L1/L1Asset";
const transactionCreator = new TransactionCreator({
asset: new L1Asset(), // this is mocked, it should be the selected asset to be transfered
toAddress: '0xB90742e23A77faA4F25a9667ee3FfA8D101a867a',
amount: '0.001'
})
const transactionDataAndGaslimitTransfer = transactionCreator.transfer()
const transactionDataAndGaslimitDeposit = transactionCreator.deposit()
const transactionDataAndGaslimitLock = transactionCreator.lock()
get encryption contract
import {store} from "src/store";
import {getEncryptContracts} from "src/L1/getContract";
getEncryptContracts(store.l2API).then(encryptContracts => {
if(encryptContracts.length>0){
store.updateEncryptContracts(encryptContracts)
}
})