Skip to content

Instantly share code, notes, and snippets.

@Souptacular
Souptacular / SHA3Test.sol
Last active August 22, 2018 16:46
Testing SHA3 with Solidity
contract SHA3Test
{
function getSHA3Hash(bytes input) returns (bytes32 hashedOutput)
{
hashedOutput = sha3(input);
}
}
// Ethereum uses KECCAK-256. It should be noted that it does not follow
Resources:
Service:
Type: AWS::ECS::Service
DependsOn: ListenerRule
Properties:
Cluster: !Ref Cluster
ServiceName: !Ref ServiceName
LaunchType: !Ref LaunchType
DesiredCount: !Ref DesiredCount
DeploymentConfiguration:
TaskDefinition:
Type: AWS::ECS::TaskDefinition
Properties:
Cpu: !Ref VCpu
RequiresCompatibilities:
- !Ref RequiresCompatibilities
Family: !Ref ServiceName
NetworkMode: !Ref NetworkMode
ExecutionRoleArn: arn:aws:iam::000:role/EcsTaskExecutionRole
TaskRoleArn: arn:aws:iam::000:role/EcsTaskExecutionRole
@critesjosh
critesjosh / Splitter.sol
Last active April 6, 2022 20:00
A contract to split funds between addresses. Demostrates pushing vs pulling transfers
pragma solidity ^0.4.6;
contract Splitter {
mapping(address => uint) public balances;
function unsafeSplit(address address1, address address2)
public
payable
returns(bool success)