Skip to content

Commit 096d268

Browse files
author
Devon Bear
authored
chore: module by module licensing (berachain#458)
1 parent 9fda12f commit 096d268

File tree

177 files changed

+1552
-12902
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

177 files changed

+1552
-12902
lines changed

.gitmodules

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,7 @@
88
path = precompile/contracts/solidity/lib/forge-std
99
url = https://github.com/foundry-rs/forge-std
1010
[submodule "lib/forge-std"]
11-
branch = v1.5.0
11+
branch = v1.5.1
12+
[submodule "contracts/lib/forge-std"]
13+
path = contracts/lib/forge-std
14+
url = https://github.com/foundry-rs/forge-std

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ If you want to help contribute to the framework, check out the [Framework Specs]
4747
4848
<pre>
4949
🔭 Polaris Core 🔭
50-
├── <a href="./bindings">bindings</a>: Documentation for Polaris.
50+
├── <a href="./contracts">contracts</a>: Contracts and bindings for Polaris (and hosts).
5151
├── <a href="./docs">docs</a>: Documentation for Polaris.
5252
├── <a href="./eth">eth</a>: The Core of the Polaris Ethereum Framework.
5353
├── <a href="./lib">lib</a>: A collection of libraries used throughout the repo.

bindings/testing/.gitkeep

Whitespace-only changes.

contracts/LICENSE

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
SPDX-License-Identifier: MIT
2+
3+
Copyright (c) 2023 Berachain Foundation
4+
5+
Permission is hereby granted, free of charge, to any person
6+
obtaining a copy of this software and associated documentation
7+
files (the "Software"), to deal in the Software without
8+
restriction, including without limitation the rights to use,
9+
copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the
11+
Software is furnished to do so, subject to the following
12+
conditions:
13+
14+
The above copyright notice and this permission notice shall be
15+
included in all copies or substantial portions of the Software.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
19+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24+
OTHER DEALINGS IN THE SOFTWARE.

contracts/LICENSE.header

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
SPDX-License-Identifier: MIT
2+
3+
Copyright (c) 2023 Berachain Foundation
4+
5+
Permission is hereby granted, free of charge, to any person
6+
obtaining a copy of this software and associated documentation
7+
files (the "Software"), to deal in the Software without
8+
restriction, including without limitation the rights to use,
9+
copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the
11+
Software is furnished to do so, subject to the following
12+
conditions:
13+
14+
The above copyright notice and this permission notice shall be
15+
included in all copies or substantial portions of the Software.
16+
17+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
19+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24+
OTHER DEALINGS IN THE SOFTWARE.
File renamed without changes.

contracts/foundry.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[profile.default]
2+
fuzz_runs = 1024
3+
ignored_error_codes = [1878, 5574]
4+
evm_version = 'london'
5+
solc_version = '0.8.17'
6+
cache = true
7+
force = false
8+
9+
[profile.ci]
10+
fuzz_runs = 8192

contracts/gen.go

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// SPDX-License-Identifier: MIT
2+
//
3+
// Copyright (c) 2023 Berachain Foundation
4+
//
5+
// Permission is hereby granted, free of charge, to any person
6+
// obtaining a copy of this software and associated documentation
7+
// files (the "Software"), to deal in the Software without
8+
// restriction, including without limitation the rights to use,
9+
// copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
// copies of the Software, and to permit persons to whom the
11+
// Software is furnished to do so, subject to the following
12+
// conditions:
13+
//
14+
// The above copyright notice and this permission notice shall be
15+
// included in all copies or substantial portions of the Software.
16+
//
17+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18+
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
19+
// OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20+
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
21+
// HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
22+
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
23+
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
24+
// OTHER DEALINGS IN THE SOFTWARE.
25+
26+
package contracts
27+
28+
//go:generate abigen --pkg generated --abi ./out/staking.sol/IStakingModule.abi.json --bin ./out/staking.sol/IStakingModule.bin --out ./bindings/cosmos/precompile/i_staking_module.abigen.go --type StakingModule
29+
//go:generate abigen --pkg generated --abi ./out/bank.sol/IBankModule.abi.json --bin ./out/bank.sol/IbankModule.bin --out ./bindings/cosmos/precompile/i_bank_module.abigen.go --type BankModule
30+
//go:generate abigen --pkg generated --abi ./out/address.sol/IAddress.abi.json --bin ./out/address.sol/IAddress.bin --out ./bindings/cosmos/precompile/i_address.abigen.go --type Address
31+
//go:generate abigen --pkg generated --abi ./out/distribution.sol/IDistributionModule.abi.json --bin ./out/distribution.sol/IDistributionModule.bin --out ./bindings/cosmos/precompile/i_distribution_module.abigen.go --type DistributionModule
32+
//go:generate abigen --pkg generated --abi ./out/governance.sol/IGovernanceModule.abi.json --bin ./out/governance.sol/IGovernanceModule.bin --out ./bindings/cosmos/precompile/i_governance_module.abigen.go --type GovernanceModule

contracts/go.mod

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
module pkg.berachain.dev/polaris/contracts
2+
3+
go 1.20
4+
5+
require github.com/ethereum/go-ethereum v1.11.4
6+
7+
require (
8+
github.com/VictoriaMetrics/fastcache v1.12.1 // indirect
9+
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
10+
github.com/cockroachdb/pebble v0.0.0-20230309163202-51422ae2d449 // indirect
11+
github.com/deckarep/golang-set/v2 v2.2.0 // indirect
12+
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect
13+
github.com/edsrzf/mmap-go v1.1.0 // indirect
14+
github.com/fsnotify/fsnotify v1.6.0 // indirect
15+
github.com/gballet/go-libpcsclite v0.0.0-20191108122812-4678299bea08 // indirect
16+
github.com/getsentry/sentry-go v0.19.0 // indirect
17+
github.com/go-ole/go-ole v1.2.6 // indirect
18+
github.com/go-stack/stack v1.8.1 // indirect
19+
github.com/golang/protobuf v1.5.3 // indirect
20+
github.com/google/uuid v1.3.0 // indirect
21+
github.com/gorilla/websocket v1.5.0 // indirect
22+
github.com/holiman/uint256 v1.2.1 // indirect
23+
github.com/huin/goupnp v1.1.0 // indirect
24+
github.com/klauspost/compress v1.16.0 // indirect
25+
github.com/mattn/go-runewidth v0.0.14 // indirect
26+
github.com/prometheus/common v0.42.0 // indirect
27+
github.com/shirou/gopsutil v3.21.11+incompatible // indirect
28+
github.com/stretchr/testify v1.8.2 // indirect
29+
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect
30+
github.com/tklauser/go-sysconf v0.3.11 // indirect
31+
github.com/tklauser/numcpus v0.6.0 // indirect
32+
github.com/yusufpapurcu/wmi v1.2.2 // indirect
33+
golang.org/x/crypto v0.7.0 // indirect
34+
golang.org/x/exp v0.0.0-20230310171629-522b1b587ee0 // indirect
35+
golang.org/x/sys v0.6.0 // indirect
36+
google.golang.org/protobuf v1.29.0 // indirect
37+
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
38+
)

0 commit comments

Comments
 (0)