limechain / hashport-contracts Goto Github PK
View Code? Open in Web Editor NEWThe EVM Smart Contracts of Hashport
License: MIT License
The EVM Smart Contracts of Hashport
License: MIT License
IFeePolicy
interface contract which will abstract all different fee policies that will be implemented.
feeAmount(uint256 _amount) returns (uint256)
PercentageFee
(% of overall transaction amount)FlatFee
(flat token amount fee)These contracts will be deployed on a per-user and per-asset basis which will have a specific service fee policy for porting usage. Once deployed, should be updated in the LibFeeCalculator
user -> fee policy mapping.
The contracts' owner will be the multi-sig gnosis wallet governing the router contracts themselves.
Please verify the avalanche Router address:ย 0xd8df34A071179fe8CEF910Ae0B43cdE49D611B49
on mainnet. You will need to checkout to the last commit before the deployment c26ee04 and pass the same order of the facets as in the router constructor.
Relevant contract
FeeCalculator
for user address -> token address -> fee policy:
mapping(address => mapping(address => IFeePolicy)) feePolicies
setFeePolicy(address _user, address _token, IFeePolicy _policy)
deleteFeePolicy(address _user, address _token, IFeePolicy _policy)
distributeRewards(address _token, uint256 _amount)
before L85 check the mapping for a set fee policy for the msg.sender
. If such exists, call the policy feeAmount()
to get the service fee.Deploy and test the Hasport smart contracts (diamond) under Hedera EVM.
TODO: check around Sept-Oct2022
Slither version 0.9.0 has:
--ignore-reurn-value
flag (which we use)--fail-on<pedantic,medium,high>
, with --fail-on-pedantic
as defaultERC721Enumerable
Transfer the info from the Deployment Sequence file from Notion.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.