Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
c19804b
BRD contracts added
samuraisam Nov 22, 2017
040f4d1
crowdsale finalization finishes token minting; limit token transfers …
samuraisam Nov 23, 2017
9be9af9
call super.finalization() on crowdsale contract
samuraisam Nov 23, 2017
4094d61
add lockup contract for pre-sale contributors
samuraisam Nov 23, 2017
9f25011
new build
samuraisam Nov 23, 2017
f9036d8
mint all presale and owner share tokens at the beginning of the crowd…
samuraisam Nov 23, 2017
d6fcb10
new build
samuraisam Nov 23, 2017
9d56d90
use safe math functions; deduct current reward from remaining balance…
samuraisam Nov 23, 2017
88d29bc
new build
samuraisam Nov 23, 2017
658bab5
add migrations back, add BRDCrowdsale creation contract
samuraisam Nov 23, 2017
8e08749
new build
samuraisam Nov 23, 2017
15bf003
first test -- ensure owner share allocation upon crowdsale creation
samuraisam Nov 23, 2017
c975ac0
make some of crowdsales members public
samuraisam Nov 23, 2017
a2f6641
add isAuthorizer
samuraisam Nov 23, 2017
7b23d7a
new build
samuraisam Nov 23, 2017
89b3a6e
add initial authorizer test
samuraisam Nov 23, 2017
9ee06cb
move hard-coded BRDLockup.pushAllocations to BRDCrowdsale.lockupToken…
samuraisam Nov 26, 2017
807f5bb
new build
samuraisam Nov 26, 2017
6e61d6b
add min/max contribution to crowdsale
samuraisam Nov 26, 2017
0d24b12
new build
samuraisam Nov 26, 2017
edc92d5
do not fail on duplicate authorizeAccount() calls; fix max contributi…
samuraisam Nov 26, 2017
a220b11
purchase token tests
samuraisam Nov 26, 2017
134ea96
new build
samuraisam Nov 26, 2017
84fd057
better tests
samuraisam Nov 27, 2017
b0c8a8f
max contrib test
samuraisam Nov 27, 2017
5d85fd0
allow overrides of constants in newContract
samuraisam Nov 27, 2017
a212b6e
contribution cap test
samuraisam Nov 27, 2017
a8339b3
fix wei-per-ether
samuraisam Nov 27, 2017
3417d40
endtime revert test
samuraisam Nov 27, 2017
b257f2c
check subtraction to prevent assert, make lockup variables public
samuraisam Nov 27, 2017
c1e4938
new build
samuraisam Nov 27, 2017
ea0d10c
call unlockTokens() directly
samuraisam Nov 27, 2017
f9846e8
lockup tests
samuraisam Nov 27, 2017
e230f7d
updated build
samuraisam Nov 27, 2017
2a15fc1
unlock presale tokens test
samuraisam Nov 27, 2017
59b4619
unlock tests
samuraisam Nov 27, 2017
7f03f69
new build
samuraisam Nov 27, 2017
5b68086
ropsten/kovan build artifacts
samuraisam Nov 27, 2017
95105bf
constructor abi generation
samuraisam Nov 27, 2017
578d749
Create README.md
samuraisam Nov 28, 2017
28cf24a
add OOB token allocation function
samuraisam Nov 30, 2017
3b6e7ad
new build
samuraisam Nov 30, 2017
e3a52dc
change owner share allocation to dynamic owner rate: allocates owner …
samuraisam Dec 1, 2017
dd5631a
deployment update for owner share change
samuraisam Dec 1, 2017
449b4db
deployment update for owner share change
samuraisam Dec 1, 2017
7dd1317
new build
samuraisam Dec 1, 2017
479a95e
remove OOB allocation function, to be built into lockupToken()
samuraisam Dec 1, 2017
300496f
new build
samuraisam Dec 1, 2017
90e36a0
use underscores for local variables
samuraisam Dec 1, 2017
1c23a57
style fixes, underscore local vars
samuraisam Dec 1, 2017
4b33d1e
add lock event
samuraisam Dec 1, 2017
bc0b52c
modify lockupTokens to only lock up the bonusRate percentage of minte…
samuraisam Dec 1, 2017
6d81ca6
add bonusRate in support scripts
samuraisam Dec 1, 2017
2983adb
add bonusRate tests
samuraisam Dec 1, 2017
8bc5afd
most recent build
samuraisam Dec 1, 2017
2d5ea8f
new flattened contract
samuraisam Dec 1, 2017
e29aa4d
add explicit access modifier to methods that didnt have them
samuraisam Dec 1, 2017
f5c9bc5
explicit method access modifiers
samuraisam Dec 1, 2017
923c748
code style fixes, add solium linter config
samuraisam Dec 1, 2017
53e2dab
updated build
samuraisam Dec 1, 2017
f55dc18
update constructor args
samuraisam Dec 2, 2017
4aa032a
use Ownable for BRDCrowdsaleAuthorizer
samuraisam Dec 3, 2017
c444344
don't create authorizer/lockup/token contracts in crowdsale construct…
samuraisam Dec 3, 2017
61358f7
update migration to create and link contracts separately
samuraisam Dec 3, 2017
2a33e81
update contract scaffolding to create contracts separately
samuraisam Dec 3, 2017
c0d379e
new build
samuraisam Dec 3, 2017
b01d5d4
makefile for flattened sol files
samuraisam Dec 3, 2017
6d8073b
new build and new ropsten config
samuraisam Dec 3, 2017
5274b0c
compile with truffle 4
samuraisam Dec 4, 2017
d040100
recent constants
samuraisam Dec 4, 2017
acb9ae1
make it a real javascript package
samuraisam Dec 4, 2017
9f24f90
makefile now builds json files from solc
samuraisam Dec 4, 2017
85a3a9e
manual deploy script, truffle can't generate a good constructor ABI s…
samuraisam Dec 4, 2017
7307c66
remove constructor-abi generator since deploy does it
samuraisam Dec 4, 2017
3722e5d
new truffle build
samuraisam Dec 4, 2017
c93bf71
manual gas for truffle-contract calls
samuraisam Dec 4, 2017
d7ed2c2
add lockup script
samuraisam Dec 4, 2017
e1c4ffe
better test constants
samuraisam Dec 5, 2017
ca176b1
new build constants; add file for contract lockups
samuraisam Dec 6, 2017
5f42c62
add setMaxContribution; update pgrama to 4.18
samuraisam Dec 6, 2017
7cf4b00
new build
samuraisam Dec 6, 2017
8fecbd3
upgrade openzeppelin; updated constants
samuraisam Dec 7, 2017
67d0de0
new build
samuraisam Dec 7, 2017
b3f870b
copy zeppelin contracts directly into project
samuraisam Dec 7, 2017
1fd76b9
new build and build configs. remove scripts as they are no longer nec…
samuraisam Dec 7, 2017
0aa0640
add next step authorizers
samuraisam Dec 7, 2017
6a6b394
add test for for maxContribution update
samuraisam Dec 8, 2017
4ab1cba
give tests less time by default
samuraisam Dec 8, 2017
753fc49
new build
samuraisam Dec 8, 2017
2e04a65
add setEndTime so crowdsale end can be changed
samuraisam Dec 8, 2017
04a4a23
base migrations written, have to comment them out until run
samuraisam Dec 8, 2017
679af20
last tests
samuraisam Dec 8, 2017
218d8d6
latest build
samuraisam Dec 8, 2017
c00f5e8
most recent build and constants update
samuraisam Dec 13, 2017
a18ab15
first mainnet test build
samuraisam Dec 13, 2017
f0a0096
mainnet build
samuraisam Dec 13, 2017
9de7e58
mainnnet constants
samuraisam Dec 13, 2017
1ed2af0
fix broken migrations in test mode
samuraisam Dec 13, 2017
215cfb1
mainnet truffle.js config
samuraisam Dec 13, 2017
3a4d6ab
add allocateTokens() function for OOB token purchases
samuraisam Dec 13, 2017
8d7d569
add HD wallet provider
samuraisam Dec 13, 2017
b989f6a
test allocateTokens()
samuraisam Dec 13, 2017
4c87b9f
add constructor args script
samuraisam Dec 13, 2017
b426815
add setCap so cap can be modified before crowdsale start
samuraisam Dec 15, 2017
17c4e91
allow token beneficiary to be different from eth beneficiary
samuraisam Dec 15, 2017
aaa4254
support new crowdsale additions
samuraisam Dec 15, 2017
a225e06
updated crowdsale constants
samuraisam Dec 15, 2017
d90cc99
final build
samuraisam Dec 18, 2017
40163ff
final constants
samuraisam Dec 18, 2017
4c40237
final migrations
samuraisam Dec 18, 2017
60fda27
increase gas price for last deploy
samuraisam Dec 18, 2017
bc87dbf
fix constructor args script
samuraisam Dec 18, 2017
0520cad
test for forwarding eth to a smart contract
samuraisam Dec 29, 2017
84f8ceb
deploy contracts step now deploys WalletSimple
samuraisam Dec 29, 2017
c4dc9f6
updated migraitons (these were run)
samuraisam Dec 29, 2017
ad5111d
crowdsale compensation migraiton
samuraisam Dec 29, 2017
f49557c
add csv pkg
samuraisam Dec 29, 2017
2eb8e04
recent build
samuraisam Dec 29, 2017
bc71dd9
testing forwardFunds function
samuraisam Dec 29, 2017
d6189ae
add vending machine for bulk token transfers (airdrops)
samuraisam May 24, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
.DS_Store
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why you didn't add /build directory here?
I think should not commit any artifacts compiled from source code.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am including build so dependent repositories can use the generated code without requiring the whole solidity/truffle/npm toolchain. They can consume the JSON files directly.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good idea for include JSON file. but how about "flatten" code? it makes difficult to review code

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that's true, I can remove those. The reason they are included is they are necessary to verify the individual contracts on etherscan

.vscode
compensation.csv
compensation.json
1 change: 1 addition & 0 deletions .soliumignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
23 changes: 23 additions & 0 deletions .soliumrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"extends": "solium:all",
"plugins": [
"security"
],
"rules": {
"quotes": [
"error",
"double"
],
"indentation": [
"error",
2
],
"arg-overflow": [
"warning",
3
],
"security/no-block-members": [
"warning"
]
}
}
17 changes: 17 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.DEFAULT_GOAL := all

CONTRACTS=BRDCrowdsaleAuthorizer BRDLockup BRDToken BRDCrowdsale
JSONS=build/%.json
SOLCOPTS=--combined-json abi,asm,ast,bin,bin-runtime,clone-bin,compact-format,devdoc,hashes,interface,metadata,opcodes,srcmap,srcmap-runtime,userdoc --pretty-json --optimize-runs 200

build/flattened/%.sol:
truffle-flattener contracts/$*.sol > $@

build/%.json: build/flattened/%.sol
solc $(SOLCOPTS) $^ > $@

clean:
-rm build/*.json
-rm build/flattened/*.sol

all: $(patsubst %,$(JSONS), $(CONTRACTS))
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# smart-contracts

This is the repository for the Bread Token (BRD) Crowdsale and ERC20 smart contracts.

### Getting started

We use Truffle and OpenZeppelin for development. The main smart contracts (BRDToken and
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please create package.json with these steps:

npm init .
npm install --save zeppelin-solidity

after execute it, commit package.json and package-lock.json into this repository, then add some instruction like "execute npm install".

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

BRDCrowdsale) are based on OpenZeppelin's MintableToken and Crowdsale base contracts.

For development, we use ganache-cli using the default settings.

To test, start ganache-cli and run `truffle test`
135,351 changes: 135,351 additions & 0 deletions build/BRDCrowdsale.json

Large diffs are not rendered by default.

Loading