Skip to content

Instantly share code, notes, and snippets.

View eth-jashan's full-sized avatar
🎯
Focusing

Jashan Shetty eth-jashan

🎯
Focusing
View GitHub Profile
@eth-jashan
eth-jashan / ProxyDLNExecutor.sol
Last active March 19, 2024 06:34
DLN COntract to palce customer order ONChain and sponsor native fee token
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.0;
// Import interfaces
import "./IERC20.sol";
// import "./DlnSource.sol";
struct OrderCreation {
/// Address of the ERC-20 token that the maker is offering as part of this order.
/// Use the zero address to indicate that the maker is offering a native blockchain token (such as Ether, Matic, etc.).
@eth-jashan
eth-jashan / DLNFunctionExecutor.sol
Created March 15, 2024 19:40
Simple contract to relay TXN of DLN
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract DLNFunctionExecutor {
address public dlnSource;
constructor() {
}
// Modifier to restrict access to the owner of the contract
@eth-jashan
eth-jashan / gnosis-safe-multisend-submitter.js
Created February 10, 2022 16:15 — forked from jjgonecrypto/gnosis-safe-multisend-submitter.js
Programmatically submit multiple transactions to a gnosis safe to be signed as one
// Extrapolated from https://github.com/gnosis/safe-core-sdk
const ethers = require('ethers');
const { EthersAdapter } = require('@gnosis.pm/safe-core-sdk');
const Safe = require('@gnosis.pm/safe-core-sdk').default;
const SafeServiceClient = require('@gnosis.pm/safe-service-client').default;
const providerUrl = '....';
@eth-jashan
eth-jashan / .deps...remix-tests...remix_accounts.sol
Created January 24, 2022 20:07
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.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.4.22 <0.9.0;
library TestsAccounts {
function getAccount(uint index) pure public returns (address) {
address[15] memory accounts;
accounts[0] = 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4;
accounts[1] = 0xAb8483F64d9C6d1EcF9b849Ae677dD3315835cb2;
@eth-jashan
eth-jashan / README.txt
Created January 21, 2022 19:48
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.11+commit.d7f03943.js&optimize=false&runs=200&gist=
REMIX EXAMPLE PROJECT
Remix example project is present when Remix loads very first time or there are no files existing in the File Explorer.
It contains 3 directories:
1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name.
2. 'scripts': Holds two scripts to deploy a contract. It is explained below.
3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity.
SCRIPTS