Skip to content

Instantly share code, notes, and snippets.

Avatar

Ronan Sandford wighawag

View GitHub Profile
@wighawag
wighawag / rollup-typescript.md
Created Sep 3, 2020 — forked from aleclarson/rollup-typescript.md
The best Rollup config for TypeScript libraries
View rollup-typescript.md

Please retweet if this helps you!

Features

🔥 Blazing fast builds
😇 CommonJS bundle
🌲 .mjs bundle
.d.ts bundle + type-checking
🧐 Source maps

View 0x7cF5D8873995D03F249dd483376d8Be79d192D7c_0.6.5+commit.f956cc89.jsonn
{
"language": "Solidity",
"sources": {
"src/AContract.sol": {
"content": "pragma solidity 0.6.5;\r\n\r\nimport \"./ALibrary.sol\";\r\n\r\ncontract AContract {\r\n using ALibrary for uint256;\r\n\r\n function times4(uint256 t) external pure returns (uint256) {\r\n return t.twice().twice();\r\n }\r\n}\r\n"
},
"src/ALibrary.sol": {
"content": "pragma solidity 0.6.5;\r\n\r\nlibrary ALibrary {\r\n function twice(uint256 t) external pure returns (uint256) {\r\n return t * 2;\r\n }\r\n}\r\n"
},
"src/diamon_test/ActionFacet.sol": {
View 0x87A44e4d7ceA60e0eb84CFC18Eb2f0c00130A790_0.6.5+commit.f956cc89.json
{
"language": "Solidity",
"sources": {
"src/contracts_common/src/BaseWithStorage/Admin.sol": {
"content": "pragma solidity ^0.6.0;\n\n\ncontract Admin {\n address internal _admin;\n\n /// @dev emitted when the contract administrator is changed.\n /// @param oldAdmin address of the previous administrator.\n /// @param newAdmin address of the new administrator.\n event AdminChanged(address oldAdmin, address newAdmin);\n\n /// @dev gives the current administrator of this contract.\n /// @return the current administrator of this contract.\n function getAdmin() external view returns (address) {\n return _admin;\n }\n\n /// @dev change the administrator to be `newAdmin`.\n /// @param newAdmin address of the new administrator.\n function changeAdmin(address newAdmin) external {\n require(msg.sender == _admin, \"only admin can change admin\");\n emit AdminChanged(_admin, newAdmin);\n _admin = newAdmin;\n }\n\n modifier onlyAdmin() {\n
View machine.js
Machine({
id: 'planet',
initial: 'idle',
context: {
error: undefined
},
on: {
PROBE: {
target: '.probing',
in: 'idle',
View machine.js
Machine({
id: 'planet',
initial: 'unknown',
on :{
PROBE: {
target: '.probing',
in: 'unknown',
},
RETRY: {
target: '.probing',
View machine.js
Machine({
id: 'wallet',
type: "parallel",
context: {
address: undefined,
},
states: {
builtin: {
initial: 'unknown',
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
View machine.js
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
View machine.js
Machine({
id: 'wallet',
type: "parallel",
context: {
address: undefined,
vendor: undefined,
},
states: {
builtin: {
View machine.js
Machine({
id: 'planet',
initial: 'unknown',
states: {
unknown: {
on: {
PROBE: 'probing',
},
},
probing: {