Skip to content

Commit

Permalink
Docs: update _mint and fix scroll issue (chiru-labs#321)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vectorized authored Jun 6, 2022
1 parent 99e4b6a commit 9f0d3dc
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/erc721a.md
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,10 @@ function _mint(

Mints `quantity` tokens and transfers them to `to`.

> To prevent excessive first-time token transfer costs, please limit the `quantity` to a reasonable number (e.g. `30`).
> To prevent excessive first-time token transfer costs, please limit the `quantity` to a reasonable number (e.g. 30).
>
> Extremely large `quantity` amounts (e.g. > 5000) may result in some marketplaces and indexers to drop some `Transfer` events,
> and cause some mints to not appear.
Requirements:

Expand Down
30 changes: 30 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,36 @@
<script src="//unpkg.com/docsify@4.12.2/lib/plugins/search.js"></script>
<script src="//unpkg.com/darkreader@4.9.34"></script>
<script type="text/javascript">
(function () {
var smoothScroll = function (scrollFrom, scrollTo, duration) {
var timePassed = 0, step = 15, interval, tick = function () {
if (timePassed >= duration) {
window.scrollTo(0, scrollTo);
clearInterval(interval);
} else {
window.scrollTo(0, scrollFrom + ~~((scrollTo - scrollFrom) * (timePassed / duration)));
}
timePassed += step;
};
tick();
interval = setInterval(tick, step);
}, t, r, y, clickCallback = function (e) {
for (t = e.target; t; t = t.parentElement) {
if ((t.tagName.toUpperCase() == 'A') &&
(r = t.getAttribute('href')) &&
(r = (''+r).match('#(.*)')) &&
(window.location.hash == r[0]) &&
(r = r[0].match(/\?id=(.+?)$/)) &&
(t = document.querySelector('#'+r[1].toLowerCase()))
) {
y = t.getBoundingClientRect().top, yo = window.pageYOffset;
smoothScroll(yo, y + yo, 300);
return;
}
}
};
document.addEventListener('click', clickCallback);
})();
// Solidity syntax highlighting via Prism.
Prism.languages.solidity=Prism.languages.extend("clike",{"class-name":{pattern:/(\b(?:contract|enum|interface|library|new|struct|using)\s+)(?!\d)[\w$]+/,lookbehind:!0},keyword:/\b(?:_|anonymous|as|assembly|assert|break|calldata|case|constant|constructor|continue|contract|default|delete|do|else|emit|enum|event|external|for|function|if|import|indexed|inherited|interface|internal|is|let|library|mapping|memory|modifier|new|payable|pragma|private|public|pure|require|returns?|revert|selfdestruct|solidity|storage|struct|suicide|switch|this|throw|using|var|view|while)\b/,operator:/=>|->|:=|=:|\*\*|\+\+|--|\|\||&&|<<=?|>>=?|[-+*/%^&|<>!=]=?|[~?]/}),Prism.languages.insertBefore("solidity","keyword",{builtin:/\b(?:address|bool|byte|u?int(?:8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256)?|string|bytes(?:[1-9]|[12]\d|3[0-2])?)\b/}),Prism.languages.insertBefore("solidity","number",{version:{pattern:/([<>]=?|\^)\d+\.\d+\.\d+\b/,lookbehind:!0,alias:"number"}}),Prism.languages.sol=Prism.languages.solidity;
// Dark mode via darkreader.
Expand Down

0 comments on commit 9f0d3dc

Please sign in to comment.