This repository has been archived by the owner on Jan 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 382
feat: Airswap integration #245
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
ca09104
feat: First try to add Airswap to Studio
pieterbraamcreate a3b3211
feat: Testing things out
pieterbraamcreate 068e8e8
feat: Testing things out 2
pieterbraamcreate 0d42b0e
feat: Testing things out 3
pieterbraamcreate 8910fcc
feat: Fixed immasandwich PR comments
pieterbraamcreate File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { Register } from '~app-toolkit/decorators'; | ||
import { AppDefinition } from '~app/app.definition'; | ||
import { GroupType, ProtocolAction, ProtocolTag } from '~app/app.interface'; | ||
import { Network } from '~types/network.interface'; | ||
|
||
export const AIRSWAP_DEFINITION = { | ||
id: 'airswap', | ||
name: 'Airswap', | ||
description: | ||
'AirSwap is an open community of developers, designers, writers, and tinkerers building decentralized trading systems. Protocol fees are automatically distributed to contributors.', | ||
url: 'https://airswap.io', | ||
symbol: 'AST', | ||
groups: { | ||
sAST: {id: 's-ast', type: GroupType.TOKEN}, | ||
}, | ||
tags: [ProtocolTag.EXCHANGE], | ||
supportedNetworks: { | ||
[Network.ETHEREUM_MAINNET]: [ProtocolAction.VIEW], | ||
}, | ||
primaryColor: '#2B71FF', | ||
}; | ||
|
||
@Register.AppDefinition(AIRSWAP_DEFINITION.id) | ||
export class AirswapAppDefinition extends AppDefinition { | ||
constructor() { | ||
super(AIRSWAP_DEFINITION); | ||
} | ||
} | ||
|
||
export default AIRSWAP_DEFINITION; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Module } from '@nestjs/common'; | ||
|
||
import { AbstractDynamicApp } from '~app/app.dynamic-module'; | ||
|
||
import { AirswapAppDefinition } from './airswap.definition'; | ||
import { AirswapContractFactory } from './contracts'; | ||
import { EthereumAirswapBalanceFetcher } from './ethereum/airswap.balance-fetcher'; | ||
import { EthereumAirswapSAstTokenFetcher } from './ethereum/airswap.s-ast.token-fetcher'; | ||
|
||
@Module({ | ||
providers: [ | ||
AirswapAppDefinition, | ||
AirswapContractFactory, | ||
EthereumAirswapBalanceFetcher, | ||
EthereumAirswapSAstTokenFetcher, | ||
], | ||
}) | ||
export class AirswapAppModule extends AbstractDynamicApp<AirswapAppModule>() {} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,243 @@ | ||
[ | ||
{ | ||
"inputs": [ | ||
{ "internalType": "contract ERC20", "name": "_token", "type": "address" }, | ||
{ "internalType": "string", "name": "_name", "type": "string" }, | ||
{ "internalType": "string", "name": "_symbol", "type": "string" }, | ||
{ "internalType": "uint256", "name": "_duration", "type": "uint256" }, | ||
{ "internalType": "uint256", "name": "_minDelay", "type": "uint256" } | ||
], | ||
"stateMutability": "nonpayable", | ||
"type": "constructor" | ||
}, | ||
{ "anonymous": false, "inputs": [], "name": "CancelDurationChange", "type": "event" }, | ||
{ | ||
"anonymous": false, | ||
"inputs": [{ "indexed": true, "internalType": "uint256", "name": "newDuration", "type": "uint256" }], | ||
"name": "CompleteDurationChange", | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, | ||
{ "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } | ||
], | ||
"name": "OwnershipTransferred", | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ "indexed": true, "internalType": "address", "name": "delegate", "type": "address" }, | ||
{ "indexed": true, "internalType": "address", "name": "account", "type": "address" } | ||
], | ||
"name": "ProposeDelegate", | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [{ "indexed": true, "internalType": "uint256", "name": "unlockTimestamp", "type": "uint256" }], | ||
"name": "ScheduleDurationChange", | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ "indexed": true, "internalType": "address", "name": "delegate", "type": "address" }, | ||
{ "indexed": true, "internalType": "address", "name": "account", "type": "address" } | ||
], | ||
"name": "SetDelegate", | ||
"type": "event" | ||
}, | ||
{ | ||
"anonymous": false, | ||
"inputs": [ | ||
{ "indexed": true, "internalType": "address", "name": "from", "type": "address" }, | ||
{ "indexed": true, "internalType": "address", "name": "to", "type": "address" }, | ||
{ "indexed": false, "internalType": "uint256", "name": "tokens", "type": "uint256" } | ||
], | ||
"name": "Transfer", | ||
"type": "event" | ||
}, | ||
{ | ||
"inputs": [{ "internalType": "address", "name": "", "type": "address" }], | ||
"name": "accountDelegates", | ||
"outputs": [{ "internalType": "address", "name": "", "type": "address" }], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [{ "internalType": "address", "name": "account", "type": "address" }], | ||
"name": "available", | ||
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [{ "internalType": "address", "name": "account", "type": "address" }], | ||
"name": "balanceOf", | ||
"outputs": [{ "internalType": "uint256", "name": "total", "type": "uint256" }], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ "inputs": [], "name": "cancelDurationChange", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, | ||
{ | ||
"inputs": [], | ||
"name": "decimals", | ||
"outputs": [{ "internalType": "uint8", "name": "", "type": "uint8" }], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [{ "internalType": "address", "name": "", "type": "address" }], | ||
"name": "delegateAccounts", | ||
"outputs": [{ "internalType": "address", "name": "", "type": "address" }], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "duration", | ||
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [{ "internalType": "address", "name": "account", "type": "address" }], | ||
"name": "getStakes", | ||
"outputs": [ | ||
{ | ||
"components": [ | ||
{ "internalType": "uint256", "name": "duration", "type": "uint256" }, | ||
{ "internalType": "uint256", "name": "balance", "type": "uint256" }, | ||
{ "internalType": "uint256", "name": "timestamp", "type": "uint256" } | ||
], | ||
"internalType": "struct IStaking.Stake", | ||
"name": "accountStake", | ||
"type": "tuple" | ||
} | ||
], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "name", | ||
"outputs": [{ "internalType": "string", "name": "", "type": "string" }], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "owner", | ||
"outputs": [{ "internalType": "address", "name": "", "type": "address" }], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [{ "internalType": "address", "name": "delegate", "type": "address" }], | ||
"name": "proposeDelegate", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [{ "internalType": "address", "name": "", "type": "address" }], | ||
"name": "proposedDelegates", | ||
"outputs": [{ "internalType": "address", "name": "", "type": "address" }], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, | ||
{ | ||
"inputs": [{ "internalType": "uint256", "name": "delay", "type": "uint256" }], | ||
"name": "scheduleDurationChange", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [{ "internalType": "address", "name": "account", "type": "address" }], | ||
"name": "setDelegate", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [{ "internalType": "uint256", "name": "_duration", "type": "uint256" }], | ||
"name": "setDuration", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ "internalType": "string", "name": "_name", "type": "string" }, | ||
{ "internalType": "string", "name": "_symbol", "type": "string" } | ||
], | ||
"name": "setMetaData", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], | ||
"name": "stake", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [ | ||
{ "internalType": "address", "name": "account", "type": "address" }, | ||
{ "internalType": "uint256", "name": "amount", "type": "uint256" } | ||
], | ||
"name": "stakeFor", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "symbol", | ||
"outputs": [{ "internalType": "string", "name": "", "type": "string" }], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "token", | ||
"outputs": [{ "internalType": "contract ERC20", "name": "", "type": "address" }], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [], | ||
"name": "totalSupply", | ||
"outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], | ||
"stateMutability": "view", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [{ "internalType": "address", "name": "newOwner", "type": "address" }], | ||
"name": "transferOwnership", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [{ "internalType": "address", "name": "delegate", "type": "address" }], | ||
"name": "unsetDelegate", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
}, | ||
{ | ||
"inputs": [{ "internalType": "uint256", "name": "amount", "type": "uint256" }], | ||
"name": "unstake", | ||
"outputs": [], | ||
"stateMutability": "nonpayable", | ||
"type": "function" | ||
} | ||
] |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is airswap.balance-fetcher necessary? Since airswap tokens are already shown on dashboard.