mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
add some debug
This commit is contained in:
parent
f7a1a4cb44
commit
210e32579d
@ -57,18 +57,19 @@ export class BalancerContractHandler {
|
||||
|
||||
public async SdeployContracts(minter: string) {
|
||||
let estGas
|
||||
|
||||
console.log('Trying to deploy SPool')
|
||||
console.log("Bytecode size:"+this.poolBytecode.length)
|
||||
estGas = await this.pool
|
||||
.deploy({
|
||||
data: this.poolBytecode,
|
||||
arguments: []
|
||||
})
|
||||
.estimateGas({ from: minter, gas: 9007199254740991 }, function (err, estGas) {
|
||||
if (err) console.log('DeployContracts: ' + err)
|
||||
if (err) console.log('Pool deploy estimate gas: ' + err)
|
||||
return estGas
|
||||
})
|
||||
// deploy the contract and get it's address
|
||||
console.log('estGas:' + estGas)
|
||||
console.log('Pool estGas:' + estGas)
|
||||
this.poolAddress = await this.pool
|
||||
.deploy({
|
||||
data: this.poolBytecode,
|
||||
@ -82,7 +83,7 @@ export class BalancerContractHandler {
|
||||
.then(function (contract) {
|
||||
return contract.options.address
|
||||
})
|
||||
|
||||
console.log("Pool deployed:"+this.poolAddress)
|
||||
estGas = await this.factory
|
||||
.deploy({
|
||||
data: this.factoryBytecode,
|
||||
|
@ -89,14 +89,12 @@ describe('Balancer flow', () => {
|
||||
)
|
||||
await OceanPoolContracts.getAccounts()
|
||||
owner = OceanPoolContracts.accounts[0]
|
||||
console.log('Owner:' + owner)
|
||||
|
||||
await OceanPoolContracts.deployContracts(owner)
|
||||
OceanPoolFactoryAddress = OceanPoolContracts.factoryAddress
|
||||
assert(OceanPoolFactoryAddress !== null)
|
||||
})
|
||||
|
||||
|
||||
it('Deploy SFactory', async () => {
|
||||
it('Deploy Spool/SFactory', async () => {
|
||||
const SContracts = new BalancerContractHandler(
|
||||
SFactory.abi,
|
||||
SFactory.bytecode,
|
||||
@ -106,7 +104,7 @@ describe('Balancer flow', () => {
|
||||
)
|
||||
await SContracts.getAccounts()
|
||||
owner = SContracts.accounts[0]
|
||||
console.log('Owner:' + owner)
|
||||
|
||||
await SContracts.SdeployContracts(owner)
|
||||
const SFactoryAddress = SContracts.factoryAddress
|
||||
assert(SFactoryAddress !== null)
|
||||
|
Loading…
x
Reference in New Issue
Block a user