This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contract Root { | |
// calculates a^(1/n) to dp decimal places | |
// maxIts bounds the number of iterations performed | |
function nthRoot(uint _a, uint _n, uint _dp, uint _maxIts) pure public returns(uint) { | |
assert (_n > 1); | |
// The scale factor is a crude way to turn everything into integer calcs. | |
// Actually do (a * (10 ^ ((dp + 1) * n))) ^ (1/n) | |
// We calculate to one extra dp and round at the end |
This file has been truncated, but you can view the full file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"address": { | |
"ens_domain_name": null, | |
"hash": "0xf338f45A7EdA247340bB018288Caa7Fb4266E5ac", | |
"implementation_name": null, | |
"is_contract": false, | |
"is_verified": null, | |
"metadata": null, | |
"name": null, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"address": { | |
"ens_domain_name": null, | |
"hash": "0x9a6C2890024F6fa7a61EbaD3Cc42a3Cd1cEEFF9C", | |
"implementation_name": null, | |
"is_contract": false, | |
"is_verified": null, | |
"metadata": null, | |
"name": null, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"address": { | |
"ens_domain_name": null, | |
"hash": "0x00DDC08D535918425709DA3e50134AE7CFb2eFf9", | |
"implementation_name": null, | |
"is_contract": false, | |
"is_verified": null, | |
"metadata": null, | |
"name": null, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type": "Strategy", | |
"data": { | |
"cron": "* ** ", | |
"cronjob": { | |
"type": "Weighted", | |
"data": [ | |
{ | |
"type": "Weight", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"editor.minimap.enabled": false, | |
"workbench.startupEditor": "none", | |
"vim.easymotion": true, | |
"vim.incsearch": true, | |
"vim.useSystemClipboard": true, | |
"vim.useCtrlKeys": true, | |
"vim.hlsearch": true, | |
"vim.insertModeKeyBindings": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"editor.minimap.enabled": false, | |
"breadcrumbs.enabled": false, | |
"workbench.startupEditor": "none", | |
"vim.easymotion": true, | |
"vim.incsearch": true, | |
"vim.useSystemClipboard": true, | |
"vim.useCtrlKeys": true, | |
"vim.hlsearch": true, | |
"vim.insertModeKeyBindings": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module 0x3::token { | |
... | |
struct TokenId has store, copy, drop { | |
token_data_id: TokenDataId, | |
property_version: u64, | |
} | |
struct TokenDataId has copy, drop, store { | |
creator: address, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public entry fun mint_nft(account: &signer) acquires ResourceSigner, MintingInfo { | |
let (resource, resource_addr) = resource_account(); | |
let minting_info = borrow_global_mut<MintingInfo>(@rangers); | |
let name = string::utf8(b""); | |
string::append(&mut name, minting_info.base_name); | |
string::append(&mut name, to_string(minting_info.index)); | |
let img = generate_base64_image(minting_info.index); | |
let uri = generate_base64_metadata(img, minting_info.index); | |
std::debug::print(&uri); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use std::hash::{Hash, Hasher}; | |
use std::collections::hash_map::DefaultHasher; | |
#[derive(Debug)] | |
struct A { | |
a: i32 | |
} | |
impl Hash for A { |
NewerOlder