import { Dispatch } from 'redux' ; import { ContractsAddSpec , ContractsDeploy , ContractsNew , ContractsRemove , ContractsRemoveSpec } from '../actions/actions' ; import { NewContractInfos , TxInfos } from '../../state/txs' ; import { get_tx_id } from '../../utils/get_tx_id' ; description param dispatch param name param abi param options export const loadContractSpec = ( dispatch , name , abi , options ? ) : void => { dispatch ( ContractsAddSpec ( name , abi , options ) ) ; } ; description param dispatch param name export const removeContractSpec = ( dispatch , name ) : void => { dispatch ( ContractsRemoveSpec ( name ) ) ; } ; description param dispatch param name param address param options export const loadContractInstance = ( dispatch , name , address , options ? ) : void => { dispatch ( ContractsNew ( name , address , options ) ) ; } ; description param dispatch param name param address_or_alias export const removeContractInstance = ( dispatch , name , address_or_alias ) : void => { dispatch ( ContractsRemove ( name , address_or_alias ) ) ; } ; description param dispatch param contract param tx param args export const deployContract = ( dispatch , contract , tx , args ) : number => { const tx_id = get_tx_id ( ) ; dispatch ( ContractsDeploy ( contract , tx , args , tx_id ) ) ; return tx_id ; } ;