-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add calc gauges voting sc (#8495)
- Loading branch information
Showing
20 changed files
with
242 additions
and
556 deletions.
There are no files selected for viewing
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
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
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
11 changes: 4 additions & 7 deletions
11
apps/web/src/views/GaugesVoting/hooks/useGaugesTotalWeight.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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
export const calcGaugesVotingABI = [ | ||
{ | ||
inputs: [], | ||
name: 'gaugeVotingAddress', | ||
outputs: [{ internalType: 'address', name: '', type: 'address' }], | ||
stateMutability: 'view', | ||
type: 'function', | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'address', name: '_gaugeAddr', type: 'address' }, | ||
{ internalType: 'uint256', name: '_chainId', type: 'uint256' }, | ||
{ internalType: 'bool', name: '_inCap', type: 'bool' }, | ||
], | ||
name: 'getGaugeRelativeWeight', | ||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], | ||
stateMutability: 'view', | ||
type: 'function', | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'uint256', name: '_gaugeId', type: 'uint256' }, | ||
{ internalType: 'bool', name: '_inCap', type: 'bool' }, | ||
], | ||
name: 'getGaugeRelativeWeightById', | ||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], | ||
stateMutability: 'view', | ||
type: 'function', | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'address', name: '_gaugeAddr', type: 'address' }, | ||
{ internalType: 'uint256', name: '_chainId', type: 'uint256' }, | ||
{ internalType: 'bool', name: '_inCap', type: 'bool' }, | ||
], | ||
name: 'getGaugeWeight', | ||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], | ||
stateMutability: 'view', | ||
type: 'function', | ||
}, | ||
{ | ||
inputs: [{ internalType: 'uint256', name: '_gaugeId', type: 'uint256' }], | ||
name: 'getGaugeWeightDetails', | ||
outputs: [ | ||
{ internalType: 'uint256', name: 'gaugeWeight', type: 'uint256' }, | ||
{ internalType: 'uint256', name: 'gaugeTotalWeight', type: 'uint256' }, | ||
{ internalType: 'uint256', name: 'gaugeRawPercent', type: 'uint256' }, | ||
{ internalType: 'uint256', name: 'gaugeCappedPercent', type: 'uint256' }, | ||
{ internalType: 'uint256', name: 'gaugeInCapWeight', type: 'uint256' }, | ||
{ internalType: 'uint256', name: 'gaugeTotalFinalWeights', type: 'uint256' }, | ||
{ internalType: 'uint256', name: 'gaugeFinalPercent', type: 'uint256' }, | ||
], | ||
stateMutability: 'view', | ||
type: 'function', | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'address', name: '_gaugeAddr', type: 'address' }, | ||
{ internalType: 'uint256', name: '_chainId', type: 'uint256' }, | ||
{ internalType: 'bool', name: '_inCap', type: 'bool' }, | ||
{ internalType: 'uint256', name: '_gaugeTotalWeight', type: 'uint256' }, | ||
{ internalType: 'uint256', name: '_gaugeTotalCappedPercent', type: 'uint256' }, | ||
{ internalType: 'uint256', name: '_gaugeTotalFinalWeights', type: 'uint256' }, | ||
], | ||
name: 'getGaugeWeightMass', | ||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], | ||
stateMutability: 'view', | ||
type: 'function', | ||
}, | ||
{ | ||
inputs: [ | ||
{ internalType: 'uint256', name: '_gaugeId', type: 'uint256' }, | ||
{ internalType: 'bool', name: '_inCap', type: 'bool' }, | ||
], | ||
name: 'getGaugeWeightbyId', | ||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], | ||
stateMutability: 'view', | ||
type: 'function', | ||
}, | ||
{ | ||
inputs: [], | ||
name: 'getRawTotalGaugeWeight', | ||
outputs: [{ internalType: 'uint256', name: 'gaugeTotalWeight', type: 'uint256' }], | ||
stateMutability: 'view', | ||
type: 'function', | ||
}, | ||
{ | ||
inputs: [], | ||
name: 'getTotalCappedPercent', | ||
outputs: [{ internalType: 'uint256', name: 'gaugeTotalCappedPercent', type: 'uint256' }], | ||
stateMutability: 'view', | ||
type: 'function', | ||
}, | ||
{ | ||
inputs: [], | ||
name: 'getTotalFinalWeights', | ||
outputs: [{ internalType: 'uint256', name: 'gaugeTotalFinalWeights', type: 'uint256' }], | ||
stateMutability: 'view', | ||
type: 'function', | ||
}, | ||
{ | ||
inputs: [{ internalType: 'bool', name: '_inCap', type: 'bool' }], | ||
name: 'getTotalWeight', | ||
outputs: [{ internalType: 'uint256', name: '', type: 'uint256' }], | ||
stateMutability: 'view', | ||
type: 'function', | ||
}, | ||
{ | ||
inputs: [{ internalType: 'bool', name: '_inCap', type: 'bool' }], | ||
name: 'massGetGaugeWeight', | ||
outputs: [{ internalType: 'uint256[]', name: 'result', type: 'uint256[]' }], | ||
stateMutability: 'view', | ||
type: 'function', | ||
}, | ||
] as const |
Oops, something went wrong.
418c8f7
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.
Successfully deployed to the following URLs:
web – ./apps/web
pancakeswap.finance
pancake-prod.vercel.app
www.pancakeswap.finance
web.pancake.run
web2.pancake.run
web-git-develop.pancake.run