Skip to content

Instantly share code, notes, and snippets.

View diplomatss's full-sized avatar
🌴
On vacation

Roman Sharov diplomatss

🌴
On vacation
View GitHub Profile
@diplomatss
diplomatss / contracts...Test.sol
Last active February 6, 2026 00:00
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.0+commit.c7dfd78e.js&optimize=undefined&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract Test {
string public message = "Auto-created by RemixAI";
uint256 public value;
function setValue(uint256 newValue) public {
value = newValue;
@diplomatss
diplomatss / contracts...Test.sol
Created February 5, 2026 05:17
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.20+commit.a1b79de6.js&optimize=undefined&runs=200&gist=
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract Test {
string public message = "Auto-created by RemixAI";
uint256 public value;
function setValue(uint256 newValue) public {
value = newValue;
@diplomatss
diplomatss / contract...Test.sol
Created February 5, 2026 05:02
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.20+commit.a1b79de6.js&optimize=undefined&runs=200&gist=
pragma solidity ^0.8.0;
contract Test {
// Ваш код
}
@diplomatss
diplomatss / .deps...remix-tests...remix_accounts.sol
Last active February 5, 2026 03:22
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.20+commit.a1b79de6.js&optimize=true&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) {
return address(0);
}
}
@diplomatss
diplomatss / .git...HEAD
Created February 5, 2026 02:59
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.20+commit.a1b79de6.js&optimize=true&runs=200&gist=
ref: refs/heads/main
@diplomatss
diplomatss / connection-manager-plugin...MIT
Created February 5, 2026 02:58
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.20+commit.a1b79de6.js&optimize=true&runs=200&gist=
---
### **2. Доработаем `connection.js`**
*(Добавим поддержку **Hardhat** и **Custom RPC**, интеграцию с **Remix API**)*
```javascript
class ConnectionManager {
constructor() {
this.connections = new Map(); // { type: 'injected'|'hardhat'|'rpc', provider: ..., accounts: [...] }
this.remix = null;
@diplomatss
diplomatss / .deps...remix-tests...remix_accounts.sol
Created February 5, 2026 02: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.20+commit.a1b79de6.js&optimize=true&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) {
return address(0);
}
}
@diplomatss
diplomatss / .deps...remix-tests...remix_accounts.sol
Created February 4, 2026 13: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.30+commit.73712a01.js&optimize=true&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;
@diplomatss
diplomatss / .deps...remix-tests...remix_accounts.sol
Created February 4, 2026 11:41
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.30+commit.73712a01.js&optimize=true&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;
@diplomatss
diplomatss / .deps...npm...@openzeppelin...contracts...access...Ownable.sol
Created January 23, 2026 14:09
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.31+commit.fd3a2265.js&optimize=undefined&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to