Skip to content

Instantly share code, notes, and snippets.

View tortechnocom's full-sized avatar
🏠
Working from home

Supachai Chaimangua tortechnocom

🏠
Working from home
View GitHub Profile
@tortechnocom
tortechnocom / .prettierrc.json
Created January 23, 2024 06:11
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.22+commit.4fc1097e.js&optimize=false&runs=200&gist=
{
"overrides": [
{
"files": "*.sol",
"options": {
"printWidth": 80,
"tabWidth": 4,
"useTabs": false,
"singleQuote": false,
"bracketSpacing": false
@tortechnocom
tortechnocom / .deps...npm...hardhat...console.sol
Created January 23, 2024 06:04
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.22+commit.4fc1097e.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0;
library console {
address constant CONSOLE_ADDRESS =
0x000000000000000000636F6e736F6c652e6c6f67;
function _sendLogPayloadImplementation(bytes memory payload) internal view {
address consoleAddress = CONSOLE_ADDRESS;
/// @solidity memory-safe-assembly
@tortechnocom
tortechnocom / Playground.hs
Created May 27, 2021 13:18
Plutus Playground Smart Contract
import qualified Data.Text as T
import Language.Plutus.Contract hiding (when)
import Language.PlutusTx.Prelude
import Playground.Contract
-- | A 'Contract' that logs a message.
hello :: Contract BlockchainActions T.Text ()
hello = logInfo @String "Hello, world"
endpoints :: Contract BlockchainActions T.Text ()