import fetch from 'node-fetch'; | |
import { smock } from '@defi-wonderland/smock'; | |
async function deployMockContractFromAddress(contractAddress: string, etherscanKey: string) { | |
const abi = await fetch(`https://api.etherscan.io/api?module=contract&action=getabi&address=${contractAddress}&apikey=${etherscanKey}`) | |
.then(response => response.json()) | |
.then(data => JSON.parse(data['result'])); | |
return smock.fake(abi, {address: contractAddress}); | |
} |
I am attesting that this GitHub handle anonymoussprocket is linked to the Tezos account tz1eU1NCk7U6sNxDKos7CJMM7P97bW3wyGB1 for tzprofiles | |
sig:edsigtwwTgkiJZuqnGFDgsHsfV1Ejt8K2WXhD6Nei8WKgHr8CnbHrvcqJoUpT1LwRgzHWtPzqxQZ5itS4LHTC3KNX7iyNbhSCq1 |
<html> | |
<head> | |
<style> | |
#hen-embed { | |
border: 1px solid black; | |
height: 800px; | |
width: 500px; | |
} | |
</style> | |
<script> |
The purpose of this script is to demonstrate common operations on an FA1.2 token on the Tezos platform using the ConseilJS library and Nautilus Cloud infrastructure.
This is a companion code sample to go with the Tezos is now an asset tokenization platform article on Medium from The Cryptonomic Aperiodical. As always, to test this code get infrastructure access from Nautilus Cloud.
The code included here demonstrates token deployment and management workflows. It does not have an example for burn()
, but that is also available in the API.
This is an example of how to extract data from the Tezos Commons Baker Registry on Tezos mainnet, the details of which are outlined in this Tezos Agora thread. It works by querying Conseil for all registered bakers that are not deactivated, have a staking balance and delegated balance greater than 0. We use these filters as a proxy for identifying public bakers. You can see this result set on [Arronax](https://arronax.io?e=Tezos%20Mainnet/delegates&q=eyJmaWVsZHMiOlsiYmxvY2tfbGV2ZWwiLCJwa2giLCJiYWxhbmNlIiwiZGVsZWdhdGVkX2JhbGFuY2UiLCJzdGFraW5nX2JhbGFuY2UiXSwicHJlZGljYXRlcyI6W3siZmllbGQiOiJkZWFjdGl2YXRlZCIsIm9wZXJhdGlvbiI6ImVxIiwic2V0IjpbZmFsc2VdLCJpbnZlcnNlIjpmYWxzZX0seyJmaWVsZCI6InN0YWtpbmdfYmFsYW5jZSIsIm9wZXJhdGlvbiI6Imd0Iiwic2V0IjpbIjAiXSwiaW52ZXJzZSI6ZmFsc2V9LHsiZmllbGQiOiJkZWxlZ2F0ZWRfYmFsYW5jZSIsIm9wZXJhdGlvbiI6Imd0Iiwic2V0Ijp
This is the full code for an simplistic dApp on Tezos. It is presented as part of the Cryptonomic dApp development curriculum with ConseilJS & SmartPy. The relevant discussion of this code is in Part 6.
To get access to Tezos & Conseil infrastructure signup for an account at Nautilus Cloud. The missing parameters in the code below will come from there.