623 lines
21 KiB
HTML
623 lines
21 KiB
HTML
|
|
<!DOCTYPE HTML>
|
|
<html lang="" >
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
|
|
<title>Extrinsics (runtime) · Polkadot API Book</title>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
<meta name="description" content="">
|
|
<meta name="generator" content="GitBook 3.2.3">
|
|
|
|
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="gitbook/style.css">
|
|
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="gitbook/gitbook-plugin-insert-logo-link/plugin.css">
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="gitbook/gitbook-plugin-mermaid-gb3/mermaid/mermaid.css">
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="gitbook/gitbook-plugin-sunlight-highlighter/sunlight.css">
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<link rel="stylesheet" href="styles/website.css">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<meta name="HandheldFriendly" content="true"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
|
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
|
|
<link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
|
|
|
|
|
|
<link rel="next" href="METHODS_EVENTS.html" />
|
|
|
|
|
|
<link rel="prev" href="METHODS_STORAGE.html" />
|
|
|
|
|
|
</head>
|
|
<body>
|
|
|
|
<div class="book">
|
|
<div class="book-summary">
|
|
|
|
|
|
<div id="book-search-input" role="search">
|
|
<input type="text" placeholder="Type to search" />
|
|
</div>
|
|
|
|
|
|
<nav role="navigation">
|
|
|
|
|
|
|
|
<ul class="summary">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<li class="header">Packages</li>
|
|
|
|
|
|
|
|
<li class="chapter " data-level="1.1" data-path="./">
|
|
|
|
<a href="./">
|
|
|
|
|
|
Introduction
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="1.2" data-path="api/">
|
|
|
|
<a href="api/">
|
|
|
|
|
|
api
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<ul class="articles">
|
|
|
|
|
|
<li class="chapter " data-level="1.2.1" data-path="api/classes/_promise_index_.apipromise.html">
|
|
|
|
<a href="api/classes/_promise_index_.apipromise.html">
|
|
|
|
|
|
ApiPromise
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="1.2.2" data-path="api/classes/_rx_index_.apirx.html">
|
|
|
|
<a href="api/classes/_rx_index_.apirx.html">
|
|
|
|
|
|
ApiRx
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="1.3" data-path="rpc-provider/">
|
|
|
|
<a href="rpc-provider/">
|
|
|
|
|
|
rpc-provider
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<ul class="articles">
|
|
|
|
|
|
<li class="chapter " data-level="1.3.1" data-path="rpc-provider/classes/_http_index_.httpprovider.html">
|
|
|
|
<a href="rpc-provider/classes/_http_index_.httpprovider.html">
|
|
|
|
|
|
HttpProvider
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="1.3.2" data-path="rpc-provider/classes/_ws_index_.wsprovider.html">
|
|
|
|
<a href="rpc-provider/classes/_ws_index_.wsprovider.html">
|
|
|
|
|
|
WsProvider
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="1.4" data-path="types/">
|
|
|
|
<a href="types/">
|
|
|
|
|
|
types (codec implementation)
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li class="header">Interfaces</li>
|
|
|
|
|
|
|
|
<li class="chapter " data-level="2.1" data-path="METHODS_RPC.html">
|
|
|
|
<a href="METHODS_RPC.html">
|
|
|
|
|
|
RPC
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="2.2" data-path="METHODS_STORAGE.html">
|
|
|
|
<a href="METHODS_STORAGE.html">
|
|
|
|
|
|
Chain state (runtime)
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter active" data-level="2.3" data-path="METHODS_EXTRINSICS.html">
|
|
|
|
<a href="METHODS_EXTRINSICS.html">
|
|
|
|
|
|
Extrinsics (runtime)
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="2.4" data-path="METHODS_EVENTS.html">
|
|
|
|
<a href="METHODS_EVENTS.html">
|
|
|
|
|
|
Events (runtime)
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li class="header">Examples</li>
|
|
|
|
|
|
|
|
<li class="chapter " data-level="3.1" data-path="examples/promise/">
|
|
|
|
<a href="examples/promise/">
|
|
|
|
|
|
ApiPromise
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<ul class="articles">
|
|
|
|
|
|
<li class="chapter " data-level="3.1.1" data-path="examples/promise/01_simple_connect/">
|
|
|
|
<a href="examples/promise/01_simple_connect/">
|
|
|
|
|
|
Simple connect
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="3.1.2" data-path="examples/promise/02_listen_to_blocks/">
|
|
|
|
<a href="examples/promise/02_listen_to_blocks/">
|
|
|
|
|
|
Listen to blocks
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="3.1.3" data-path="examples/promise/03_listen_to_balance_change/">
|
|
|
|
<a href="examples/promise/03_listen_to_balance_change/">
|
|
|
|
|
|
Listen to balance change
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="3.1.4" data-path="examples/promise/05_read_storage/">
|
|
|
|
<a href="examples/promise/05_read_storage/">
|
|
|
|
|
|
Read chain state
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="3.1.5" data-path="examples/promise/07_transfer_dots/">
|
|
|
|
<a href="examples/promise/07_transfer_dots/">
|
|
|
|
|
|
Make a transfer
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
<li class="chapter " data-level="3.1.6" data-path="examples/promise/08_system_events/">
|
|
|
|
<a href="examples/promise/08_system_events/">
|
|
|
|
|
|
Display system events
|
|
|
|
</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
<li class="divider"></li>
|
|
|
|
<li>
|
|
<a href="https://www.gitbook.com" target="blank" class="gitbook-link">
|
|
Published with GitBook
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
|
|
|
|
</nav>
|
|
|
|
|
|
</div>
|
|
|
|
<div class="book-body">
|
|
|
|
<div class="body-inner">
|
|
|
|
|
|
|
|
<div class="book-header" role="navigation">
|
|
|
|
|
|
<!-- Title -->
|
|
<h1>
|
|
<i class="fa fa-circle-o-notch fa-spin"></i>
|
|
<a href="." >Extrinsics (runtime)</a>
|
|
</h1>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="page-wrapper" tabindex="-1" role="main">
|
|
<div class="page-inner">
|
|
|
|
<div id="book-search-results">
|
|
<div class="search-noresults">
|
|
|
|
<section class="normal markdown-section">
|
|
|
|
<h2 id="extrinsics"><a id="top" style="text-decoration: none;">Extrinsics</a></h2>
|
|
<p><em>The following sections contain Extrinsics methods are part of the default Substrate runtime. Since an Extrinsic is a holder of an object that is just an array of bytes to be included, it does not have a return.</em></p>
|
|
<ul>
|
|
<li><p><strong><a href="#balances">balances</a></strong></p>
|
|
</li>
|
|
<li><p><strong><a href="#consensus">consensus</a></strong></p>
|
|
</li>
|
|
<li><p><strong><a href="#contract">contract</a></strong></p>
|
|
</li>
|
|
<li><p><strong><a href="#council">council</a></strong></p>
|
|
</li>
|
|
<li><p><strong><a href="#councilMotions">councilMotions</a></strong></p>
|
|
</li>
|
|
<li><p><strong><a href="#councilVoting">councilVoting</a></strong></p>
|
|
</li>
|
|
<li><p><strong><a href="#democracy">democracy</a></strong></p>
|
|
</li>
|
|
<li><p><strong><a href="#session">session</a></strong></p>
|
|
</li>
|
|
<li><p><strong><a href="#staking">staking</a></strong></p>
|
|
</li>
|
|
<li><p><strong><a href="#system">system</a></strong></p>
|
|
</li>
|
|
<li><p><strong><a href="#timestamp">timestamp</a></strong></p>
|
|
</li>
|
|
<li><p><strong><a href="#treasury">treasury</a></strong></p>
|
|
</li>
|
|
</ul>
|
|
<hr>
|
|
<p><a href="#top" style="float: right; font-size: 1.6rem; font-weight: bold;">Back To Top</a></p>
|
|
<h3 id="balances"><a id="balances"></a>balances</h3>
|
|
<p>▸ <strong>setBalance</strong>(who: <code>Address</code>, free: <code>Balance</code>, reserved: <code>Balance</code>)</p>
|
|
<p>▸ <strong>transfer</strong>(dest: <code>Address</code>, value: <code>Balance</code>)</p>
|
|
<hr>
|
|
<p><a href="#top" style="float: right; font-size: 1.6rem; font-weight: bold;">Back To Top</a></p>
|
|
<h3 id="consensus"><a id="consensus"></a>consensus</h3>
|
|
<p>▸ <strong>noteOffline</strong>(offline_val_indices: <code>Vec<u32></code>)</p>
|
|
<p>▸ <strong>remark</strong>(remark: <code>Bytes</code>)</p>
|
|
<p>▸ <strong>reportMisbehavior</strong>(report: <code>MisbehaviorReport</code>)</p>
|
|
<p>▸ <strong>setCode</strong>(new: <code>Bytes</code>)</p>
|
|
<p>▸ <strong>setStorage</strong>(items: <code>Vec<KeyValue></code>)</p>
|
|
<hr>
|
|
<p><a href="#top" style="float: right; font-size: 1.6rem; font-weight: bold;">Back To Top</a></p>
|
|
<h3 id="contract"><a id="contract"></a>contract</h3>
|
|
<p>▸ <strong>call</strong>(dest: <code>AccountId</code>, value: <code>Balance</code>, gas_limit: <code>Gas</code>, data: <code>Bytes</code>)</p>
|
|
<p>▸ <strong>create</strong>(value: <code>Balance</code>, gas_limit: <code>Gas</code>, init_code: <code>Bytes</code>, data: <code>Bytes</code>)</p>
|
|
<hr>
|
|
<p><a href="#top" style="float: right; font-size: 1.6rem; font-weight: bold;">Back To Top</a></p>
|
|
<h3 id="council"><a id="council"></a>council</h3>
|
|
<p>▸ <strong>presentWinner</strong>(candidate: <code>Address</code>, total: <code>Balance</code>, index: <code>VoteIndex</code>)</p>
|
|
<p>▸ <strong>reapInactiveVoter</strong>(reporter_index: <code>u32</code>, who: <code>Address</code>, who_index: <code>u32</code>, assumed_vote_index: <code>VoteIndex</code>)</p>
|
|
<p>▸ <strong>removeMember</strong>(who: <code>Address</code>)</p>
|
|
<p>▸ <strong>retractVoter</strong>(index: <code>u32</code>)</p>
|
|
<p>▸ <strong>setApprovals</strong>(votes: <code>Vec<bool></code>, index: <code>VoteIndex</code>)</p>
|
|
<p>▸ <strong>setDesiredSeats</strong>(count: <code>u32</code>)</p>
|
|
<p>▸ <strong>setPresentationDuration</strong>(count: <code>BlockNumber</code>)</p>
|
|
<p>▸ <strong>setTermDuration</strong>(count: <code>BlockNumber</code>)</p>
|
|
<p>▸ <strong>submitCandidacy</strong>(slot: <code>u32</code>)</p>
|
|
<hr>
|
|
<p><a href="#top" style="float: right; font-size: 1.6rem; font-weight: bold;">Back To Top</a></p>
|
|
<h3 id="councilmotions"><a id="councilMotions"></a>councilMotions</h3>
|
|
<p>▸ <strong>propose</strong>(threshold: <code>u32</code>, proposal: <code>Proposal</code>)</p>
|
|
<p>▸ <strong>vote</strong>(proposal: <code>Hash</code>, index: <code>ProposalIndex</code>, approve: <code>bool</code>)</p>
|
|
<hr>
|
|
<p><a href="#top" style="float: right; font-size: 1.6rem; font-weight: bold;">Back To Top</a></p>
|
|
<h3 id="councilvoting"><a id="councilVoting"></a>councilVoting</h3>
|
|
<p>▸ <strong>propose</strong>(proposal: <code>Proposal</code>)</p>
|
|
<p>▸ <strong>setCooloffPeriod</strong>(blocks: <code>BlockNumber</code>)</p>
|
|
<p>▸ <strong>setVotingPeriod</strong>(blocks: <code>BlockNumber</code>)</p>
|
|
<p>▸ <strong>veto</strong>(proposal_hash: <code>Hash</code>)</p>
|
|
<p>▸ <strong>vote</strong>(proposal: <code>Hash</code>, approve: <code>bool</code>)</p>
|
|
<hr>
|
|
<p><a href="#top" style="float: right; font-size: 1.6rem; font-weight: bold;">Back To Top</a></p>
|
|
<h3 id="democracy"><a id="democracy"></a>democracy</h3>
|
|
<p>▸ <strong>cancelReferendum</strong>(ref_index: <code>ReferendumIndex</code>)</p>
|
|
<p>▸ <strong>propose</strong>(proposal: <code>Proposal</code>, value: <code>Balance</code>)</p>
|
|
<p>▸ <strong>second</strong>(proposal: <code>PropIndex</code>)</p>
|
|
<p>▸ <strong>startReferendum</strong>(proposal: <code>Proposal</code>, vote_threshold: <code>VoteThreshold</code>)</p>
|
|
<p>▸ <strong>vote</strong>(ref_index: <code>ReferendumIndex</code>, approve_proposal: <code>bool</code>)</p>
|
|
<hr>
|
|
<p><a href="#top" style="float: right; font-size: 1.6rem; font-weight: bold;">Back To Top</a></p>
|
|
<h3 id="session"><a id="session"></a>session</h3>
|
|
<p>▸ <strong>forceNewSession</strong>(apply_rewards: <code>bool</code>)</p>
|
|
<p>▸ <strong>setKey</strong>(key: <code>SessionKey</code>)</p>
|
|
<p>▸ <strong>setLength</strong>(new: <code>BlockNumber</code>)</p>
|
|
<hr>
|
|
<p><a href="#top" style="float: right; font-size: 1.6rem; font-weight: bold;">Back To Top</a></p>
|
|
<h3 id="staking"><a id="staking"></a>staking</h3>
|
|
<p>▸ <strong>forceNewEra</strong>(apply_rewards: <code>bool</code>)</p>
|
|
<p>▸ <strong>nominate</strong>(target: <code>Address</code>)</p>
|
|
<p>▸ <strong>registerPreferences</strong>(intentions_index: <code>u32</code>, prefs: <code>ValidatorPrefs</code>)</p>
|
|
<p>▸ <strong>setBondingDuration</strong>(new: <code>BlockNumber</code>)</p>
|
|
<p>▸ <strong>setOfflineSlashGrace</strong>(new: <code>u32</code>)</p>
|
|
<p>▸ <strong>setSessionsPerEra</strong>(new: <code>BlockNumber</code>)</p>
|
|
<p>▸ <strong>setValidatorCount</strong>(new: <code>u32</code>)</p>
|
|
<p>▸ <strong>stake</strong>()</p>
|
|
<p>▸ <strong>unnominate</strong>(target_index: <code>u32</code>)</p>
|
|
<p>▸ <strong>unstake</strong>(intentions_index: <code>u32</code>)</p>
|
|
<hr>
|
|
<p><a href="#top" style="float: right; font-size: 1.6rem; font-weight: bold;">Back To Top</a></p>
|
|
<h3 id="timestamp"><a id="timestamp"></a>timestamp</h3>
|
|
<p>▸ <strong>set</strong>(now: <code>Moment</code>)</p>
|
|
<hr>
|
|
<p><a href="#top" style="float: right; font-size: 1.6rem; font-weight: bold;">Back To Top</a></p>
|
|
<h3 id="treasury"><a id="treasury"></a>treasury</h3>
|
|
<p>▸ <strong>approveProposal</strong>(proposal_id: <code>ProposalIndex</code>)</p>
|
|
<p>▸ <strong>configure</strong>(proposal_bond: <code>Permill</code>, proposal_bond_minimum: <code>Balance</code>, spend_period: <code>BlockNumber</code>, burn: <code>Permill</code>)</p>
|
|
<p>▸ <strong>proposeSpend</strong>(value: <code>Balance</code>, beneficiary: <code>AccountId</code>)</p>
|
|
<p>▸ <strong>rejectProposal</strong>(roposal_id: <code>ProposalIndex</code>)</p>
|
|
<p>▸ <strong>setPot</strong>(new_pot: <code>Balance</code>)</p>
|
|
|
|
|
|
</section>
|
|
|
|
</div>
|
|
<div class="search-results">
|
|
<div class="has-results">
|
|
|
|
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
|
|
<ul class="search-results-list"></ul>
|
|
|
|
</div>
|
|
<div class="no-results">
|
|
|
|
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<a href="METHODS_STORAGE.html" class="navigation navigation-prev " aria-label="Previous page: Chain state (runtime)">
|
|
<i class="fa fa-angle-left"></i>
|
|
</a>
|
|
|
|
|
|
<a href="METHODS_EVENTS.html" class="navigation navigation-next " aria-label="Next page: Events (runtime)">
|
|
<i class="fa fa-angle-right"></i>
|
|
</a>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<script>
|
|
var gitbook = gitbook || [];
|
|
gitbook.push(function() {
|
|
gitbook.page.hasChanged({"page":{"title":"Extrinsics (runtime)","level":"2.3","depth":1,"next":{"title":"Events (runtime)","level":"2.4","depth":1,"path":"METHODS_EVENTS.md","ref":"METHODS_EVENTS.md","articles":[]},"previous":{"title":"Chain state (runtime)","level":"2.2","depth":1,"path":"METHODS_STORAGE.md","ref":"METHODS_STORAGE.md","articles":[]},"dir":"ltr"},"config":{"plugins":["include-codeblock","insert-logo-link","mermaid-gb3","-highlight","sunlight-highlighter"],"root":"docs","styles":{"website":"styles/website.css"},"pluginsConfig":{"insert-logo-link":{"src":"/api/logo.png","url":"https://polkadot.js.org"},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"mermaid-gb3":{},"include-codeblock":{"check":false,"edit":false,"lang":"","fixlang":false,"template":"default","theme":"chrome","unindent":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"sunlight-highlighter":{"theme":"gitbook","lineNumbers":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"Polkadot API Book","gitbook":">=2.4.0"},"file":{"path":"METHODS_EXTRINSICS.md","mtime":"2018-12-04T10:45:32.310Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2018-12-04T10:47:11.748Z"},"basePath":".","book":{"language":""}});
|
|
});
|
|
</script>
|
|
</div>
|
|
|
|
|
|
|
|
<script src="gitbook/gitbook.js"></script>
|
|
<script src="gitbook/theme.js"></script>
|
|
|
|
|
|
<script src="gitbook/gitbook-plugin-insert-logo-link/plugin.js"></script>
|
|
|
|
|
|
|
|
<script src="gitbook/gitbook-plugin-mermaid-gb3/book/plugin.js"></script>
|
|
|
|
|
|
|
|
<script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
|
|
|
|
|
|
|
|
<script src="gitbook/gitbook-plugin-search/search.js"></script>
|
|
|
|
|
|
|
|
<script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
|
|
|
|
|
|
|
|
<script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
|
|
|
|
|
|
|
|
<script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
|
|
|
|
|
|
|
|
<script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
|
|
|
|
|
|
|
|
<script src="gitbook/gitbook-plugin-mermaid-gb3/mermaid/mermaid.min.js"></script>
|
|
|
|
</body>
|
|
</html>
|
|
|