mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
use asciiToHex in datatoken.setData()
This commit is contained in:
parent
215ddf43df
commit
09d3341239
@ -1168,10 +1168,12 @@ export class Datatoken {
|
||||
this.config
|
||||
)
|
||||
|
||||
const estGas = await estimateGas(address, dtContract.methods.setData, value)
|
||||
const valueHex = this.web3.utils.asciiToHex(value)
|
||||
|
||||
const estGas = await estimateGas(address, dtContract.methods.setData, valueHex)
|
||||
|
||||
// Call setData function of the contract
|
||||
const trxReceipt = await dtContract.methods.setData(value).send({
|
||||
const trxReceipt = await dtContract.methods.setData(valueHex).send({
|
||||
from: address,
|
||||
gas: estGas + 1,
|
||||
gasPrice: await getFairGasPrice(this.web3, this.config)
|
||||
|
Loading…
x
Reference in New Issue
Block a user