Economic Contract
gas.iost
GAS related contract, including pledging IOST for gas, unpleding, transferring GAS.
Details of economic model are introduced on GAS economic model。
Info
contract_id | gas.iost |
---|---|
language | native |
version | 1.0.0 |
API
pledge(pledgor, to, amount)
pledge iost for gas. minimum pledging amount is 1 iost.
Example
["user1","user1","100"]:user1 pledge 100 iost for himslef. So user1 costs 100 iost, and obtains some gas.
["user1","user2","100"]:user1 pledge 100 iost for user2. So user1 costs 100 iost, and user2 obtains some gas.
Parameter List | Parameter Type | Remark |
---|---|---|
pledgor | string | the account who pledges iost. Calling this interface requires this account's "transfer" permission |
to | string | the account who gets gas |
amount | string | iost amount for pledging |
unpledge
undo pledge. iost pledged earlier will be returned. minimum unpledging amount is 1 iost.
Example
["user1","user1","100"]:user1 unpledge 100 iost from his earlier pledgement for himself.
["user1","user2","100"]:user1 unpledge 100 iost from his earlier pledgement for user2.
Parameter List | Parameter Type | Remark |
---|---|---|
pledgor | string | the account who pledges iost. Calling this interface requires this account's "transfer" permission |
to | string | the account who gets gas |
amount | string | iost amount for pledging |