Options
All
  • Public
  • Public/Protected
  • All
Menu

Soltsice

Index

Variables

Const isProduction

isProduction: boolean = process.env.NODE_ENV === 'production'

Const mainnetStorageFactory

mainnetStorageFactory: "0x5Bd0ecfb4F008f4d0327d34878a89892e97c098F" = "0x5Bd0ecfb4F008f4d0327d34878a89892e97c098F"

Const rinkebyStorageFactory

rinkebyStorageFactory: "0xa77adf5ab405b0eb8aecd78980576eac12c0e71a" = "0xa77adf5ab405b0eb8aecd78980576eac12c0e71a"

Const ropstenStorageFactory

ropstenStorageFactory: "0x2e3794A43782677ED7f93a3C492Ed3C959d67033" = "0x2e3794A43782677ED7f93a3C492Ed3C959d67033"

Const testAccounts

testAccounts: string[] = ['0xd7126c8c920800706f826df0772d792343cfecca','0x2830b22ba29a1e5107ae27c3e5ce177649c0cd58','0x763fa0615aa02e89882f888d4467b711bc182fdf','0x24ac9c8f8df0890a6fb13a3395ffa31021bc94d2','0x0b67838dd16332c1f5954deceaa2d0813494940a']

The first five accounts generated with dbrain mnemonic on Ganache (TestRPC)

Const testPrivateKeys

testPrivateKeys: string[] = ['1ce01934dbcd6fd84e68faca8c6aebca346162823d20f0562135fe3e4f275bce','058f98c376f9bf8e3bf167821ceabfdb15202408bc9a288c30a2339152341a27','98295a1bbe25893261d962e56419da5064a45af2864052612498ef01346a5cd2','b11ca488b6881322b141510bc2568a9434b74c25b5a315ac3699bcb6d4677eac','cebd6eb5764cb4dbaa42ddf62db0834bc58a9fb93f5776bff32d2f97544bc500']

Private keys (NOT 0x prefixed) for the first five accounts generated with dbrain mnemonic on Ganache (TestRPC).

Functions

getStorage

  • getStorage(w3: W3, accountAddress: string, createOnMainNet?: undefined | true | false, privateKey?: undefined | string): Promise<Storage>
  • Get storage contract on active network for account.

    Parameters

    • w3: W3

      W3 instance.

    • accountAddress: string

      Storage owner address.

    • Optional createOnMainNet: undefined | true | false

      If on Mainnet this parameter must be true to create a new storage contract (will cost deployment gas).

    • Optional privateKey: undefined | string

      When provided, transactions will be signed and sent via sendRawTransaction.

    Returns Promise<Storage>

toBN

  • toBN(value: number): BigNumber
  • Convert number or hex string to BigNumber

    Parameters

    • value: number

    Returns BigNumber

With 🖖 by Dbrain