Skip to content

Instantly share code, notes, and snippets.

View casweeney's full-sized avatar
👨‍💻
Building Platforms

Coding Cas casweeney

👨‍💻
Building Platforms
View GitHub Profile
@casweeney
casweeney / cast.sol
Created September 16, 2022 17:51 — forked from Realkayzee/cast.sol
import "./LibCast.sol";
contract Cast{
using Arithmetic for uint;
using Arithmetic for Arithmetic.Workers;
Arithmetic.Workers aw;
uint tem;
@casweeney
casweeney / LibCast.sol
Last active September 16, 2022 17:52 — forked from Realkayzee/LibCast.sol
uint256 constant SALARY=20000;
struct Workers{
uint8 count;
string name;
}
library Arithmetic{
function add(uint a,uint b) internal pure returns(uint){
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.1;
import "./Proxiable.sol";
contract ImplementationA is Proxiable {
address public owner;
uint public count;
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Delegate {
address public owner;
constructor(address _owner) {
owner = _owner;
}
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract B {
uint public num;
address public sender;
uint public amount;
address public sender2;
string public name;
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol";
/// @author Casweeney Ojukwu
contract SavingLending is ERC20 {
address owner;
uint public constant maxTotalSupply = 10000000 * 10 ** 18;
@casweeney
casweeney / VotingContract.sol
Created September 4, 2022 01:35
Simple Voting Contract
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
/// @author Casweeney Ojukwu
contract PollingSystem {
/// @dev Created events for each transaction
event pollCreated(bool indexed status);
event voted(uint indexed candidateIndex);
event votingStarted(bool indexed _votingOpened);
event votingStopped(bool indexed _votingOpened);
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract EthereumWallet {
address owner;
constructor() {
owner = msg.sender;
}
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
contract Multisend {
address owner;
constructor() {
owner = msg.sender;
}
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
import "./IERC20.sol";
contract swap{
IERC20 token;
struct Order{
address _to;