-
Notifications
You must be signed in to change notification settings - Fork 0
API : Contract
王辰 edited this page Jan 6, 2020
·
3 revisions
boxdjs.Contract.setProvider('http://xxx', from, privateKey)Make unsigned contract transaction.
* OriginalContractReq <
{
from: <string>;
to: <string>;
amount: <number>;
gasLimit: <number>;
nonce: <number>;
isDeploy: <boolean>;
data: <string>;
}
>
UnsignedContractTx <
{
tx: {
data?;
lock_time?: <string>;
magic?: <number>;
version?: <number>;
vin: <Vin[]>;
vout: <Vout[]>;
};
rawMsgs;
contract_addr: <string>;
}
>
Call contract.
* CallContractReq <
{
from: <string>;
to: <string>;
data: <string>;
height: <number>;
timeout: <number>;
}
>
CallContractResp <
{
output: <string>;
}
>
Get contract logs.
* GetLogsReq <
{
hash?: <string>;
from: <number>;
to: <number>;
addresses: <string[]>;
topics;
}
>
interface: LogDetail <
{
address: <Buffer>;
topics: <Buffer[]>;
data: <Buffer>;
block_number: <number>;
tx_hash: <Buffer>;
tx_index: <number>;
block_hash: <Buffer>;
index: <number>;
removed: <boolean>;
}
>
returns: GetLogsResp <LogDetail[]>
By Contentbox