Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: stellar contracts final #8

Merged
merged 64 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
912233e
inittial commit
sagars Apr 26, 2024
bc49ec0
restructure, rlp integration and xcall integration
sagars May 16, 2024
693af2f
unit test happy cases completed
sagars May 22, 2024
15bf147
panic case unit test completed
sagars May 24, 2024
c65d215
storate and extend ttl updates
sagars May 31, 2024
76ede77
cleanups
sagars May 31, 2024
573a27b
unused variables cleanup
sagars Jun 2, 2024
7bf307f
integer data types update in unittest
sagars Jun 5, 2024
a4fbfd6
alloc feature removed from asset manager as that is not required and …
sagars Jun 6, 2024
a5900a6
removed duplicate reading
sagars Jun 7, 2024
36c2564
points changed to 10k, verify limit on withdraw commented for testing
sagars Jun 10, 2024
4afb72d
commit for testing
sagars Jun 10, 2024
a79f9ab
commit for testig
sagars Jun 10, 2024
95002e6
commit for testing
sagars Jun 10, 2024
ec866ed
commit for tesitng
sagars Jun 10, 2024
9352a2a
u64 to u128 conversion approach changed
sagars Jun 10, 2024
ff7be87
timestamp issue fixed
sagars Jun 10, 2024
8542feb
balanced dollar message withdraw_to in network address
sagars Jun 11, 2024
d1395a5
decode length check enabled
sagars Jun 11, 2024
da7273f
number type conversion update
sagars Jun 12, 2024
384c2a1
sender params added to handle_call_message method
sagars Jun 12, 2024
d68356c
bnusd cross trasfer revert from param update
sagars Jun 12, 2024
4d425c1
string address validation
sagars Jun 14, 2024
6174c57
unit test added for invalid adddress
sagars Jun 14, 2024
71cd7cf
check valid address for Bytes
sagars Jun 17, 2024
85f5742
asset manager rate_limit calc update, bnusd invalid address unittest …
sagars Jun 17, 2024
40ef476
reentrancy issue fix
sagars Jun 17, 2024
932201f
error handling fixes
sagars Jun 17, 2024
ff15737
bnusd code optimization
sagars Jun 17, 2024
e0ba066
code optimization
sagars Jun 17, 2024
6aaf001
verify protocal return type issue fixed
sagars Jun 18, 2024
dc41b14
code optimize for protocal verification
sagars Jun 18, 2024
3ab9aab
reentrancy on asset manager fixed
sagars Jun 18, 2024
d9e34cf
[dev_dependencies] to [dev-dependencies]
sagars Jun 19, 2024
6fb2756
xcall wasm removed from gitignore, for CI build
sagars Jun 21, 2024
a78ed46
ci: add cicd
DeepakBomjan Jun 19, 2024
8c81a37
internal audit issues fixes
sagars Aug 29, 2024
cdeb4ef
ci: add codecov bandge
DeepakBomjan Jun 21, 2024
2972b6c
ci: configure condecov
DeepakBomjan Jun 21, 2024
24ab23a
version updated and tested
sagars Aug 29, 2024
fb06c3f
token unittests for balanced dollar updated and enabled
sagars Sep 3, 2024
e07f372
xcall param removed from handle call message of bnUSD and xcall manager
sagars Sep 4, 2024
67ef0ec
balanced messages separated from rlp lib
sagars Sep 6, 2024
0f73d76
stellar deviation doc added
sagars Sep 6, 2024
ab42a3f
rlp decoder issue fixed for empty byte array
sagars Sep 6, 2024
1a1c583
token data data structure optimized and tested
sagars Sep 8, 2024
e9530f7
test events removed, token data saved
sagars Sep 9, 2024
f2d5c87
storage type mismatch issue fixed, ttl_extend verification on unit test
sagars Sep 9, 2024
2edba2b
cross_transfer and cross_transfer_data methods merged
sagars Sep 10, 2024
5939384
the readme document added
sagars Sep 10, 2024
d963837
xcall address validation issue and verify_protocols issue fixed, test…
sagars Sep 11, 2024
e50ba12
re-entry issue fixed
sagars Sep 11, 2024
080f650
mint method removed and tests updated
sagars Sep 18, 2024
1f88b89
Initial commit
FezBox Mar 19, 2024
7c029ba
ci: add hygiene ci checks
DeepakBomjan Jun 18, 2024
903041b
ci: add pull request template
DeepakBomjan Jun 20, 2024
65c82f3
docs: add Codecov badges
DeepakBomjan Sep 18, 2024
a983075
ci: upgrade rust toolchain version to 1.79.0
DeepakBomjan Sep 18, 2024
f72296f
rate limit default value set
sagars Sep 18, 2024
18d197e
burn method removed -> token interface removed
sagars Sep 19, 2024
53c0b78
rlp issue fix
sagars Sep 19, 2024
cd26ae9
chore: configure upgrade authority for upgrading contracts
bishalbikram Sep 19, 2024
bc20b05
fix: test setup
bishalbikram Sep 20, 2024
d5eba79
fix: align commit histories of main and dev
Itshyphen Sep 23, 2024
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
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Bug report
about: Create a report to help us improve
title: ''
labels:
labels: iBriz
assignees: ''

---
Expand All @@ -21,4 +21,4 @@ Steps to reproduce the behavior:
A clear and concise description of what you expected to happen.

**Additional context**
Add any other context about the problem here.
Add any other context about the problem here.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Feature request
about: Suggest an idea for this project
title: ''
labels:
labels: iBriz
assignees: ''

---
Expand All @@ -17,4 +17,4 @@ A clear and concise description of what you want to happen.
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
Add any other context or screenshots about the feature request here.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/task-template.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Task Template
about: New tasks created should consist of the following information
title: ''
labels:
labels: iBriz
assignees: ''

---
Expand All @@ -24,4 +24,4 @@ Ex: When restarting the relay, synchronization picks up from the most recently s

### Additional Information

Describe anything relevant that hasn't been mentioned yet.
Describe anything relevant that hasn't been mentioned yet.
11 changes: 11 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cicd:
- '.github/workflows/*'

scripts:
- 'scripts/*'

test:
- 'test/**'

documentation:
- '**/*.md'
35 changes: 35 additions & 0 deletions .github/workflows/build-test-soroban-contracts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build
on:
push:
branches:
- '**'
pull_request:
branches:
- main

jobs:
Build:
name: Build Soroban Contracts
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
with:
submodules: true

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: 1.79.0
target: wasm32-unknown-unknown
override: true
profile: minimal

- name: Install wasm32
run: |
rustup target add wasm32-unknown-unknown
cargo install --locked soroban-cli

- name: Build & Test soroban Contracts
run: |
soroban contract build
43 changes: 43 additions & 0 deletions .github/workflows/soroban-codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Soroban contracts Codecov

on:
pull_request:
branches:
- "main"
push:
branches:
- "**"

jobs:
code-coverage:
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
- name: Install Rust
run: rustup update stable
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Install wasm32
run: |
rustup target add wasm32-unknown-unknown
cargo install --locked soroban-cli
- name: Build & Test soroban Contracts
run: |
soroban contract build
- name: Generate code coverage
run:
cargo llvm-cov --lcov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
flags: rust
fail_ci_if_error: true
211 changes: 10 additions & 201 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,205 +1,14 @@
### Java ###
# Compiled class file
*.class
target
.soroban

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

.idea

.gradle
**/build/
!gradle-wrapper.jar

gradle.properties

.project
.classpath
.settings
**/bin/
**/pkg/

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*

### Rust ###
# Generated by Cargo
# will have compiled files and executables
debug/
target/
artifacts/*

report/**

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
#Cargo.lock
artifacts

# These are backup files generated by rustfmt
**/*.rs.bk

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

### Solidity ###
# Logs
logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Snowpack dependency directory (https://snowpack.dev/)
web_modules/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variable files
# environment variables
.env
.env.development.local
.env.test.local
.env.production.local
.env.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next
out

# Nuxt.js build / generate output
.nuxt
dist

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# vuepress v2.x temp and cache directory
.temp

# Docusaurus cache and generated files
.docusaurus

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

# Code Coverage
lcov.info

# vscode files
.vscode

**/.DS_Store


vendor/**
scripts/download_buf.sh
.env.production

test/e2e-demo/ibc-config/**
# macOS-specific files
.DS_Store
Cargo.lock
test_snapshots
.VSCodeCounter

.xcall-multi
artifacts/
24 changes: 24 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[workspace]
resolver = "2"
members = [
"contracts/*",
"libs/*"
]

[workspace.dependencies]
soroban-sdk = "21.6.0"

[profile.release]
opt-level = "z"
overflow-checks = true
debug = 0
strip = "symbols"
debug-assertions = false
panic = "abort"
codegen-units = 1
lto = true

# For more information about this profile see https://soroban.stellar.org/docs/basic-tutorials/logging#cargotoml-profile
[profile.release-with-logs]
inherits = "release"
debug-assertions = true
Loading
Loading