SHOWING: First 60
#70,832,086text"ord -r server\n"
"```"
msgstr ""
#: src/guides/moderation.md:4
msgid ""
"`ord` includes a block explorer, which you can run locally with `ord server`."
msgstr "`ord` 包含了一个区块浏览器,你可以在本地运行`ord server`."
#: src/guides/moderation.md:6
msgid ""
"The block explorer allows viewing inscriptions. Inscriptions are user-"
"generated content, which may be objectionable or unlawful."
msgstr ""
"区块浏览器允许查看铭文。铭文是用户生成的内容,因此可能令人反感或非法的。"
#: src/guides/moderation.md:9
msgid ""
"It is the responsibility of each individual who runs an ordinal block "
"explorer instance to understand their responsibilities with respect to "
"unlawful content, and decide what moderation policy is appropriate for their "
"instance."
msgstr ""
"运行ord区块浏览器实例的每个人都有责任了解他们对非法内容的责任,并决定适合他们"
"实例的审核政策。"
#: src/guides/moderation.md:13
msgid ""
"In order to prevent particular inscriptions from being displayed on an `ord` "
"instance, they can be included in a YAML config file, which is loaded with "
"the `--config` option."
msgstr ""
"为了防止特定的铭文显示在`ord`实例上,它们可以包含在 YAML 配置文件中,该文件使"
#45,054,451text assert_eq!(Sat(0).height(), 0);
assert_eq!(Sat(1).height(), 0);
assert_eq!(Sat(Epoch(0).subsidy()).height(), 1);
assert_eq!(Sat(Epoch(0).subsidy() * 2).height(), 2);
assert_eq!(
Epoch(2).starting_sat().height(),
SUBSIDY_HALVING_INTERVAL * 2
);
assert_eq!(Sat(50 * COIN_VALUE).height(), 1);
assert_eq!(Sat(2099999997689999).height(), 6929999);
assert_eq!(Sat(2099999997689998).height(), 6929998);
}
#[test]
fn name() {
assert_eq!(Sat(0).name(), "nvtdijuwxlp");
assert_eq!(Sat(1).name(), "nvtdijuwxlo");
assert_eq!(Sat(26).name(), "nvtdijuwxkp");
assert_eq!(Sat(27).name(), "nvtdijuwxko");
assert_eq!(Sat(2099999997689999).name(), "a");
assert_eq!(Sat(2099999997689999 - 1).name(), "b");
assert_eq!(Sat(2099999997689999 - 25).name(), "z");
assert_eq!(Sat(2099999997689999 - 26).name(), "aa");
}
#[test]
fn number() {
assert_eq!(Sat(2099999997689999).n(), 2099999997689999);
}
#[test]
fn degree() {
assert_eq!(Sat(0).degree().to_string(), "0°0′0″0‴");
#45,022,452textalkylphenol 6685
cultureless 6685
lobachevski 6687
melanoleuca 6689
igurational 6692
avunculocal 6694
hypomnemata 6694
houghtaling 6695
gallionella 6696
denitration 6697
hardgrounds 6697
lobectomies 6697
microphages 6699
columbianum 6700
bargainable 6703
diapositive 6704
eggenberger 6706
nongranular 6706
klausenburg 6707
fraternitas 6708
hyperpathia 6708
frustrative 6709
graptolitic 6709
fixedincome 6711
housewright 6711
nephelinite 6712
exemplarism 6713
kallikreins 6714
apostolicus 6717
disposicion 6717
murphysboro 6717
confessoris 6718
markowitsch 6719
bioresource 6721
intrastrand 6721
lefthanders 6721
mesosternal 6721
broadstreet 6722
complextype 6725
deictically 6725
churchville 6726
konstantine 6726
montealegre 6726
nonreversal 6730
ingoldstadt 6731
normativism 6733
israelensis 6735
hyannisport 6736
aurantiacum 6737
giustiniano 6738
fitzosborne 6740
influencias 6741
despoilment 6742
kandalaksha 6742
callorhinus 6743
eurhythmics 6743
goodykoontz 6743
dronacharya 6745
exencephaly 6745
micturating 6745
aggrandised 6746
#44,997,408text </dl>
<p>Output has been spent.</p>
"
.unindent()
);
}
#[test]
fn no_list() {
assert_regex_match!(
OutputHtml {
inscriptions: Vec::new(),
outpoint: outpoint(1),
list: None,
chain: Chain::Mainnet,
output: TxOut {
value: 3,
script_pubkey: ScriptBuf::new_p2pkh(&PubkeyHash::all_zeros()),
},
runes: Vec::new(),
}
.to_string(),
"
<h1>Output <span class=monospace>1{64}:1</span></h1>
<dl>
<dt>value</dt><dd>3</dd>
<dt>script pubkey</dt><dd class=monospace>OP_DUP OP_HASH160 OP_PUSHBYTES_20 0{40} OP_EQUALVERIFY OP_CHECKSIG</dd>
<dt>address</dt><dd class=monospace>1111111111111111111114oLvT2</dd>
<dt>transaction</dt><dd><a class=monospace href=/tx/1{64}>1{64}</a></dd>
</dl>
"
.unindent()
);
}
#[test]
fn with_inscriptions() {
assert_regex_match!(
OutputHtml {
inscriptions: vec![inscription_id(1)],
#44,996,547text .*
<h2>0 Inscriptions</h2>
<div class=thumbnails>
</div>
<h2>1 Transaction</h2>
<ul class=monospace>
<li><a href=/tx/[[:xdigit:]]{64}>[[:xdigit:]]{64}</a></li>
</ul>
"
.unindent()
);
}
#[test]
fn next_active_when_not_last() {
assert_regex_match!(
BlockHtml::new(
Chain::Mainnet.genesis_block(),
Height(0),
Height(1),
0,
Vec::new()
),
r"<h1>Block 0</h1>.*prev\s*<a class=next href=/block/1>next</a>.*"
);
}
#[test]
fn prev_active_when_not_first() {
assert_regex_match!(
BlockHtml::new(
Chain::Mainnet.genesis_block(),
Height(1),
Height(1),
0,
Vec::new()
),
r"<h1>Block 1</h1>.*<a class=prev href=/block/0>prev</a>\s*next.*",
);
}
#[test]
fn block_hash_serializes_as_hex_string() {
assert_eq!(
serde_json::to_string(&BlockHash::all_zeros()).unwrap(),
"\"0000000000000000000000000000000000000000000000000000000000000000\""
#44,991,847text ),
],
[
(
OutPoint {
txid: txid0,
vout: 0,
},
vec![(id0, u128::max_value())],
),
(
OutPoint {
txid: txid1,
vout: 0,
},
vec![(id1, u128::max_value())],
),
],
);
let txid2 = context.rpc_server.broadcast_tx(TransactionTemplate {
inputs: &[(2, 1, 0, Witness::new()), (3, 1, 0, Witness::new())],
..Default::default()
});
context.mine_blocks(1);
context.assert_runes(
[
(
id0,
RuneEntry {
etching: txid0,
rune: Rune(RUNE),
supply: u128::max_value(),
timestamp: 2,
..Default::default()
},
),
(
id1,
RuneEntry {
etching: txid1,
rune: Rune(RUNE + 1),
supply: u128::max_value(),
timestamp: 3,
number: 1,
..Default::default()
#44,991,560texttransfer1.8334#40,314,481brc-20transfer1.8339#40,314,475brc-20transfer1.5860#40,314,268brc-20