Preparing search index...
The search index is not available
Documentation
Documentation
@fadroma/scrt
Mocknet
Contract
Class Contract<V>
Type Parameters
V
extends
ScrtCWVersion
Index
Constructors
constructor
Properties
address?
code
Hash?
code
Id?
cosm
Wasm
Version?
log
mocknet
prefix
runtime?
storage
Accessors
exec
Method
init
Method
query
Method
Methods
exec
Pointers
execute
init
init
Pointers
make
Context
make
Imports
pass
query
query
Pointers
read
Utf8
Constructors
constructor
new
Contract
<
V
>
(
mocknet
,
options
?
)
:
Mocknet
.
Contract
<
V
>
Type Parameters
V
extends
ScrtCWVersion
Parameters
mocknet
:
Mocknet
.
Backend
options
:
Partial
<
Mocknet
.
Contract
<
V
>
>
= {}
Returns
Mocknet
.
Contract
<
V
>
Properties
Optional
address
address
?:
string
Optional
code
Hash
code
Hash
?:
string
Optional
code
Id
code
Id
?:
string
Optional
cosm
Wasm
Version
cosm
Wasm
Version
?:
V
log
log
:
Console
= ...
Readonly
mocknet
mocknet
:
Mocknet
.
Backend
prefix
prefix
:
string
= 'secret1'
Optional
runtime
runtime
?:
Instance
<
ScrtCWAPI
<
V
>
[
"exports"
]
>
storage
storage
:
Map
<
string
,
Buffer
>
= ...
Accessors
exec
Method
get
execMethod
(
)
:
Function
Returns
Function
init
Method
get
initMethod
(
)
:
Function
Returns
Function
query
Method
get
queryMethod
(
)
:
Function
Returns
Function
Methods
exec
Pointers
exec
Pointers
(
__namedParameters
?
)
:
number
[]
Parameters
__namedParameters
:
any
= {}
Returns
number
[]
execute
execute
(
__namedParameters
)
:
any
Parameters
__namedParameters
:
{
env
?:
object
;
info
?:
object
;
msg
:
Message
;
sender
:
string
;
}
Optional
env
?:
object
Optional
info
?:
object
msg
:
Message
sender
:
string
Returns
any
init
init
(
__namedParameters
?
)
:
any
Parameters
__namedParameters
:
Partial
<
{
env
:
object
;
info
:
object
;
msg
:
Message
;
sender
:
string
;
}
>
= {}
Returns
any
init
Pointers
init
Pointers
(
__namedParameters
?
)
:
number
[]
Parameters
__namedParameters
:
any
= {}
Returns
number
[]
make
Context
make
Context
(
sender
,
now
?
)
:
{
env
:
{
block
:
{
chain_id
:
string
;
height
:
number
;
time
:
number
;
}
;
contract
:
{
address
:
string
;
}
;
contract_code_hash
:
string
;
contract_key
:
string
;
message
:
{
sender
:
string
;
sent_funds
:
any
[]
;
}
;
transaction
:
undefined
;
}
;
info
?:
undefined
;
}
|
{
env
:
{
block
:
{
chain_id
:
string
;
height
:
number
;
time
:
string
;
}
;
contract
:
{
address
:
string
;
}
;
contract_code_hash
:
undefined
;
contract_key
:
undefined
;
message
:
undefined
;
transaction
:
{
index
:
number
;
}
;
}
;
info
:
{
funds
:
any
[]
;
sender
:
string
;
}
;
}
Parameters
sender
:
string
now
:
number
= + new Date()
Returns
{
env
:
{
block
:
{
chain_id
:
string
;
height
:
number
;
time
:
number
;
}
;
contract
:
{
address
:
string
;
}
;
contract_code_hash
:
string
;
contract_key
:
string
;
message
:
{
sender
:
string
;
sent_funds
:
any
[]
;
}
;
transaction
:
undefined
;
}
;
info
?:
undefined
;
}
|
{
env
:
{
block
:
{
chain_id
:
string
;
height
:
number
;
time
:
string
;
}
;
contract
:
{
address
:
string
;
}
;
contract_code_hash
:
undefined
;
contract_key
:
undefined
;
message
:
undefined
;
transaction
:
{
index
:
number
;
}
;
}
;
info
:
{
funds
:
any
[]
;
sender
:
string
;
}
;
}
make
Imports
make
Imports
(
)
:
{
imports
:
ScrtCWAPI
<
V
>
[
"imports"
]
;
refresh
:
Function
;
}
Returns
{
imports
:
ScrtCWAPI
<
V
>
[
"imports"
]
;
refresh
:
Function
;
}
imports
:
ScrtCWAPI
<
V
>
[
"imports"
]
refresh
:
Function
pass
pass
(
data
)
:
number
Parameters
data
:
any
Returns
number
query
query
(
__namedParameters
)
:
any
Parameters
__namedParameters
:
{
env
?:
object
;
msg
:
Message
;
}
Optional
env
?:
object
msg
:
Message
Returns
any
query
Pointers
query
Pointers
(
__namedParameters
?
)
:
number
[]
Parameters
__namedParameters
:
any
= {}
Returns
number
[]
read
Utf8
read
Utf8
(
ptr
)
:
any
Parameters
ptr
:
number
Returns
any
Settings
Member Visibility
Protected
Private
Inherited
External
Theme
OS
Light
Dark
On This Page
constructor
address
code
Hash
code
Id
cosm
Wasm
Version
log
mocknet
prefix
runtime
storage
exec
Method
init
Method
query
Method
exec
Pointers
execute
init
init
Pointers
make
Context
make
Imports
pass
query
query
Pointers
read
Utf8
Documentation
@fadroma
agent
scrt
cw
oci
create
compile
devnet
@hackbg
ganesha
ensuite
cmds
conf
file
logs
oops
port
repo
CosmJS-ESM Documentation
SecretJS-ESM Docs
Loading...
Generated using
TypeDoc