Network.Ethereum.Web3
- Package
- purescript-web3
- Repository
- f-o-a-m/purescript-web3
Re-exports from Network.Ethereum.Web3.Contract
#call Source
call :: forall selector a b e. CallMethod selector a b => IsSymbol selector => TransactionOptions NoPay -> ChainCursor -> Tagged (SProxy selector) a -> Web3 e (Either CallError b)
Constant call given contract 'Address' in mode and given input data
#event' Source
event' :: forall ni i a e. DecodeEvent i ni a => Filter -> Int -> (a -> ReaderT Change (Web3 e) EventAction) -> Web3 e Unit
Takes a Filter
and a handler, as well as a windowSize.
It runs the handler over the eventLogs
using reduceEventStream
. If no
TerminateEvent
is thrown, it then transitions to polling.
#event Source
event :: forall ni i a e. DecodeEvent i ni a => Filter -> (a -> ReaderT Change (Web3 e) EventAction) -> Web3 e Unit
run event'
one block at a time.
#deployContract Source
deployContract :: forall t e rep a. Generic a rep => GenericABIEncode rep => TransactionOptions NoPay -> HexString -> Tagged t a -> Web3 e HexString
Re-exports from Network.Ethereum.Web3.Solidity
#D8 Source
data D8
Instances
KnownSize D8
IntSize D8
IntSize (NumCons D4 D8)
IntSize (NumCons D8 D0)
IntSize (NumCons D8 D8)
IntSize (NumCons D1 (NumCons D2 D8))
IntSize (NumCons D1 (NumCons D6 D8))
IntSize (NumCons D1 (NumCons D8 D4))
IntSize (NumCons D2 (NumCons D0 D8))
IntSize (NumCons D2 (NumCons D4 D8))
ByteSize D8
ByteSize (NumCons D1 D8)
ByteSize (NumCons D2 D8)
#D6 Source
data D6
Instances
KnownSize D6
IntSize (NumCons D1 D6)
IntSize (NumCons D5 D6)
IntSize (NumCons D6 D4)
IntSize (NumCons D9 D6)
IntSize (NumCons D1 (NumCons D3 D6))
IntSize (NumCons D1 (NumCons D6 D0))
IntSize (NumCons D1 (NumCons D6 D8))
IntSize (NumCons D1 (NumCons D7 D6))
IntSize (NumCons D2 (NumCons D1 D6))
IntSize (NumCons D2 (NumCons D5 D6))
ByteSize D6
ByteSize (NumCons D1 D6)
ByteSize (NumCons D2 D6)
#D4 Source
data D4
Instances
KnownSize D4
IntSize (NumCons D2 D4)
IntSize (NumCons D4 D0)
IntSize (NumCons D4 D8)
IntSize (NumCons D6 D4)
IntSize (NumCons D1 (NumCons D0 D4))
IntSize (NumCons D1 (NumCons D4 D4))
IntSize (NumCons D1 (NumCons D8 D4))
IntSize (NumCons D2 (NumCons D2 D4))
IntSize (NumCons D2 (NumCons D4 D0))
IntSize (NumCons D2 (NumCons D4 D8))
ByteSize D4
ByteSize (NumCons D1 D4)
ByteSize (NumCons D2 D4)
#D2 Source
data D2
Instances
KnownSize D2
IntSize (NumCons D2 D4)
IntSize (NumCons D3 D2)
IntSize (NumCons D7 D2)
IntSize (NumCons D1 (NumCons D1 D2))
IntSize (NumCons D1 (NumCons D2 D0))
IntSize (NumCons D1 (NumCons D2 D8))
IntSize (NumCons D1 (NumCons D5 D2))
IntSize (NumCons D1 (NumCons D9 D2))
IntSize (NumCons D2 (NumCons D0 D0))
IntSize (NumCons D2 (NumCons D0 D8))
IntSize (NumCons D2 (NumCons D1 D6))
IntSize (NumCons D2 (NumCons D2 D4))
IntSize (NumCons D2 (NumCons D3 D2))
IntSize (NumCons D2 (NumCons D4 D0))
IntSize (NumCons D2 (NumCons D4 D8))
IntSize (NumCons D2 (NumCons D5 D6))
ByteSize D2
ByteSize (NumCons D1 D2)
ByteSize (NumCons D2 D0)
ByteSize (NumCons D2 D1)
ByteSize (NumCons D2 D2)
ByteSize (NumCons D2 D3)
ByteSize (NumCons D2 D4)
ByteSize (NumCons D2 D5)
ByteSize (NumCons D2 D6)
ByteSize (NumCons D2 D7)
ByteSize (NumCons D2 D8)
ByteSize (NumCons D2 D9)
ByteSize (NumCons D3 D2)
#D1 Source
data D1
Instances
KnownSize D1
IntSize (NumCons D1 D6)
IntSize (NumCons D1 (NumCons D0 D4))
IntSize (NumCons D1 (NumCons D1 D2))
IntSize (NumCons D1 (NumCons D2 D0))
IntSize (NumCons D1 (NumCons D2 D8))
IntSize (NumCons D1 (NumCons D3 D6))
IntSize (NumCons D1 (NumCons D4 D4))
IntSize (NumCons D1 (NumCons D5 D2))
IntSize (NumCons D1 (NumCons D6 D0))
IntSize (NumCons D1 (NumCons D6 D8))
IntSize (NumCons D1 (NumCons D7 D6))
IntSize (NumCons D1 (NumCons D8 D4))
IntSize (NumCons D1 (NumCons D9 D2))
IntSize (NumCons D2 (NumCons D1 D6))
ByteSize D1
ByteSize (NumCons D1 D0)
ByteSize (NumCons D1 D1)
ByteSize (NumCons D1 D2)
ByteSize (NumCons D1 D3)
ByteSize (NumCons D1 D4)
ByteSize (NumCons D1 D5)
ByteSize (NumCons D1 D6)
ByteSize (NumCons D1 D7)
ByteSize (NumCons D1 D8)
ByteSize (NumCons D1 D9)
ByteSize (NumCons D2 D1)
ByteSize (NumCons D3 D1)
#D0 Source
data D0
Instances
KnownSize D0
IntSize (NumCons D4 D0)
IntSize (NumCons D8 D0)
IntSize (NumCons D1 (NumCons D0 D4))
IntSize (NumCons D1 (NumCons D2 D0))
IntSize (NumCons D1 (NumCons D6 D0))
IntSize (NumCons D2 (NumCons D0 D0))
IntSize (NumCons D2 (NumCons D0 D8))
IntSize (NumCons D2 (NumCons D4 D0))
ByteSize (NumCons D1 D0)
ByteSize (NumCons D2 D0)
ByteSize (NumCons D3 D0)
#ByteString Source
#unBytesN Source
unBytesN :: forall n. KnownSize n => BytesN n -> ByteString
Access the underlying raw bytestring
#uIntNFromBigNumber Source
uIntNFromBigNumber :: forall n. KnownSize n => BigNumber -> Maybe (UIntN n)
Attempt to coerce an unsigned integer into a statically sized one
#intNFromBigNumber Source
intNFromBigNumber :: forall n. KnownSize n => BigNumber -> Maybe (IntN n)
Attempt to coerce an signed BigNumber
into a statically sized one
#fromData Source
fromData :: forall a. ABIDecode a => HexString -> Either ParseError a
Parse encoded value, droping the leading 0x
#fromByteString Source
fromByteString :: forall n. KnownSize n => ByteString -> Maybe (BytesN n)
Attempt to coerce a bytestring into one of the appropriate size
#(:<) Source
Operator alias for Network.Ethereum.Web3.Solidity.Vector.vCons (right-associative / precedence 6)
#type (:&) Source
Operator alias for Network.Ethereum.Web3.Solidity.Size.NumCons (right-associative / precedence 6)
Re-exports from Network.Ethereum.Web3.Types
#Value Source
newtype Value a
Ether value in denomination a
Instances
Eq (Value a)
Show (Value a)
Encode (Value a)
Encode (Value NoPay)
Decode (Value a)
(EtherUnitSpec a) => EtherUnit (Value a)
(EtherUnitSpec a) => Semigroup (Value a)
(EtherUnitSpec a) => Monoid (Value a)
(EtherUnitSpec a) => LeftModule (Value a) Int
#TransactionOptions Source
newtype TransactionOptions u
Constructors
TransactionOptions { data :: NullOrUndefined HexString, from :: NullOrUndefined Address, gas :: NullOrUndefined BigNumber, gasPrice :: NullOrUndefined BigNumber, nonce :: NullOrUndefined BigNumber, to :: NullOrUndefined Address, value :: NullOrUndefined (Value u) }
Instances
Generic (TransactionOptions u) _
Newtype (TransactionOptions u) _
Eq (TransactionOptions u)
Show (TransactionOptions u)
Encode (TransactionOptions u)
#Transaction Source
newtype Transaction
Constructors
Transaction { blockHash :: HexString, blockNumber :: BlockNumber, from :: Address, gas :: BigNumber, gasPrice :: BigNumber, hash :: HexString, input :: HexString, nonce :: BigNumber, to :: NullOrUndefined Address, transactionIndex :: BigNumber, value :: Value Wei }
Instances
#Radix Source
newtype Radix
The number of unique digits (including zero) used to represent integers in a specific base.
#EventAction Source
data EventAction
EventAction Represents a flag to continue or discontinue listening to the filter
Constructors
Instances
#Change Source
newtype Change
Changes pulled by low-level call 'eth_getFilterChanges', 'eth_getLogs', and 'eth_getFilterLogs'
Constructors
Change { address :: Address, blockHash :: HexString, blockNumber :: BlockNumber, data :: HexString, logIndex :: HexString, topics :: Array HexString, transactionHash :: HexString, transactionIndex :: HexString }
Instances
#ChainCursor Source
data ChainCursor
Refers to a particular block time, used when making calls, transactions, or watching for events.
Constructors
Instances
#BlockNumber Source
#Block Source
newtype Block
Constructors
Block { difficulty :: BigNumber, extraData :: HexString, gasLimit :: BigNumber, gasUsed :: BigNumber, hash :: HexString, logsBloom :: HexString, miner :: HexString, nonce :: HexString, number :: BigNumber, parentHash :: HexString, receiptsRoot :: HexString, sha3Uncles :: HexString, size :: BigNumber, stateRoot :: HexString, timestamp :: BigNumber, totalDifficulty :: BigNumber, transactions :: Array HexString, transactionsRoot :: HexString, uncles :: Array HexString }
Instances
#unsafeToInt Source
unsafeToInt :: BigNumber -> Int
Unsafely coerce a BigNumber to an Int.
#toTwosComplement Source
toTwosComplement :: BigNumber -> BigNumber
Take the twos complement of a BigNumer
#toHexString Source
toHexString :: BigNumber -> HexString
#parseBigNumber Source
parseBigNumber :: Radix -> String -> Maybe BigNumber
Convert a string in the given base to a BigNumber
#padRightSigned Source
padRightSigned :: Signed HexString -> HexString
Pad a Signed HexString
on the right until it has length 0 mod 64.
#padLeftSigned Source
padLeftSigned :: Signed HexString -> HexString
Pad a Signed HexString
on the left until it has length == 0 mod 64.
#mkValue Source
mkValue :: forall a. EtherUnitSpec a => BigNumber -> Value a
Convert a big number into value, first using floor
function to take the integer part
#hexadecimal Source
hexadecimal :: Radix
The base-16 system.
#getPadLength Source
getPadLength :: Int -> Int
Computes the number of 0s needed to pad a bytestring of the input length
#fromHexString Source
fromHexString :: HexString -> BigNumber
Re-exports from Network.Ethereum.Web3.Types.Provider
#metamaskProvider Source
metamaskProvider :: forall e. Eff (exception :: EXCEPTION | e) Provider
Produces reference to Metamas provider
#httpProvider Source
httpProvider :: forall e. String -> Eff e Provider
Connect to an ethereum client at a given address, eg "http://localhost:8545"
- Modules
- Network.
Ethereum. Web3 - Network.
Ethereum. Web3. Api - Network.
Ethereum. Web3. Contract - Network.
Ethereum. Web3. Contract. Internal - Network.
Ethereum. Web3. JsonRPC - Network.
Ethereum. Web3. Solidity - Network.
Ethereum. Web3. Solidity. AbiEncoding - Network.
Ethereum. Web3. Solidity. Bytes - Network.
Ethereum. Web3. Solidity. EncodingType - Network.
Ethereum. Web3. Solidity. Event - Network.
Ethereum. Web3. Solidity. Generic - Network.
Ethereum. Web3. Solidity. Int - Network.
Ethereum. Web3. Solidity. Size - Network.
Ethereum. Web3. Solidity. Tuple - Network.
Ethereum. Web3. Solidity. UInt - Network.
Ethereum. Web3. Solidity. Vector - Network.
Ethereum. Web3. Types - Network.
Ethereum. Web3. Types. BigNumber - Network.
Ethereum. Web3. Types. EtherUnit - Network.
Ethereum. Web3. Types. Provider - Network.
Ethereum. Web3. Types. Sha3 - Network.
Ethereum. Web3. Types. Types - Network.
Ethereum. Web3. Types. Utils
Event filter structure used by low-level subscription methods