Skip to content

Commit

Permalink
Merge branch 'master' of github.com:gxchain/gxips
Browse files Browse the repository at this point in the history
  • Loading branch information
lanhaoxiang committed Jan 29, 2019
2 parents 01f08d8 + 555e430 commit c33e374
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 6 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ Number | Title |
-------------------|----------------------------------------------------------|-------------------|----------------|--------
[1](gxip-001) | GXIP Purpose and Guidelines | albert | Informational | Draft
[2](gxip-002) | 跨合约调用 | albert | Protocol | Draft
[3](gxip-003) | 收款码 URI 方案 | louie | Standard | Draft
12 changes: 6 additions & 6 deletions gxip-002/README-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ struct action {
3. 允许ram_usage为负数,即当前调用没有增加RAM消耗,而是删除了RAM

#### RAM 费用结算
1. 在合约调用完成后,调用get_ram_usage获取到ma<account_id, ram_usage>,结算当前合约调用,涉及到的所有帐户RAM费用
1. 在合约调用完成后,调用get_ram_usage获取到map<account_id, ram_usage>,结算当前合约调用,涉及到的所有帐户RAM费用
2. 如果有删除RAM,由按照全局参数,返还对应比例的RAM手续费
3. RAM返还只限于消耗RAM时的费用,调用合约的basic_fee不返还

Expand Down Expand Up @@ -94,11 +94,11 @@ timestamps updatedAt;
## 手续费

### 智能合约调用手续费
##### 方案1
1. 智能合约调用手续费分配:开发者20%, 用户推荐人20%, 公信节点 60%, 可由理事会动态调整。 其中开发者的20% 暂存到系统帐户,RAM释放后返还给开发者。

##### 方案2
1. basic_fee 和CPU费用暂存系统帐户,3天后返还。(3天可由理事会动态调整)
2. RAM费用,暂存系统帐户,释放后返还给payer。
2. RAM费用,暂存系统帐户,释放后返还给payer, 3天后可完全取回。(3天可由理事会动态调整)
3. 增加全局参数contract_fee_vesting_seconds默认259200秒,即3天。


## 全局动态参数
1. 跨合约调用深度 max-inter-contract-depth, 默认3
2. 跨合约调用basic_fee费用暂存时间 contract_basic_fee_vesting_period_seconds, 默认259200秒,即3天
66 changes: 66 additions & 0 deletions gxip-003/README-CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
编号: gxip-0003
标题: 收款码URI方案
作者: 陈鲁勇([email protected])
状态: 草稿
类型: Standard
时间: 2019年01月17日
话题: https://github.com/gxchain/gxips/issues/4

# 简介
该方案引自 [bip-0021.mediawiki](https://github.com/bitcoin/bips/blob/master/bip-0021.mediawiki),用于进行币种支付的 `URI` 方案。

根据 `URI RFC3986` 标准规定的 `URI` 的一般格式。使用 `UTF-8` 字符集来表示。

# 动机

`URI` 方案的目的是用户只需单击网页上的链接或扫描二维码即可轻松进行付款。

# 详情

1. 根据币种,生成文本格式的收款参数字符串
2. 将文本字符串进行URLEncoder,编码格式选择UTF-8
3. URLEncoder后的文本生成收款二维码

采用类 `URL` 格式,格式如下:
```
protocol:address?key=value&key1=value1
```

**币种名:地址?键=值&键=值&...&键=值**

(注:该协议示例摘自[RFC 3986](https://tools.ietf.org/html/rfc3986#section-1.1.2))

## 示例

地址:
```
gxchain:bepal
```

请求转入20.30公信币:

```
gxchain:bepal?amount=20.3
```

请求转入20.30公信币到标签为 `BEPAL Pro S` 地址上:

```
gxchain:bepal?label=BEPAL%20Pro%20S&amount=20.3&symbol=GXC
```

必须遵循正确的URI编码

## 注册URI键名

| 编号 | 键名 | 说明 |
| :---: | :---: | :---: |
| 1 | amount | 收款金额 |

# 引用

[Uniform Resource Identifier (URI): Generic Syntax RFC3986](https://tools.ietf.org/html/rfc3986)

[bip-0021.mediawiki - URI方案](https://github.com/bitcoin/bips/blob/master/bip-0021.mediawiki)

[bip-0072.mediawiki - 支付协议的uri扩展](https://github.com/bitcoin/bips/blob/master/bip-0072.mediawiki)
9 changes: 9 additions & 0 deletions gxip-003/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Number: gxip-0003
Title: Payment Protocol URI Schem
Authors: louie <[email protected]>
Status: Draft
Type: Standard
Created: 2019-01-17
Discussion: https://github.com/gxchain/gxips/issues/4

[中文](./README-CN.md)

0 comments on commit c33e374

Please sign in to comment.