-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ccdfdef
commit 4d30fe5
Showing
19 changed files
with
196 additions
and
262 deletions.
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
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
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
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
68 changes: 68 additions & 0 deletions
68
frontend/src/features/swap/consts/abi/bridging-payment-abi.ts
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,68 @@ | ||
const BRIDGING_PAYMENT_ABI = [ | ||
{ | ||
type: 'constructor', | ||
inputs: [ | ||
{ name: '_underlying', type: 'address', internalType: 'address' }, | ||
{ name: '_admin', type: 'address', internalType: 'address' }, | ||
{ name: '_fee', type: 'uint256', internalType: 'uint256' }, | ||
], | ||
stateMutability: 'nonpayable', | ||
}, | ||
{ | ||
type: 'function', | ||
name: 'getAdmin', | ||
inputs: [], | ||
outputs: [{ name: '', type: 'address', internalType: 'address' }], | ||
stateMutability: 'view', | ||
}, | ||
{ | ||
type: 'function', | ||
name: 'getFee', | ||
inputs: [], | ||
outputs: [{ name: '', type: 'uint256', internalType: 'uint256' }], | ||
stateMutability: 'view', | ||
}, | ||
{ | ||
type: 'function', | ||
name: 'getUnderlyingAddress', | ||
inputs: [], | ||
outputs: [{ name: '', type: 'address', internalType: 'address' }], | ||
stateMutability: 'view', | ||
}, | ||
{ | ||
type: 'function', | ||
name: 'requestBridging', | ||
inputs: [ | ||
{ name: 'token', type: 'address', internalType: 'address' }, | ||
{ name: 'amount', type: 'uint256', internalType: 'uint256' }, | ||
{ name: 'to', type: 'bytes32', internalType: 'bytes32' }, | ||
], | ||
outputs: [], | ||
stateMutability: 'payable', | ||
}, | ||
{ | ||
type: 'function', | ||
name: 'setAdmin', | ||
inputs: [{ name: 'newAdmin', type: 'address', internalType: 'address' }], | ||
outputs: [], | ||
stateMutability: 'nonpayable', | ||
}, | ||
{ | ||
type: 'function', | ||
name: 'setFee', | ||
inputs: [{ name: 'newFee', type: 'uint256', internalType: 'uint256' }], | ||
outputs: [], | ||
stateMutability: 'nonpayable', | ||
}, | ||
{ | ||
type: 'function', | ||
name: 'underlying', | ||
inputs: [], | ||
outputs: [{ name: '', type: 'address', internalType: 'address' }], | ||
stateMutability: 'view', | ||
}, | ||
{ type: 'event', name: 'FeePaid', inputs: [], anonymous: false }, | ||
{ type: 'error', name: 'NotAnAdmin', inputs: [] }, | ||
] as const; | ||
|
||
export { BRIDGING_PAYMENT_ABI }; |
198 changes: 0 additions & 198 deletions
198
frontend/src/features/swap/consts/abi/erc20-treasury-abi.ts
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
import { ERC20_TREASURY_ABI } from './erc20-treasury-abi'; | ||
import { BRIDGING_PAYMENT_ABI } from './bridging-payment-abi'; | ||
|
||
export { ERC20_TREASURY_ABI }; | ||
export { BRIDGING_PAYMENT_ABI }; |
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,6 @@ | ||
import { HexString } from '@gear-js/api'; | ||
|
||
// TODO: can be read from vara bridging payment? | ||
const ETH_BRIDGING_PAYMENT_CONTRACT_ADDRESS = import.meta.env.VITE_ETH_BRIDGING_PAYMENT_CONTRACT_ADDRESS as HexString; | ||
|
||
export { ETH_BRIDGING_PAYMENT_CONTRACT_ADDRESS }; |
Oops, something went wrong.